Skip to content

Conversation

@SanojPunchihewa
Copy link
Contributor

@SanojPunchihewa SanojPunchihewa commented Oct 23, 2024

Purpose

Add a new mediator called variable to define variables in the message context.

Synapse configuration

<variable name="string" [action=set/remove] (value="literal" | expression="expression") type="dataType"/>

Default action is set
Allowed data types are: STRING, BOOLEAN, INTEGER, LONG, SHORT, FLOAT, DOUBLE, OM, JSON

Sample XML configs will be as follows,

<variable name="json-array" value="[]" type="JSON"/>
<variable name="var1" expression="json-eval($.result.food)" type="JSON"/>

@SanojPunchihewa SanojPunchihewa merged commit adb32f3 into wso2:master Nov 5, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants