Hi,
I have a sequence of 5 rules that are executed for every login flow. As a part of refactoring the rules we are planning to move the common functions to a global variable so that they are defined only once. We plan on using the webtask containers global object to do the same. We know that the global object may be recycled anytime and we should not use it for long persistent storage. We had the below questions in relation to this:
- Will all the 5 rules run in the same webtask container per execution context? Can 2 rules run in one container and 3 others in another per login flow.
- If we define the function to the global object in the first rule, is it guaranteed that the same global object is available for all 5 rules. i.e the global object is not refreshed after executing 2 rules, making our common functions unavailable in the 3rd rule.