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:

<Batch>

<DataBatch parent_reference = "3232" child_reference = "45" schema_Number = "03434211" status = "OK"><DataUnit>Format</DataUnit></DataBatch>

</Batch>

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

Now the issue is I need to check the attribute 'status' of DataBatch. 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.

Pls advice.

Cheers,

Ashish

Accepted Solutions (1)

Accepted Solutions (1)

former_member206604
Active Contributor
0 Kudos

Hi,

Yes you can use Status but with a proper XPATH of the status attribute.

Yor xpath would be

Batch/DataBatchparent/@status

Attributes can be accesed using @

thanks,

Prakash

Former Member
0 Kudos

Prakash,

I would like to bring to your notice that DataBatch is data between Batch, i.e XML string. So can i still use 'Batch/DataBatchparent/@status' in left hand operand and 'OK' in right hand operand.

Appreciate your patience.

Regards,

Ashish

former_member206604
Active Contributor
0 Kudos

Hi,

Sorry it should be 'Batch/DataBatch/@status'.I thought the node name is DataBatchparent instead of DataBatch.

You can go ahead with this XPATH and yes the left hand operand will be "OK".

Thanks,

Prakash

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks Prakash,

As I understand I have to use ~ expression.

But can I use it as ~ "status = "Ok"".

Regards,

Ashish

former_member206604
Active Contributor
0 Kudos

Hi,

You can use the condition editor to give the XPATH of the attribute of a node.

http://help.sap.com/saphelp_nw04/helpdata/en/67/49767669963545a071a190b77a9a23/content.htm

Thanks,

Prakash