on 03-31-2016 10:01 PM
Hi Experts,
Issue: Condition Expression in Gateway used in iFlow is not working as expected.
While replicating Customers from C4C to ECC, we want to have a check to determine if the Customer already exists in ECC, if yes we want to terminate the process. If the Customer does not exist then we would like to go ahead with the replication.
In order to achieve this, while Customer is being replicated to ECC, we make a call to ECC to check the customer via Enterprise Service . If the response from ECC Contains the Customer ID then we skip the further processing of the iflow.
The condition Expression in the Gateway does not seem to work.
As shown below, we have defined a condition such that when the response does not contain element “ID”, then proceed with the process.
Thus condition expression is //ID = ‘’
When the Customer Exists, then terminate the flow. This route is flagged as default.
In the above example, response does not contain field “ID” and So the condition Expression //ID = ‘’ should be correct and process should proceed. However the iflow takes the default process and the process terminates.
In the below example condition expression “//ID” contains the value, Also the default route is chosen
So eventually iFlow does not seem to evaluate contion “//ID”. Any hint why the expression is not getting evaluated?
Hi Amber
If you press F1 on the Condition Expression field, it would provide help for that field, indicating you need to use XPath for that expression.
The XPath expression that you used //ID = '' basically means check for a node named ID which has blank value.
If you want to check if node ID does not exist at all, try the following XPath expression instead:-
count(//ID) = 0
Regards
Eng Swee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
You can mention the condition like below,
For Successful( having ID node )---- //ID and //ID != ''
//ID ----> Checks whether ID node exist in incoming XML.[ Returns true if it exist else false ]
//ID != '' ----> Checks whether ID node hold the value or not.
For Unsuccessful( without having ID node)---make it as default condition[ Since one of the gateway branch must contain default condition ]
Please revert back if you are still facing the issue.
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Eng,
Thank you for your assistance. it works with the condition expression Count(//ID) = 0. Appreciate your response.
What I don't get is.. I have declared in the Message Property of a Content Modifier as CUSTOMER_COUNT = Count(//ID) in sub flow.
when I try to use this in the parent flow using ${property.CUSTOMER_COUNT} = 0 , it does not seems to work. Can't I use the variables I declare in the property section of the Content Modifier of the Sub flow in Parent iFlow ??
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.