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

Update input and output parameters of Class, Script, Scatter gather and ForEach V2 #2310

Merged
merged 3 commits into from
Jan 28, 2025

Conversation

SanojPunchihewa
Copy link
Contributor

Purpose

Update input and output parameters of Class, Script, Scatter gather and ForEach V2

Scatter Gather

<scatter-gather parallel-execution="true" target="Body" result-enclosing-element="ScatterGatherResult" result-content-type="XML">
    <aggregation expression="${xpath('$body/node()')}" />
    <sequence></sequence>
    <sequence></sequence>
</scatter-gather>
<scatter-gather parallel-execution="true" target="Variable" target-variable="scatter_out" result-content-type="JSON">
    <aggregation expression="${payload}" />
    <sequence></sequence>
    <sequence></sequence>
</scatter-gather>

ForEach

<foreach collection="${payload.array}" parallel-execution="true" update-original="true" continue-without-aggregation="false" >
    <sequence></sequence>
</foreach>
<foreach collection="${payload.array}" parallel-execution="true" continue-without-aggregation="true">
    <sequence></sequence>
</foreach>
<foreach collection="${payload.array}" parallel-execution="true" update-original="false"  target-variable="foreach_out" result-content-type="XML" result-enclosing-element="ForEachResult" continue-without-aggregation="false">
    <sequence></sequence>
</foreach>

Class

<class name="org.example.Sample1" target="variable" target-variable="var1">
    <input>
        <argument name="username" value="John"/>
        <argument name="age" expression="${payload.data.age}"/>
        <argument name="confirmed" expression="${vars.status}"/>
    </input>
</class>

Script

<script function="sum_js" key="resources:js/sample_mediator.js" language="js" target="variable" target-variable="class_out">
    <inputs>
        <argument name="num1" value="12" type="INTEGER"/>
        <argument name="payload" expression="${payload.data}" type="JSON"/>
    </inputs>
</script>

@SanojPunchihewa SanojPunchihewa merged commit 3c7d8ef into wso2:master Jan 28, 2025
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