wso2 / integration-studio

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

Esb Editor resets Sequence Template Parameters Attributes #1383

Open gspadotto opened 4 hours ago

gspadotto commented 4 hours ago

Description

When you open a Sequence Template with parameters that are mandatory, Esb Editor resets them to NOT mandatory with an empty string default value.

This is unfortunate because you risk to change the Sequence Templates without even realizing it.

This is an issue that is present since at least early 2022.

See: https://github.com/wso2/integration-studio/issues/998 https://github.com/wso2/integration-studio/pull/1005 (Did not fix the issue) https://github.com/wso2/api-manager/issues/630

Steps to Reproduce

Create a new Sequence Template, in the source panel add mandatory parameters and save it:

<?xml version="1.0" encoding="UTF-8"?>
<template xmlns="http://ws.apache.org/ns/synapse" name="ExampleTemplateWithMandatoryParameters">
    <parameter isMandatory="true" name="myMandatoryParameter"/>
    <sequence>
       <log level="simple">
           <property name="myMandatoryParameter" expression="$func:myMandatoryParameter"/>
       </log>
    </sequence>
</template>

Now open the Sequence Template with the graphical Esb Editor, switch to the source panel, the parameters have all the defaultValue="" isMandatory="false" attributes:

<?xml version="1.0" encoding="UTF-8"?>
<template name="ExampleTemplateWithMandatoryParameters" xmlns="http://ws.apache.org/ns/synapse">
    <parameter defaultValue="" isMandatory="false" name="myMandatoryParameter"/>
    <sequence>
        <log>
            <property expression="$func:myMandatoryParameter" name="myMandatoryParameter"/>
        </log>
    </sequence>
</template>

Version

8.3.0

Environment Details (with versions)

Integration Studio 8.3.0.202407171625

gspadotto commented 4 hours ago

Maybe @Tharsanan1 ?