Skip to Content
avatar image
Former Member

Multiple records using switch case

Hi...

I am having input file like

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

- <ns1:mt_out xmlns:ns1="http://Block">

- <Material>

<Item>0</Item>

<ItemName />

<ReqQty>0</ReqQty>

<AvailQty>0</AvailQty>

<Cost>0</Cost>

<suppid />

<suppname />

<leadtime>0</leadtime>

<matname>Y-351</matname>

<plantloc>2222</plantloc>

<date>2008-09-30T00:00:00</date>

<orderqty />

<warehouseloc />

<unit>KG</unit>

</Material>

- <Material>

<Item />

<ItemName />

<ReqQty>0</ReqQty>

<AvailQty>0</AvailQty>

<Cost>0</Cost>

<suppid />

<suppname />

<leadtime>0</leadtime>

<matname>Y-355</matname>

<plantloc>1111</plantloc>

<date>2008-09-30T00:00:00</date>

<orderqty />

<warehouseloc />

<unit>KG</unit>

</Material>

- <Material>

<Item />

<ItemName />

<ReqQty>0</ReqQty>

<AvailQty>1000.000</AvailQty>

<Cost>0</Cost>

<suppid />

<suppname />

<leadtime>0</leadtime>

<matname>Y-352</matname>

<plantloc>1100</plantloc>

<date>2008-09-30T00:00:00</date>

<orderqty />

<warehouseloc />

<unit>KG</unit>

</Material>

</ns1:mt_out>

In this input file it is having multiple records. Based on the AvailQty, the input file should go to the webservice. If the condition AvailQty is !=0, the the input file should go to the java webservice or else it should go to the .net webservice. In BPM i have used switch step for this. if i give the input file structure like above it is going to the java webservice only. It is not entering to the esle part.

Could you please help me out in this issue.

Thanks & Regards,

Leela

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Sep 30, 2008 at 01:42 PM

    Hi leelaratman,

    You have to do the switch step after splitting your message (multimapping 1:N). Otherwise (like in your example) switch step is evaluating

    AvailQty node of all the records of your message, and if the last one is not empty, the message will go to the java webservice

    and never to the .NET webservice.

    Carlos

    Add comment
    10|10000 characters needed characters exceeded