Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new variable mediator #2225

Merged
merged 1 commit into from
Nov 5, 2024

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