on 09-08-2023 11:51 AM
Dear All,
I'm having issue with externalizing XPATH value for Filter step in CPI. Once it's externalized through Content Modifier or directly in filter step I'm getting below error during runtime. Is there a way to externalized XPATH Filter value succesfuly in CPI iFlow?
Error Details
org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: //RCVPRN = 'DEFIL'. Reason: javax.xml.xpath.XPathExpressionException: net.sf.saxon.trans.XPathException: Invalid character '&' in expression, cause: net.sf.saxon.trans.XPathException: Invalid character '&' in expressionBR, Piotr
Hi Piotr
I could not reproduce this. I was able to externalize an XPath expression in a Filter step with no problems. The specific expression you show here would not work regardless, would it? The boolean expression should probably go inside a predicate.
Regards,
Morten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Morten, thanks for checking, it was one of the examples that we tried during testing, finally we were able to use following XPATH:
/_-ABC_-DEF_DEBMAS[IDOC/EDI_DC40/RCVPRN = 'DEFIL']
but when we try to externalize it we get the same issues as above. So it works when this value is not externalized, but fails when it is externalized.
BR, Piotr
Hi piotr.radzki.3iii
That's odd. It looks like the apostrophes are getting translated into the XML character entity, which messes up the XPath expression. But that doesn't happen for me (I used apostrophes as well, for that reason).
I guess you did already delete the filter entirely and create a new one with the same result? You might need to create a support incident for this.
Regards,
Morten
piotr_radzki is this potentially an older flow where the filter step is executing differently and removing it from the flow and inserting the step again will solve your issue?
ryan.crosby2 7a519509aed84a2c9e6f627841825b5a looks like it is solved, I noticed in externalized parameter that value contained ' instead of proper apostrophe (came from bad copy paste?). Additionally I recreated the Filter step to avoid potential issues that is related to moving iFlow from one tenant to another and using old version of Filter block. All in all it worked finally 🙂 Thanks to both of you!
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.