camel expression syntax

 camel expression syntax


https://help.sap.com/docs/integration-suite/sap-integration-suite/using-camel-simple-expression-language?q=camel%20expression


Cloud Integration supports a subset of the expressions defined in Camel Simple Expression Language (see https://camel.apache.org/components/next/languages/simple-language.htmlInformation published on non-SAP site ).

You can use Camel Simple Expression Language when configuring the following components:

Components that Support Camel Simple Expression Language
ComponentUse Camel Simple Expression to ...More Information

Content modifier

Define:
  • Message body

  • Message header

  • Exchange property

(Type parameter set to Expression)

Define Content Modifier

Write variablesDefine a variable.

(Type parameter set to Expression)

Define Write Variables

RouterDefine a routing condition.

(Expression Type parameter set to Non-XML)

Define Router

Content filter

Define conditions for XPath elements.

To review some examples, see Examples.

Define Filter

Expressions Supported by Content Modifier and Write Variables Step

The following table lists the expressions from Camel Simple Expression Language that are supported by the content modifier and write variables step.

ExpressionDescriptionExample

exchangeId

Exchange Id.

${exchangeId}

id

Message Id

${id}

body

Incoming message body

${body}

in.body

Incoming message body

${in.body}

bodyAs(<class>

Message body converted to compatible class

${bodyAs(String)}

mandatoryBodyAs(<class>)

Message body is Mandatory converted to compatible class

${mandatoryBodyAs(String)}

in.header.fo

Refers to foo (forward declaration) in header

${in.header.mandatory.length}

in.header.foo.OGNL

Refers to foo (forward declaration) in header with OGNL (Object-Graph Navigation Language) expresssion

${in.header.fname.split(',')[0]}

headerAs(<key>,<class>

Refers to header with name <key> converted to compatible class

${headerAs(name, String)}

property.foo

Refers to foo (forward declaration) in exchange property

${property.token.length}

property.foo.OGNL

Refers to foo (forward declaration) in exchange property with OGNL (Object-Graph Navigation Language) expresssion

${property.token.split(',')[0]}

sys.foo

Refers to foo (forward declaration) in system (runtime container)

${sys.file.separator}

sysenv.foo

Refers to foo (forward declaration) in system enviroment

${sysenv.property1}

date:<command>:<pattern>

Creates date specified in command and uses SimpleDateFormat notation

Processed at ${date:now-2h}

Othe rexample: To write the current timestamp into a message header, define a header with the following value (and Type set to Expression):

${date:now:yyyy-MM-dd HH:mm:ss}

date-with-timezone:<command>:<timezone>:<pattern>

Same as date, but with timezone

Expires at ${date-with-timezone:now+2h30m:IST:yyyy-MM-dd'T'HH:mm:ss.SSSZ}

Popular posts from this blog

pss book : శ్రీకృష్ణుడు దేవుడా, భగవంతుడా completed , second review needed. 26th April 2024

pss book: గురు ప్రార్థనామంజరి . completed 21st july 2024

pss book: కధల జ్ఞానము read review pending. 25th june 2024