Jeffrey Drumm · Jan 22, 2018

Get Message Header ID in Business Process

I'm looking for a way to get the message header ID for the current message in a Request to a Business Process.

I've located some code that gives me what I need, but it runs the risk of violating the "abstraction layer" ISC has in place around such things. And while I very much appreciate their efforts at keeping things simple for me ... well, sometimes you just have to dig through the guts to get what you want.

Is there a documented, deprecation-resistant method for getting at %Ensemble("%Process").%PrimaryRequestHeader.%Id() from within a  BP?

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

You can access %Ensemble("%Process") as ..%Process so:


Thank you, Eduard.

I'm still a bit concerned that this violates the abstraction layer, but I'm coming to the conclusion that there's just no other way.

Apologies for digging up this old thread, but this solution doesn't seem to work for IRIS Interoperability Business Operations (and, I'm assuming, Services). Is there A mechanism to get at message header data from within a custom operation?

It's not IRIS related. %PrimaryRequestHeader is defined in Ens.BusinessProcess and so  not available for BO/BS.

Use %RequestHeader property, available in BS and BO.

Thanks, Eduard. I found it late last night in the class docs, along with some other stuff I was looking for. Came back here first thing this morning to update my post, but you were, as usual, very quick to answer!

Thank you yes

Header itself is another layer because it's meta information for the BPL state machine, which you're inside of. So I don't see how you can get header Id from inside the state machine without violating abstractions in place.

Still, %Context, %Process and %LastError are documented and acceptable to use.