on 01-13-2016 11:12 AM
Hello
I have the following xml and require this condition to be given in the condition editor of receiver determination.
But it is not working.
(/podPoc/journey/site/task/@taskName = Asset Returns AND /podPoc/journey/site/task/activity/@activityName EX AND /podPoc/journey/site/task/activity/@number EX )
The XML file below
-<task imageNo="TR010000008739B82581B83B0268C187D9A7EBAA15BD140A1819F7675D" taskEndTime="2016-01-03T02:56:59.827" taskStartTime="2016-01-03T02:56:46.070" taskName="Asset Deliveries">
<activity number="2.000" text="" activityName="BB Basket"/>
</task>
The receiver should be determined if the task name ='Asset Deliveries' and has values in activity number/text/activityname. Sometimes the attribute might not come or be empty.
Let me know whether these can be handled via condition editor else i might need to create enhanced RD via mapping.
Regards
Sam
Hi Sam,
Try like below.
Xpath./podPoc/journey/site/task/@taskName = "Asset Returns" AND EXISTS(Xpath./podPoc/journey/site/task/activity/@activityName) AND EXISTS(Xpath./podPoc/journey/site/task/activity/@number)
Regards,
Praveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Praveen
thanks for the screenshots, unfortunately, it still doesn't work for me.
Please find relevant screenshots where it still creates the receiver.
Regards
Sam
1st screenshot - Condition where you can see no prefix is needed as it does not show any p1.
2nd sreenshot -
Actual Payload
Appreciate if you can let me know any other alternatives or UDF to sort this out in receiver mapping.
Regards
Sam
Hi Sam,
If you want to check existence of number and activityName under the specific task then use below condition.
Just paste the below xpath condition in the box i shown you below.
/podPoc/journey/site/task[(@taskName="Asset Returns") and (count(activity/@number) > 0) and (count(activity/@activityName) > 0)]
Use exists operator like below, The condition should be like below.
It works for me, try your side and let me know.
Regards,
Praveen.
Thanks Praveen
that worked
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
It is not working.
I have decided to handle it via mapping. Still not working via mapping.
Can someone give me a simple udf to handle this.
Regards
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.