Skip to Content
avatar image
Former Member

Content based routing

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 11, 2006 at 06:50 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • avatar image
    Former Member
    Oct 11, 2006 at 06:31 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 11, 2006 at 06:44 PM

    Thanks Prakash,

    As I understand I have to use ~ expression.

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

    Regards,

    Ashish

    Add comment
    10|10000 characters needed characters exceeded