Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To add the Switch mediator, click Add Child or Add Sibling in the sequence, and then click Filter -> Switch.

Here are the options The parameters available to configure the Switch Mediator:mediator are as follows.

Parameter NameDescription
Source XPath

...

The source XPath or JSONPath to be evaluated. When specifying a JSONPath, use the

...

format json-eval(<JSON_PATH>), such as json-eval(getQuote.request.symbol). For more information on using JSON with the ESB,

...

see JSON Support. If you

...

...

 in the expression,

...

click Namespaces

...

 and map the namespace prefix to the correct URI.
Number of cases

...

This parameter displays the number of cases

...

currently added to the Switch mediator configuration.

...

...

for instructions to add a case.

 

Specify default caseClick this link to add a default switch-case mediator. Adding a default switch case mediator is optional. If it is specified, it will be executed if no matching switch-case is identified.

 

Switch-case mediator
Anchor
Switch-Case Mediator
Switch-Case Mediator

After clicking Add case in the parent Switch mediator, click the Case node that is added to the tree, and then specify the regular expression to use to match the switching value.

Image Removed

...

  1. To add a case, click Add case, which adds an empty switch-case mediator under the Switch mediator. A switch-case mediator would appear as a child of the Switch mediator in the mediator tree as shown below.
    Image Added 
  2. Click Case to configure the switch-case mediator. The page will expand to display the section shown below where a regular expression can be added in the Case Value (Regular Expression) parameter.
    Image Added 
  3. Click Case again and click Add Child, and add the mediator(s) you want to execute when this case matches the switching value.

 

...

Example

The following example uses the Property mediator to set the local property named "symbol" on the current message depending on the evaluation of the string.

...