Problem in the order of scripts execution
Hello,
In my workitem, two scripts run during the change of workitem's state (script1 and script2).
Script1 updates a customized attribute (customAttribute1).
Script2 updates an other customized attribute (customAttribue2) according to the value of customAttribute1.
How we can be sure that Script1 runs before Script2 ?
Accepted answer
Hi Francois,
can you clarify what kind of scripts? Is it script based calculated attributes or the like Attribute customization or are you talking about Operational behavior?
For script based Attribute Customization ( https://jazz.net/wiki/bin/view/Main/AttributeCustomization ) the rules as far as I have observed are, that any change on any attribute that is entered as a dependent attribute in the work item attribute will trigger the script to run.
* If script1 depends on the state (note you can not detect a state transition, but only detect the current state) after the state was set, script1 will run. Assuming it calculates the attribute value for customAttribute1 this would trigger all scripts dependent on that value.
* If script2 is dependent on customAttribute1 that would cause script2 to run.
If you are talking about operational behavior, then the order of the configured operations determines the order of execution. They will be run from top to down.
can you clarify what kind of scripts? Is it script based calculated attributes or the like Attribute customization or are you talking about Operational behavior?
For script based Attribute Customization ( https://jazz.net/wiki/bin/view/Main/AttributeCustomization ) the rules as far as I have observed are, that any change on any attribute that is entered as a dependent attribute in the work item attribute will trigger the script to run.
* If script1 depends on the state (note you can not detect a state transition, but only detect the current state) after the state was set, script1 will run. Assuming it calculates the attribute value for customAttribute1 this would trigger all scripts dependent on that value.
* If script2 is dependent on customAttribute1 that would cause script2 to run.
If you are talking about operational behavior, then the order of the configured operations determines the order of execution. They will be run from top to down.