cancel
Showing results for 
Search instead for 
Did you mean: 

Message id in BPM

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

I did all of Siva's steps

( )

, then:

GlobalContainer globalContainer1 = container.getGlobalContainer();

String b = (String) globalContainer1.getParameter("mymessid");

result.addValue(b);

mymessid is a container variable from BPM

but in the mapping when I run my scanario it returns -> null (the container also doesn't have any Return - only when I assign senderservice I can see the container variable is filled but still in the transofmration I get null)

BTW

I assign messageid from the incomming message

(in a BPM of course)

any ideas?

Regards,

Michal

Message was edited by: Michal Krawczyk

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Michal,

We ran into the same issue and submitted an OSS Message about it. Here's the response from OSS:

it's a known issue.

when programming a mapping you must differenciate between two cases:

Will your mapping be executed on the BPE (business process engine) or

within an ordinary step on the integration server.

Due to the different functionality of the BPE (e.g. split/merge) some

parameters are not accessible and will not be evatuated there. This is a

behaviour that was designed that way.

if you are calling the mapping from the BPE engine, the MEssage ID

and other constants are not accessible. The BPE engine can

split/merge XI messages and then i makes no sense to correlate

the messages in the BPE engine to any Message ID.

If you are executing the mapping

within an ordinary step on the integration server

all Mapping Runtime Constants mentioned in the document under

http://help.sap.com/saphelp_nw04/helpdata/

en/84/4afc51f65c4e4fabfbbbd25f548ab7/frameset.htm

->Design -> Designing Mappings-> Imported Archives (XSLT/Java)

->java mapping

are accessible.

A possible solution for your problem would be to map the MESSAGE ID

into the Xi payload before the XI message is transferred to the

BPE engine. In the BPE engine you can then read the MessageID

from the XI payload.

Thanks,

Jesse

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

thx Jesse )

so I guess as Chandrasekhar said and we used to do

the only way is to use it in interface det

and there's no way of doing it in transformation step...

That's a pitty but good to know

now we're 100% sure:)

thx once more:)

Regards,

michal

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi michal,

It was out of my intution that i suggested to perform a container operation. B'cos when u are successfully able to assign an Xpath expresion the same should have been true for context objects also.Today i am trying on the same

I have designed my BPM and checked for errors at design time, it populated the window <b>"no errors found".</b> But when i went to sxi_cache and found that the process code for my BPM was 99. So when i tried activating it manually, it was giving me a problem. <b>Data types '' and 'swfxst_string' are not compatable</b>. I found that the BPM was taking some default values for operator, expression (parameters) that were not assigned during design time.

Can you tell me the process code of your BPM.

Cheers,

Siva Maranani.

udo_martens
Active Contributor
0 Kudos

Hi Michal,

I didn't tried to get the message id like you, but I catched it in a abap mapping:


g_messageid = param->get( param->message_id ).

Regards, Udo

MichalKrawczyk
Active Contributor
0 Kudos

Hi Udo,

but in a BPM?

Regards,

michal

udo_martens
Active Contributor
0 Kudos

Hi Michal,

no, that mapping wasn't in bpm. Hopefully that works. Use functions ECATT_CONV_XSTRING_TO_STRING and ECATT_CONV_STRING_TO_XSTRING to have a quick test without wellformed XML.

Regards, Udo

MichalKrawczyk
Active Contributor
0 Kudos

Hi Udo,

without BPM there's no problem at all

the problem begins when you want the same with a BPM... then the fun begins:)

Regards,

michal

Former Member
0 Kudos

Hi Michael,

You can use a XSLT Mapping in BPM to get the Message ID.

[code]

<xsl:param name="MessageId"/>

<xsl:value-of select="$MessageId"/>

[/code]

So you can set Message ID in the XML Message.

Regards,

Robin

MichalKrawczyk
Active Contributor
0 Kudos

Hi Robin,

have you tried it in a BPM? (in a transformation step)

Regards,

michal

Former Member
0 Kudos

Hi Michal,

we only get the Message ID in a XSLT Mapping between two BPM Processes.

But so we get all Messages IDs, that also in the XI Monitoring.

So is that not enough ?

Regards,

Robin