on 02-13-2009 1:31 PM
Hi,
I have a Integration Process that works well for a XML message of the type:
<EMESSAGE>
<PERSON>
<TAG_1>
<TAG_2>
...
</PERSON>
</EMESSAGE>
My BPM process the data for the Person correctly.
Now I want to be able to tried more than one person per input message, some thing like:
<EMESSAGE>
<PERSON>
<TAG_1>
<TAG_2>
</PERSON>
<PERSON>
<TAG_1>
<TAG_2>
</PERSON>
<PERSON>
<TAG_1>
<TAG_2>
</PERSON>
</EMESSAGE>
I build a 1:n Interface Mapping that creates me the following structure:
<Messages>
<Message1>
<EMESSAGE>
<PERSON>
<TAG_1>
<TAG_2>
...
</PERSON>
</EMESSAGE>
</Message1>
<Message2>
<EMESSAGE>
<PERSON>
<TAG_1>
<TAG_2>
...
</PERSON>
</EMESSAGE>
</Message2>
<Message3>
<EMESSAGE>
<PERSON>
<TAG_1>
<TAG_2>
...
</PERSON>
</EMESSAGE>
</Message3>
</Messages>
But when I use a ForEach Block in my new BPM, it doesn't work if there is more then 1 person in the input. The error message I got is:
<?xml version="1.0" encoding="utf-8" ?>
- <MappingTrace>
<Trace level="1" type="T">Mapping-Namespace:http://domain.com/xi/domain_4</Trace>
<Trace level="1" type="T">Mapping-Name:IM_CPM_AbsSync_to_N_CPM_AbsSync</Trace>
<Trace level="1" type="T">Mapping-SWCV:3E235261F43111DDB40AC952C0A80C15</Trace>
<Trace level="1" type="T">Mapping-Step:1</Trace>
<Trace level="1" type="T">Mapping-Type:XSLT</Trace>
<Trace level="1" type="T">Mapping-Program:CPM_to_N_ContextPersonMessage</Trace>
<Trace level="3" type="T">Mapping has one input message.</Trace>
<Trace level="3" type="T">Dynamic Configuration Is Empty</Trace>
<Trace level="3" type="T">Multi mapping required.</Trace>
<Trace level="3" type="T">Creating XSLT mapping CPM_to_N_ContextPersonMessage.</Trace>
<Trace level="3" type="T">Load 3e235261-f431-11dd-b40a-c952c0a80c15, <a href="http://domain.com/xi/domain_4" TARGET="test_blank">http://domain.com/xi/domain_4</a>, -1, CPM_to_N_ContextPersonMessage.xsl.</Trace>
<Trace level="3" type="T">Search CPM_to_N_ContextPersonMessage.xsl (http://domain.com/xi/domain_4, -1) in swcv 3e235261-f431-11dd-b40a-c952c0a80c15.</Trace>
<Trace level="2" type="T">Call XSLT processor with stylsheet CPM_to_N_ContextPersonMessage.xsl.</Trace>
<Trace level="2" type="T">Returned form XSLT processor.</Trace>
<Trace level="3" type="T">XSLT transformation: CPM_to_N_ContextPersonMessage.xsl completed with 0 warning(s).</Trace>
<Trace level="3" type="T">Dynamic Configuration Is Empty</Trace>
<Trace level="1" type="T">Content Type application/xml</Trace>
<Trace level="1" type="T">No interface specified for parameter 2</Trace>
</MappingTrace>
Does someone have any idea or a suggestion on how to reuse my BPM that works for a single person?
Thanks in advance for your suggestions.
greg
The easiest way would be to modify your used data type in a way that it can handle this structure:
<EMESSAGE>
<PERSON>
<TAG_1>
<TAG_2>
</PERSON>
<PERSON>
<TAG_1>
<TAG_2>
</PERSON>
<PERSON>
<TAG_1>
<TAG_2>
</PERSON>
</EMESSAGE>
That is: multiple occurrences of the segment PERSON in a single message.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I solved the issue, I drop the solution here for people having the same issue. The mapping needed to generated a file like that one:
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<EMESSAGE>
<PERSON>
<TAG_1>
<TAG_2>
</PERSON>
<PERSON>
<TAG_1>
<TAG_2>
</PERSON>
<PERSON>
<TAG_1>
<TAG_2>
</PERSON>
</EMESSAGE>
<EMESSAGE>
<PERSON>
<TAG_1>
<TAG_2>
</PERSON>
<PERSON>
<TAG_1>
<TAG_2>
</PERSON>
<PERSON>
<TAG_1>
<TAG_2>
</PERSON>
</EMESSAGE>
<EMESSAGE>
<PERSON>
<TAG_1>
<TAG_2>
</PERSON>
<PERSON>
<TAG_1>
<TAG_2>
</PERSON>
<PERSON>
<TAG_1>
<TAG_2>
</PERSON>
</EMESSAGE>
</ns0:Message1>
</ns0:Messages>
and not with
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
...
</ns0:Message1>
<ns0:Message2>
...
</ns0:Message2>
<ns0:Message3>
...
</ns0:Message3>
</ns0:Messages>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
My DT indeed supports those multiple PERSON records, so if I understand you correctly, I might just use the Input message and use a block?
How do I instruct the block to take each PERSON record as Current line ?
Cheers,
greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check if you have done this in Transformation Step:
Create new Transaction: YES
Source Msg: Request-container
Target Msg: RequestList-container (Multiline container)
>Thanks for the sharing, in my case the RequestList and the Request containers are from the same type, >expect that the Request contains only one record.
>
>Would that be limiting me to do the same as you did ?
Then i have understood you right. It should work, i did the same.
Regards
Arpil
ok no success for the moment, so I will try to describe my BPM more precisely:
The DT I use can contain up to 1'000 PERSON record inside a unique EMESAGE reccord (the root element)
My containers: (all are of type Abstract Interface of my DT)
Input (Process)
requestList(Process) Multiline
request(block)
response(block)
Receive Request Step
Message: input
Start Process: Yes
Mode : Async.
Split (Transformation) Step
IM: My Interface that does the 1Message with N PERSON records to N Messsages with 1 PERSON record
Create new transaction: Yes
Source: input
Target: requestList
Block Step
Mode: ForEach
Block Start: New transaction
Block End: New transaction
Multiline_Element: RequestList
CurrentLine: request
No end condition
Inside the block
My Sync Send call to a BAPI
Source: request
Target: response
A final Async Send step
Message: response.
The workflow stop at the Transform step, as if hte fact that many messages come in result could not be handled back. Here are the details for the Interface mapping used in the transformation step:
Source: MyDataTypeAbstractAsynchroneInterface
Occurrence: 1
Destination:
Occurrences: 0:unbounded
Mapping program: the following XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="EPERSON">
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<xsl:for-each select="CONTEXTPERSON">
<xsl:element name="ns0:Message{position()}">
<EPERSON xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ContextPersonMessage">
<xsl:element name="CONTEXTPERSON">
<xsl:attribute name="personid"><xsl:value-of select="@personid"/></xsl:attribute>
</xsl:element>
<!--End of CONTEXTPERSON> -->
</EPERSON>
</xsl:element>
</xsl:for-each>
</ns0:Messages>
</xsl:template>
</xsl:stylesheet>
Still any suggestions ?
The trace of the error is the same as before, so I won't copy paste it again.
Hi Gregorio,
I did almost the same scenario. i am sharing what i did. It should help.
Block(ForEach)
Block Start: New Transaction
Block End: New Transaction
Multiline Element: RequestList (Container having Process visibility )
Current Line: Request (Container having Block visibility)
Inside it Send Step
Receiver From: Send Context.
Regards
Arpil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.