Hi guys,
i struggle with the following case. I have a "body" with some fields like
"title", "source" etc..
Now i would like to set a Property with the value in field "source". The
problem is, the field is optional, so it is not present always.
It works if it is present with
".setProperty("source").groovy("request.body.source")" but crash if field
"source" is not available .. But how can i enrich this part with the option
that "source" is not available. I tried null safe groovy syntax,
choice()/when() route and so on..
Can you please tell me the correct syntax to check if "request.body.source"
is available, if true, setProperty with the value.. if not present, ignore..
Thanks a lot for your help.
Best Regards
--
View this message in context:
http://camel.465427.n5.nabble.com/Problem-using-setProperty-with-groovy-on-optional-Field-tp5799222.html
Sent from the Camel - Users mailing list archive at Nabble.com.