cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-Mapping runtime issue

Former Member
0 Kudos

Hi, Friend:

We are using BPM to collect two type of message (Msg1 and Msg2) and map to target message (Msg3),


                          ------Receive1-------
Start --Fork(start)                            Fork(stop) ---Transformation--Send
                          ------Receive2-------

When we created all the messages from scratch, the process works, the process worked.

After we use external definition (xsd), it always fails on transformation step.

However,if we put the payload to test in message mapping, it success.

Any thoughts ?

Thanks

Liang

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Liang

Check the input message you are using.

If you copied it from the test tab, you will notice that it has Messages Tag's around it.

In real time you need to ensure that the messages tab do not occur.

Regards

Bhavesh

Former Member
0 Kudos

Hi, Bhavesh:

Nice to see your comments. It is good point for multi-mapping, especially for message splitting.

Actually, what I did is create a dummy mapping program without target,

I put the Msg1 as source message, then go to test tab put on payload, get the first file.

Then do the same for the Msg2 to get the second file.

After I got two files, the mapping is not used, I close it without saving it.

Regards.

Liang

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi.

In your mapping, are you using the imported message as source message? Or are you using a message type you defined in XI?

You are correct suspecting the namespace may be to blame.

If the namespaces are not identical to what the mapper is expected it won't find the correct field to map and throw the error you are seeing even if the XML message is valid.

You can check this in the TEST view of your mapper, paste the input message instance (an actual XML) for your externally defined message in the source text view of the source message and then change back to tabular tree view. If the bullets to the left of the message structure are red, then the parser thinks the message is invalid, probably a namespace problem.

An easy way to solve this is to save the message instance on your file system, and import the message into the mapper as message definition instead of the external definition. (Go to the help button to the right of "Message Type" and click "import XML or XSD").

In this way XI will "derive" the XML structure from the actual message including the correct namespaces etc.

Hope it helps!

-Sam.

former_member205101
Participant
0 Kudos

HI Linag,

Plz test ur inteface mapping on test mode, Take the input of from ur message mapping (ie what u used in transformation step ) ,

Let me know exactly which step u r getting error in ur BPM by going to BPE monitoring (graphic view) (sxmb_moni_bpe and process selection)

Thanks

Praba

Edited by: Prabaharan Rangasamy on May 28, 2009 5:20 PM

Former Member
0 Kudos

Hi, Praba:

We have tested in both multi-mapping, and also interface mapping by using the same payload the causes error in runtime, they are all fine.

The error happens on tranformation step: some nodes have very simple mapping like one to one, it can not create target node (see attached part of trace).

Once we change the complained node mapping from a constant value, the next test shows next target node can not be produced.

If the node is attribute, only required attribute complains, if the node is element, the node with min occurence of 1 complains


<?xml version="1.0" encoding="utf-8" ?> 

- <MappingTrace>
  <Trace level="1" type="T">Mapping-Namespace:http://xmlfile2xmlfile</Trace> 
  <Trace level="1" type="T">Mapping-Name:Im_PBC_Audit</Trace> 
  <Trace level="1" type="T">Mapping-SWCV:64968F80768C11DCC184FCEB0A01071F</Trace> 
  <Trace level="1" type="T">Mapping-Step:1</Trace> 
  <Trace level="1" type="T">Mapping-Type:JAVA</Trace> 
  <Trace level="1" type="T">Mapping-Program:com/sap/xi/tf/_PBC_Request_Response_AuditMapping_</Trace> 
  <Trace level="3" type="T">Multi mapping required.</Trace> 
  <Trace level="3" type="T">Creating Java mapping com/sap/xi/tf/_PBC_Request_Response_AuditMapping_.</Trace> 
  <Trace level="3" type="T">Load 64968f80-768c-11dc-c184-fceb0a01071f, <a href="http://xmlfile2xmlfile" TARGET="test_blank">http://xmlfile2xmlfile</a>, -1, com/sap/xi/tf/_PBC_Request_Response_AuditMapping_.class.</Trace> 
  <Trace level="3" type="T">Search com/sap/xi/tf/_PBC_Request_Response_AuditMapping_.class (http://xmlfile2xmlfile, -1) in swcv 64968f80-768c-11dc-c184-fceb0a01071f.</Trace> 
  <Trace level="3" type="T">Loaded class com.sap.xi.tf._PBC_Request_Response_AuditMapping_</Trace> 
  <Trace level="2" type="T">Call method execute of the application Java mapping com.sap.xi.tf._PBC_Request_Response_AuditMapping_</Trace> 
  <Trace level="1" type="T">RuntimeException during appliction Java mapping com/sap/xi/tf/_PBC_Request_Response_AuditMapping_</Trace> 
  <Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:Messages/ns0:Message1/ns1:BenefitEnrollment. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd 
  .....

Thanks

Liang

former_member200962
Active Contributor
0 Kudos
If the node is attribute, only required attribute complains, if the node is element, the node with min occurence of 1 complains

yes this is the way it should work....

What you can do is:

1) Ensure that all the required Attributes and nodes with min occurences 1 get a valid input from the source XML

OR

2) try changing the occurence of node and making Attribute to Optional

OR

3) Map all the min 0 occurence nodes and Required Attributes with Blank Constant

Other than the above three options I dont beleive we have other options available heer to solve the problem....if there is any then please let me also know...

Regards,

Abhishek.

Former Member
0 Kudos

Hi, Everyone:

What I suspected is correct, and what Sam mentioned is also right direction. This is really caused by name space, I added one xslt mapping program before my normal message mapping, it is used to removed the name space prefix, then everything is working fine.

Thanks all the friends who involved in my threads.

Liang

prateek
Active Contributor
0 Kudos

Most probable reason for this is improper Interface mapping occurrence settings.

However,if we put the payload to test in message mapping, it success.

Test interface mapping and see if it works.

Regards,

Prateek

Former Member
0 Kudos

Hi, Everyone:

Thanks for the input.

Actually I came cross the problem first by using imported xsd.

Then I started investigate the problem by created different scenario, the messages are created from the scratch, I found when I create from IR, it works fine.

Before every test, we deleted the error instance of BPM using SWWL.

In ID, we also re-imported the BPM.

The message occurence are all 1:1, it does not have problem in the scenarios that I created in my investigation.

I am thinking this is more namespace related issue, since the xsd has other namesapce defined.

Any more thoughs, everyone ?

Thanks

Liang

Edited by: Liang Ji on May 28, 2009 3:07 PM

former_member200962
Active Contributor
0 Kudos
Actually I came cross the problem first by using imported xsd.

where is this XSD imported into??

Former Member
0 Kudos

Hi,abhishek:

The XSD file imported under external definition in interface objects from one of the namespace.

Does this matter ?

Thanks

Liang

former_member200962
Active Contributor
0 Kudos

No it should not matter....actually i what i meant was what is the use of this XSD...where it is used...

Former Member
0 Kudos

Hi,

If u have made any changes in BPM then recreate integration process in ID.

delete all entries from smq1, smq2, swwl (for all user)

Regards,

Manisha

former_member200962
Active Contributor
0 Kudos
When we created all the messages from scratch, the process works, the process worked.
After we use external definition (xsd), it always fails on transformation step. 
However,if we put the payload to test in message mapping, it success.

If i get it right:

1) you created BPM..actiavted it and tested it......then it worked fine

2)then you made some change and it stopped working

If yes then

1) check in SXI_CACHE for the return code

2) remove error instance from tcode SWWL

3) if need reimport the BPM in ID

Mapping success in IR cannot be taken as process will be successful :)....although it is critera for successful execution

Regards,

Abhishek.