EXEC Working Like INCLUDE for Library Actions

Wappler Version : 3.9.9
Operating System : W10
Server Model: NodeJS

Expected behavior

Library actions being usede as EXEC should be contained/encapsulate and NOT share any variables or other information from the SA where it is being called. It should run as a separate function which can access only its local variables or parameter variables.

Actual behavior

A variable created in SA, before EXEC is called, is also usable in the library SA.

How to reproduce

  1. Create a variable with set value called localization in main SA.
  2. Add an EXEC step to the library SA. Output ON.
  3. Inside the library SA, create another variable, say test, which will have its value set as {{localization}}. Output ON.
  4. On running the SA, you will see that EXEC step’s output shows the value from the step above, even though this value has not been sent to EXEC as param.
**SECOND RELATED ISSUE**

We also encountered an issue with using variables of SAME NAME in different library action EXEC, one below other. They all seem to share it.
So if one EXEC has variable some_data, and another EXEC defined a variable with exact same name - same_data with a value like:

{{same_data}} concatenated string here...

…the second EXEC concats value of previous EXEC some_data variable here, even though same_data should be a new variable for this EXEC step.

I assume if the encapsulated execution is fixed for EXEC - as described in the main issue, it will also fix the second issue.

Community Page
Last updated: