Question
Thembelani Mlalazi · Jul 5, 2018

How to access the Header properties of a message in Code

I am trying to write a generic process that will take any incoming message but would like to know where it came from so in my code I would like to do something like this

If (Document.Source="some serviceorProcess").

Just to be clear in the route you get these features is there a way of accessing them in code

0
0 412
Discussion (1)1
Log in or sign up to continue

You can determine, where does the message comes from by inspecting it's header, get header Id from:

$$$JobCurrentHeaderId

and query Ens.MessageHeader class.

Alternatively, check "process" variable in BPL or current context in ObjectScript processes. Maybe the whole object would be available somewhere.