Friday 14 June 2019

Routing Condition formation in SAP CPI

Based on certain routing conditions the messages are directed to different receivers. Store the condition in any header or property values and call them in router dynamically. Different acceptable formats are below:

In Router configuration, mention the Expression Type: Non-XML


Usage of Operators in Non-XML Conditions


OperatorExample
=${header.SenderId} = '1'
!=${header.SenderId} != '1'
>${header.SenderId} > '1'
>=${header.SenderId} >= '1'
<${header.SenderId} < '1'
<=${header.SenderId} <= '1'
and${header.SenderId}= '1' and ${header.ReceiverId} = '2'
or${header.SenderId}= '1' or ${header.ReceiverId}= '2'
contains${header.SenderId} contains '1'
not contains${header.SenderId} not contains '1'
in${header.SenderId} in '1,2'
not in${header.SenderId} not in '1,2'
regex${header.SenderId} regex '1.*'
not regex${header.SenderId} not regex '1.*'



2 comments:

  1. Hi i have a doubt.

    I'm using a router with two branches: one default and one with a non-XML condition.

    But when i run the IFlow, the default condition does not work when it is supposed to, instead i get a result based on the non-XML condition.

    Is there a way to solve this issue?

    ReplyDelete
  2. Hi,

    Try to change the condition on the another route and also validate whether the logic in the router has any mistake.

    Mainly try to remove the router, save and deploy the ifow and then add it again might solve this issue.

    ReplyDelete