Referencing properties in the Header or Body of a message
We have to route messages in a Process Class by their source (using either the SourceConfigName from the Message Header or the Source in the Message Body.
The inputs are standard HL7 messages from different Services but need to be routed on to different Processes depending on where they come from (not my design & I can't change it now) does any one have any suggestions how I could do this?
Thanks
if you are using a routing rule I think you can use the context property Source. So your condition for testing if it came from your "fromLab" busienss service would be
Source="fromLab"
David, thanks and if it were only that simple & could have resloved the problem.
Unfortunately the routing is being done inside a class that is called by the Process so I am trying to refer to these properties "long hand".
i thought a routing engine was the harder case :-)
If you are in COS called from BPL then you can access the current BP as 'process' as long as either
a)you do not use the ProcedureBlock class keyword,
or
b) you put process in the public list for you method
then you can access properties of the process such as %PrimaryRequestHeader
{
...
set src=process.%PrimaryRequestHeader.SourceConfigName
...
}
If you are calling a COS funciton from a routing rule, you can get similar information form the variable 'context' which is a reference to an object of type EnsLib.HL7.MsgRouter.RoutingEngine
David,
Thanks for your help. Got it working now.
:)
Leom