diff --git a/en/docs/reference/mediators/about-mediators.md b/en/docs/reference/mediators/about-mediators.md index abdfb4f26..20eefeb89 100644 --- a/en/docs/reference/mediators/about-mediators.md +++ b/en/docs/reference/mediators/about-mediators.md @@ -48,12 +48,18 @@ WSO2 Micro Integrator includes a comprehensive catalog of mediators that provide Content aware/unaware - Generic mediators + Generic mediators Call mediator Conditionally content-aware + + + Variable mediator + + Conditionally content-aware + Property mediator diff --git a/en/docs/reference/mediators/variable-mediator.md b/en/docs/reference/mediators/variable-mediator.md new file mode 100644 index 000000000..e0dec8069 --- /dev/null +++ b/en/docs/reference/mediators/variable-mediator.md @@ -0,0 +1,88 @@ +# Variable mediator + +The Variable mediator is used to manage variables within a mediation flow. The Variable mediator allows you to set or remove variables, which can then be used later in the mediation flow. + +## Syntax + +```xml + +``` + +## Configuration + +The parameters available to configure the Variable mediator are as follows: + + + + + + + + + + + + + + + + + + + + + + + + + + +
Parameter NameDescription
Action

The action to perform on the variable.

+
    +
  • set: If this is selected, the variable will be set in the message.
  • +
  • remove: If this is selected, the variable will be removed from the message.
  • +
Name
+

The name of the variable. This name uniquely identifies the variable in the mediation flow.

+
Data Type
+

The data type of the variable. Available types are as follows:

+
    +
  • STRING
  • +
  • INTEGER
  • +
  • BOOLEAN
  • +
  • DOUBLE
  • +
  • FLOAT
  • +
  • LONG
  • +
  • SHORT
  • +
  • OM

  • +
  • JSON

  • +
+
ValueYou can give either a static value or a Synapse expression. +
+ +## Examples + +### Set a variable with a static value + +This example demonstrates setting a variable with a static value. + +```xml + +``` + +### Set a variable with an expression + +This example demonstrates dynamically setting a variable using an expression. + +```xml + + +``` + +### Remove a variable + +This example demonstrates removing a variable from the message. + +```xml + +``` diff --git a/en/mkdocs.yml b/en/mkdocs.yml index a9642bf33..0b73d19fc 100644 --- a/en/mkdocs.yml +++ b/en/mkdocs.yml @@ -862,6 +862,7 @@ nav: - Transaction Mediator: reference/mediators/transaction-mediator.md - URLRewrite Mediator: reference/mediators/urlrewrite-mediator.md - Validate Mediator: reference/mediators/validate-mediator.md + - Variable Mediator: reference/mediators/variable-mediator.md - XQuery Mediator: reference/mediators/xquery-mediator.md - XSLT Mediator: reference/mediators/xslt-mediator.md - Property Catalog: