I recently started to work with Ensemble. I defined a subclass of EnsLib.HL7.Message. In my production I receive HL7v2 messages and transport them using the Message Router to a business operation. The operation class has an OnMessage method with parameter
pObject As MySubclassOfEnsLibHL7Message.
I expected that specifying the parameter type, on receiving the message an implicit type cast would be performed. However, $CLASSNAME reveals that my messages are still of type EnsLib.HL7.Message. How can I convert my messages in ObjectScript (without DTLs or something the like)?
My motivation for doing all of this is the following. I need to store copies of certain messages in a separate database, not in EnsLib_HL7.Message, where all the other messages are stored. So I thought the most intuitive way to achieve this would be to define the abovementioned subclass. Is there a better way to do this?
Any help is very much appreciated. Thank you in advance.