on 06-20-2008 9:11 AM
Hi Friends,
I am doing File to File BPM scenario. My Source XML is like as below.
-
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Employee xmlns:ns0="http://www.test.com/XITEST/FileToFile/BPM">
<Details>
<EmpCode>10010</EmpCode>
<EmpName>Jeg</EmpName>
<Sex>M</Sex>
<BasicPay>5000</BasicPay>
</Details>
<Details>
<EmpCode>10011</EmpCode>
<EmpName>Praksh</EmpName>
<Sex>M</Sex>
<BasicPay>4500</BasicPay>
</Details>
<Details>
<EmpCode>10012</EmpCode>
<EmpName>Nithya</EmpName>
<Sex>F</Sex>
<BasicPay>4300</BasicPay>
</Details>
<Details>
<EmpCode>10013</EmpCode>
<EmpName>Sunil</EmpName>
<Sex>F</Sex>
<BasicPay>4800</BasicPay>
</Details>
<Details>
<EmpCode>10014</EmpCode>
<EmpName>Abdul</EmpName>
<Sex>M</Sex>
<BasicPay>4750</BasicPay>
</Details>
<Details>
<EmpCode>10015</EmpCode>
<EmpName>Sathya</EmpName>
<Sex>F</Sex>
<BasicPay>4250</BasicPay>
</Details>
<Details>
<EmpCode>10016</EmpCode>
<EmpName>Rams</EmpName>
<Sex>M</Sex>
<BasicPay>8000</BasicPay>
</Details>
</ns0:Employee>
-
If you look at the above message, the 3rd & 6th employee are female. In the BPM design, we use
a) 'Transformation' step, to split the messages (1:n).
b) Block Step (Mode : For Each) to process one by one message
c) in the Container Step, thru XPath expression we created one variable and assign 'Sex' to that variable
d) In the Switch step we check whether variable is 'F' (Female). If it is there we insert control step to throw exception. (But, exception Branch is not added to catch the exception. The reason is that to restart the BPM)
e) If the Sex is 'M' we insert Send Step to send the employee to the output file.
Note that if we insert exception handler branch, the BPM will tell this is completed. So, we are not able to restart those records (Sex = 'F') after correct Sex. Once the BPM is completed, that work item will not come in tcode 'Continue Process Following Error' option in tcode SXMB_MONI_BPE
Requirement is whenever the BPM encounters Sex = 'F', it should throw an error and the same time BPM should not stop and continue with the next records.
Friends, we tried all the ways thru 'Queue Assignment' property of the BPM and made settings thru tcode SWF_INB_CONF. But, we are not able to achive this requirmenent.
'Restart possibilitye of the BPM for the error record and the same time should process the remaining correct records'.
Any idea friends, to solve this issue.
Kindly Reply,
Jeg P.
Hi Sekhar
Collecting messages possible only in loop. (From help.sap.com, I understand this). But, in our case we do not know where the female records come in. So, How do we collect these femal records. ?
Kindly reply. Waiting your answer...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use one more Receiver Abstract interface for this and do the message and interface mapping .
Collecting :
If ur record is female (u r checking this in swich step) , pass tht record to intreface mapping (use one branch here to collect the message).
Else you send that message to the target(else branch)
After that use one block for collecting messages and throw the exception for each record......
Thanks Sekar. I will try your idea. One more thing, how will we send the collected data. Any idea ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why dont we do in this way........
1)Dont throw the exception in Female case.
2)If you get the male record just pass the record using send step.
3)If you get the Female record collect, all records instead of throwing exception in that step(you can use one more transformation to collect)
4)Finally you can use block to throw exceptions for female records.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.