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 (59.1k23642)

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


permanent link
Ralph Schoon (59.1k23642) | answered Sep 17 '12, 9:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.

 


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.

Regards,

Comments
Ralph Schoon commented Sep 24 '12, 4:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Francois, please accept the answer then.

Your answer


Register or to post your answer.