cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with whitespace in Non-XML condition literals (SAP CPI)

r_herrmann
Active Contributor
0 Kudos

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.

View Entire Topic
MortenWittrock
Active Contributor

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

r_herrmann
Active Contributor

At the end I wrote a small Groovy Script. Hopefully the bug will be resolved soon.

DisplayName2
Participant
0 Kudos
2024 and bug is still alive