on 03-18-2020 12:16 PM
Currently I'm struggeling a bit with a Non-XML condition in a SAP CPI router. I try to check if a property "X" contains a specific String.
The expression I like to evaluate looks like:
${property.X} contains 'my token string'
Unfortunately this ends up with the following error:
Invalid format of condition expression value.
When rewriting the condition to the following, the error disappears:
${property.X} contains 'mytokenstring'
So I guess whitespaces aren't allowed in literals. The question is why? Neither in the CPI documentation nor in the Apache Simple documentation I can find a reference which tells that whitespaces aren't allowed?!
p.s.: I'm aware that I could solve the situation with a Groovy script, but I want to understand why the error above is raised.
Hi Raffael
That is indeed odd. Possibly a bug, even?
I guess as a workaround you could store ${property.X.contains("my token string")} or ${property.X.indexOf("my token string")} in a property before the router, and then route on the contents of that property. But elegant it definitely isn't.
Regards,
Morten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
At the end I wrote a small Groovy Script. Hopefully the bug will be resolved soon.
User | Count |
---|---|
72 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.