wso2 / integration-studio

WSO2 Integration Studio is a development environment used to design integration scenarios and develop them.
Apache License 2.0
61 stars 53 forks source link

Fix intermittent validation issues in source view #1294

Closed SanojPunchihewa closed 2 months ago

SanojPunchihewa commented 2 months ago

Purpose

Fix intermittent validation issues in source view.

When a comment is added inside a nested mediator like clone, the current mediator was not added to the stack which has led to validation issues.

<clone>
    <target>
        <sequence>
            <property action="remove" name="Content-Encoding" scope="transport"/>
        </sequence>
    </target>
    <target>
        <sequence>
            <sequence key="Sequence_1"/>
            <property expression="get-property('value')" name="uri.var.value" scope="default" type="STRING"/>
            <property action="remove" name="Content-Encoding" scope="transport"/>
            <header expression="get-property('XSRF_TOKEN')" name="X-XSRF-TOKEN" scope="transport"/>
            <!--Set Cookie header -->
            <call>
                <endpoint>
                    <http method="get" uri-template="some_url">
                    </http>
                </endpoint>
            </call>
        </sequence>
    </target>
</clone>

Fixes: https://github.com/wso2/micro-integrator/issues/3313