It's all about the answers!

Ask a question

Problem in the order of scripts execution

Francois Beignon (313) | asked Sep 12 '12, 9:29 a.m.
edited Apr 08 '13, 12:49 p.m. by Ralph Schoon (63.2k33646)

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

permanent link
Ralph Schoon (63.2k33646) | answered Sep 17 '12, 9:02 a.m.
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 ( ) 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.


Francois Beignon selected this answer as the correct answer

One other answer

permanent link
Francois Beignon (313) | answered Sep 24 '12, 4:16 a.m.
Hello Ralph,
I tried your solution and it's OK.
Thank you for your help.


Ralph Schoon commented Sep 24 '12, 4:25 a.m.

Francois, please accept the answer then.

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.