cancel
Showing results for 
Search instead for 
Did you mean: 

content based routing

Former Member
0 Kudos

Hi Everyone,

I am working on a BPm scenario, where the data which I get in BPM is of the format:

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

<SubmitBatchPwResponse xmlns="http://AltInn.no/webservices/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<SubmitBatchPwResult> <b><?xml version="1.0"?><DataBatchInReceipt schemaVersion="1.0" batchId="sap12" enterpriseSystemId="826" <i><b>status="OK"</b></i> ><DataUnitInReceipt sendersReference="sap6" submissionReference="{0D68714D-DA80-4987-886C-540376BED791}" status="OK" timeReceived="2006-10-13T11:19:25"><Message><MessageEntry type="Default" logged="2006-10-13T11:19:26">Sendt til Altinn</MessageEntry></Message></DataUnitInReceipt></DataBatchInReceipt></b> </SubmitBatchPwResult>

</SubmitBatchPwResponse>

Where the bold part is the XML string inserted into SubmitBatchPwResult.

Now the issue is I need to check the attribute 'status' . If status is 'Ok' then the first branch of switch should execute or else the second branch should execute.

How can I check 'status' for it's value in switch condition.

I have tried various combinations but it doesn't work.

In the switch condition editor the following are the ones i have tried:

1) WSDL_1_RES./p1:SubmitBatchPwResponse/p1:SubmitBatchPwResult &#8776; *status="OK"

2) WSDL_1_RES./p1:SubmitBatchPwResponse/p1:SubmitBatchPwResult/p1:DataBatchInReceipt/@status &#8776; OK

3)WSDL_1_RES./p1:SubmitBatchPwResponse/p1:SubmitBatchPwResult/DataBatchInReceipt/@status &#8776; OK

Here WSDL_1_RES is the incoming abstract interface which contains the above mentioned message.

Pls advice.

Cheers,

Ashish

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I finally found the answer:

The XPATH expression has to be: <b>WSDL_1_RES./p1:SubmitBatchPwResponse/p1:SubmitBatchPwResult &#8776; status="OK"</b>

For the 2nd loop where I have to check that status is not OK, there i use the Xpath expression:

WSDL_1_RES./p1:SubmitBatchPwResponse/p1:SubmitBatchPwResult &#8776; status="++"*

This is because in second condition the status can be anything but OK and it has to be more than 2 characters as per the XSD provided by the webservice party.

Thanks Prakash for your continual assistance.

Cheers,

Ashish

former_member206604
Active Contributor
0 Kudos

Hi Ashish,

Thats really great buddy keep going.

Regards,

Prakash