on 10-06-2008 4:22 AM
Hi,
Below is the input file i am having.
<?xml version="1.0" encoding="utf-8" ?>
-<ns2:MT_Receiver xmlns:ns2="File2RFC">
<Details>
<Availability>5000.000</Availability>
<Message />
</Details>
<Details>
<Availability>1000.000</Availability>
<Message />
</Details>
<Details>
<Availability>0</Availability>
<Message>Material Test not maintained in plant 1100</Message>
</Details>
</ns2:MT_Receiver>
I want to divide this input file into two parts based on one condition. If the Availability!=0, then it should display the available quantity. or else, it should get suppliers from the webservice.
For this reqiurement, i have used the switch case. but it is not working. It is considering only the last record, For eg, in this input file the last record is having Availabilty=0. So it should go to webservice and display the suppliers. But all the 3 records are going to the else branch and giving the supplier details.
Could you please tell how to resolve the issue.the Availability which is present should go to one branch and the remaining records should go to the else branch. Please help me in this regard.
Thanks in Advance
M.Leela Ratnam.
Edited by: leelaratnam morampudi on Oct 6, 2008 5:22 AM
Edited by: leelaratnam morampudi on Oct 6, 2008 5:22 AM
Edited by: leelaratnam morampudi on Oct 6, 2008 5:40 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
I guess for your scenario the design should be something like this.
Receive step:- to receive the input file.
Now this file will have multiple records and based on each record you need to decide which branch of switch to choose.
Hence you need a transformation step that will consists of a mapping, which will be 1:N.
Mapping will split the input file into multiple records.
The next step should be a multiline container to accumalate each record.
Now based on this multiline container use a block step, whose mode is set to forEach.
this block will loop for the number of records in multiline container.
In this block provide a switch that will satify your condition.
In both the branches of switch give your distinct send steps- one for .net and the other one for java.
regards,
Milan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Milan,
I have done the sceanrio like,
Receive step---Transformation step -
i got the output file as shown below.
<?xml version="1.0" encoding="utf-8" ?>
-<ns2:MT_Receiver xmlns:ns2="File2RFC">
<Details>
<Availability>5000.000</Availability>
<Message />
</Details>
<Details>
<Availability>1000.000</Availability>
<Message />
</Details>
<Details>
<Availability>0</Availability>
<Message>Material Test not maintained in plant 1100</Message>
</Details>
</ns2:MT_Receiver>
from this output file, i want to use the condition which i have mentioned in the forum. Please help me out in this issue.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
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.