cancel
Showing results for 
Search instead for 
Did you mean: 

File-XI-File BPM Split Question

Former Member
0 Kudos

Iam using BPM to split the 1 file into 2 files. I have to use BPM due to requirement.

Iam sending file to BPM

In BPM:

receive step

transform Step - Here message split is performed

Fork Start

Send Message 1

Send Message 2

Fork End ( end condition is 1=1 )

Stop.

Only 1 file is written and 2nd file no information

When I looked at SXMB_MONI_BPE

Send1 Workflow system logically deleted

Send2 Workflow system completed

--

I dont know whats happening for Send 1

Where can I look for potential errors ?

In the request message mapping of SXMB_MONI ( 2 payloads are as follows )

1st Payload ( Maindocument ( Application/xml))

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

- <ns1:MT_State xmlns:ns1="http://www.test.com">

- <State>

<State_rec>NYC</State_rec>

<State_rec>FLA</State_rec>

<State_rec>CAN</State_rec>

<State_rec>CAS</State_rec>

</State>

</ns1:MT_State>

2nd Payload (XI_Context(text/xml))

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

- <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">

- <asx:values>

- <CONTEXT>

- <RMS_CONTEXT>

<NAMESPACE>http://sap.com/xi/XI/System</NAMESPACE>

<NAME>ProcessStep</NAME>

<VALUE />

</RMS_CONTEXT>

</CONTEXT>

</asx:values>

</asx:abap>

Anyone have any suggestion for me how to fix this issue?

Thanks a lot.

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

HI,

1) First check your Transformation step i.e 1:2 mapping is giving correct output. This you can test in the integration reporistory with live data from SXMB_MONI by Test option. Also check in the interface mapping

2) If above is success, then check the FORK step proeprties in the BPM. did you give neccessary no. of branches equal to 2 ? if not give that and try out.

3) Change the BPM , activate it and check the SXI_CAHCE for the latest version. If the return code is not equal to zero, activate it and make sure that runtime version is zero.

4) Before running the scenario, delete all workflow error logs from SWWL transaction and test it.

Regards,

Moorthy

Former Member
0 Kudos

Thanks Krishna Moorthy.

Necessary Fork Steps = 2

End Condition = (1=1)

I am getting following error

Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:7)

and the payload from SXMB_MONI is

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

<ns1:MT_Combined_File xmlns:ns1="http://test.com">

<DT_State>

<State_rec>NYC</State_rec>

<State_rec>FLA</State_rec>

<State_rec>CAN</State_rec>

<State_rec>CAS</State_rec>

</DT_State>

<DT_Supplier>

<Supplier_rec>WalMart1</Supplier_rec>

<Supplier_rec>WalMart2</Supplier_rec>

<Supplier_rec>WalMart3</Supplier_rec>

</DT_Supplier>

</ns1:MT_Combined_File>

Will you please direct me to the error as I'm confused here.

Message was edited by: Ram Krish

moorthy
Active Contributor
0 Kudos

Hi,

Where are you getting this error ? In the transformation ? If so check all the fields are mapped properly etc ?

Do you have 2 message types in the target side ? check these ..

/people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure

Regards,

Moorthy

Former Member
0 Kudos

Above error is coming when I copied payload from SXMB_MONI into test tab of message mapping.

I configured correctly..

When I run this scenario from file to file only file related to first message is getting created and no second file created though there was data.. I checked mapping as well .

moorthy
Active Contributor
0 Kudos

Ok, then the problem is may be because of your input xml is not formatted when you copied from the SXMB_MONI.. ok.. so no problem.

Now coming to the BPM issue , ie, are you able to see 2 messages in the BPM Monitoring ?

Also just activate the BPM with Fork properties, as i mentioned and try to re-import the Intgertion process into Directory and re-run the scenario. did you delete the old errored bpm logs with <b>SWWL</b> transaction.

Probably cache refresh , bpm configuration problem. Also you can try out without FORK step. SO your bpm will be Recieve the message, Transformation step, send1 message and send 2 message in sequence. So that you can exactly findout problem with BPM design or something else..

Regards,

Moorthy

Former Member
0 Kudos

I'm sorry if it got confused. I believe message mapping has problem.

My message in Mapping step is as follows:

Source:

.Messages 1..1

..message1 1..1

...MT_Combined_File 1..1 DT_Combined_File

.....DT_State 1..1

.......State_Rec 0..unbounded

.....DT_Supplier 1..1

.......Supplier_rec 0..unbounded

Target:

.Messages 1..1

..message1 1..1

....MT_State 1..1

......State 1..1

.........state_rec 0..unbounded

..message2 1..1

....MT_Supplier 1..1

......Supplier 1..1

........Supplier_rec 0..unbounded

Message Mapping

DT_State -


> State

State_rec -


> State_rec

DT_Supplier-----> Supplier

Supplier_rec -


> Supplier_rec

Do you suspect any error in the mapping ?

While testing this interface I copied payload from SXMB_MONI into test tab and its not working.

Thanks for any help.

moorthy
Active Contributor
0 Kudos

Hi,

<i>While testing this interface I copied payload from SXMB_MONI into test tab and its not working.</i>

>>>This may be because while copying some special chars like - etc will come .. SO if you check the validity of the input xml, by saving as .xml and open it in the browser or go for any XML editor for this.

/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios

Or you can test by just giving the values in the tabular fields in the mapping and test it. Then check the source xml and findout what is the difference between sxmb_moni xml and given input xml..So this is the way you can debug the mapping problems..

btw, what is the output you are getting when you give just some inputs in the maping ? check this.. are you getting 2 messages..

Regards,

Moorthy

Former Member
0 Kudos

Hi, verified with xmlspy .They are valid as per xmlspy.

In the mapping step ( in SXMB_MONI ) Only 1 message created. 2nd message not created.

Message was edited by: Ram Krish

bhavesh_kantilal
Active Contributor
0 Kudos

RAm,

Check the follwoing,

1. The target of the Transformation Step is a MULTILINE element.

2. As for not being able to test your message copied from SXMb_MONI in the IR, this is because you need to Manually add the MESSAGES tag if you are going to do this..

instaed, just fill the test tab with the value in MONI and see if the split is happening. In real time XI itself will add and remove MESSAGES.

Also, check the File adapter for an error if any.

If it still doesnt work, remove the fork and try using 2 send steps one after the other and see if it works. if it does, then you can narrow down your problem to teh fork step.

Regards,

Bhavesh

Former Member
0 Kudos

Bhavesh,

Check the follwoing,

<u>1. The target of the Transformation Step is a MULTILINE element.</u>

My Target message lookslike

<DT_Supplier>

<Supplier_rec>WalMart1</Supplier_rec>

<Supplier_rec>WalMart2</Supplier_rec>

<Supplier_rec>WalMart3</Supplier_rec>

</DT_Supplier>

Do I have to have multiline container? If yes, how come its working for the other message in the same input file. Iam just wondering if we need multiline ?

<u>instaed, just fill the test tab with the value in MONI and see if the split is happening. In real time XI itself will add and remove MESSAGES.</u>

Testing works in test tab from SXMB_MONI values

<u>Also, check the File adapter for an error if any.</u>

All 3 adapters are working fine. 1 outbound and 2 Inbound. 2nd Inbound related to the error message says ""Receiver Adapter v2123 for Party '', Service 'BS_File_BPM':

Configured at 2006-08-23 22:54:50 EDT

No message processing until now "" which is true

<u>If it still doesnt work, remove the fork and try using 2 send steps one after the other and see if it works. if it does, then you can narrow down your problem to teh fork step.</u>

Sending one after the other works. So where is problem now?.. ( Fork end condition I gave 1=1 other than that there was nothing new )

<u></u><u></u>

bhavesh_kantilal
Active Contributor
0 Kudos

Ram,

<i>Sending one after the other works. So where is problem now?.. ( Fork end condition I gave 1=1 other than that there was nothing new )</i>

I dont think a condition is needed compulosrily in your FORK. So, just remove the END condition of your Fork and once both SEND steps are executed succesfully, BPM will coe out of the FORK.

SO, remove the CONDIITON in your FORK and test your scenario.

Regards,

Bhavesh

Former Member
0 Kudos

Bhavesh,

It worked perfect. I am using fork with 2 branches with NO end condition. Would you please eloborate what happens if there is no END condition?. Since Iam going to add more process steps ( such as synchronous calls) i really wanted to finsih the sending of both SEND steps in the FORK. If I dont give end condition, am I sure that those SENDS are processed before next process step following fork ?

bhavesh_kantilal
Active Contributor
0 Kudos

Ram,

Since Iam going to add more process steps ( such as synchronous calls) i really wanted to finsih the sending of both SEND steps in the FORK. If I dont give end condition, am I sure that those SENDS are processed before next process step following fork ?

BPM will come out of FORK only when all steps in all branches are executed succesfully.

If you give an END condition to the fork, then this is used when you are not sure for how long the steps in the fork should run, and so on.

http://help.sap.com/saphelp_nw04/helpdata/en/24/e2283f2bbad036e10000000a114084/content.htm



+You use a fork () when you want to continue a process in branches that are independent of each other, for example, to communicate with two systems that are independent of each other. The branches of the fork join in a union operator.

You can specify the required number of branches and then define whether the process must run through all branches, or just a particular number of branches. Furthermore, you can define an end condition for the fork (see also: Condition Editor).

As soon as a branch reaches the union operator at runtime, the system checks the following conditions in the specified order:

· The process has run through the required number of branches

· The specified end condition has returned true

The step is complete as soon as one of the conditions returns true.+

Earlier when you gave condition as 1=1 one of the steps was executed and it came out of the fork. So, do no give any condition and it will execute all steps in the FORK and come out as you want.

Regards,

Bhavesh

Former Member
0 Kudos

Perfect. Thanks a lot for your time. You explained so well that I couldn't ask you more.

Answers (0)