I have an apache camel route that has a takes the key from a map entry (an int) and does a choice if the key is in the list. But I am getting an exception
.`when`(simple("\${body.key} in [123, 456]"))
Caused by:
org.apache.camel.language.simple.types.SimpleIllegalSyntaxException: Unexpected token 456 at location 23
${body.key} in [123, 456]
Can anyone see what I'm doing wrong?
I tried to replace in with 'contains'.
This worked:
.`when`(simple("'[123, 456]' contains \${body.key}"))