File_4
File_4
Context
You perform this task when you have to specify conditions based on which the
messages are routed to a receiver or an interface during runtime. If the message
contains XML payload, you form expressions using the XPath-supported operators. If the
message contains non-XML payload, you form expressions using the operators shown in
the table below:
Operator Example
= ${header.SenderId} = '1'
!= ${header.SenderId} != '1'
Operator Example
in ${header.SenderId} in '1,2'
Recommendation
We recommend that you ensure that the routing branches of a router are configured with
the same type of condition, either XML or non-XML, and not a combination of both. At
runtime, the specified conditions are executed in the same order. If the conditions are a
combination of both non-XML and XML type, the evaluation fails.
Example:
Payload:
<Products>
<Product>
<CategoryID>1</CategoryID>
<Discontinued>false</Discontinued>
<SupplierID>1</SupplierID>
<UnitPrice>18.0000</UnitPrice>
<ProductName>Chai</ProductName>
<QuantityPerUnit>10 boxes x 20 bags</QuantityPerUnit>
<UnitsOnOrder>0</UnitsOnOrder>
<ProductID>1</ProductID>
<ReorderLevel>10</ReorderLevel>
<UnitsInStock>39</UnitsInStock>
</Product>
</Products>
First condition:
Output:
Second condition:
Output:
Third condition ' default':
Output:
Define Multicast
Context
You can use the Multicast step to send copies of the same message to multiple routes.
You can send copies to all routes at once using Parallel Multicast or in an order of your
choice using Sequential Multicast. This allows you to perform multiple operations on
the same message in a single integration process. Without Multicast, you needed
multiple integration processes to perform this task.
Procedure
1. In the palette, choose (Message Routing), then Multicast.
2. Choose Parallel Multicast or Sequential Multicast based on your requirement and
place the step inside the integration process. Define the message paths based on the
scenario.
Based on the order in which you define the message path, the system assigns names to
each message route branch as Branch 1, Branch 2, and so on.
3. If you want to specify a name for this step, enter the value in Name field.
4. If you are using Parallel Multicast, no further configuration is required for the multicast
step.
5. If you are using Sequential Multicast, you can change the order in which the message
should be sent to the Sequential Multicast branches:
b. Select the branch which you want to move up or down in the order.
The branch name is dependent on the order in which you have defined the message
path. If you change the order, the branch name will not change.
Example:
Parallel:
Runtime:
Sequential:
Runtime:
Note
To catch any exceptions thrown in the integration process and handle them, you can use
an Exception Sub process.
If an exception occurs during the processing sequence, which has been handled in an Exception
Sub process, the message status displayed in the message-processing log is failed.
When there is no error during exception handling, the message status displayed in the message-
processing log is completed.
If you like to configure your integration flow that way that the message status displayed
in the message-processing log is failed (even in case an exception occurs during the
processing sequence, which has been handled successfully in an Exception Sub
process), you have the following options:
▪ Use an Escalation End event (sets message status to Escalated in that case).
After this go to Pallets ->> Transformation ->> Content Modifier and add it to the Exception Sub Process.
In this Content Modifier, we need to declare variables in the message
header or exchange property and body, which we will get in alert mail.
Hello Team,
Note: I wontedly kept some error in this i-Flow to show the alert mail as
below.