Execute transition flow

Issue #287 resolved
Andrey Kiyanovsky created an issue

Hi Fidel,

I'm trying to use "global itself" transitions as a procedure and it fails because it seems like current and new transitions are working in parallel, example:

  1. Current transition
  2. New transition
  3. Results

Can we have an option "wait until the transition is finished"?

Comments (5)

  1. Fidel Castro Armario repo owner

    Hi Andrey,

    Transition executions in JIRA works as transactions, and it's not possible to execute 2 transitions on the same issue at the same time. When you use "Execute transition" virtual field on current issue, behavior of "Execute transition (delayed execution)" is actually applied, i.e., transition "DefineParameters" is actually executed AFTER "current" transition.

    In the result screenshot you observe that PSTr1 and PSTr2 are set because they are already set due to a previous execution of transition "DefineParameters", and since no transition has been executed on parent issue, the ephemeral fields haven't been cleaned for parent issue.

    If you execute a transition on parent issue and then execute "current" transition on subtask, then you will see that PSTr1 and PSTr2 are empty, a second execution of "current" transition will show values for those 2 fields.

    Sorry, global reflexive transitions can't be used as procedures.

  2. Andrey Kiyanovsky reporter

    Thank you for the explanation, Fidel!

    Could you please clarify what's the difference between delayed and non-delayed "execute transitions/change status"?

  3. Fidel Castro Armario repo owner

    Hi Andrey,

    You can find explanations at "Virtual Fields" and at "Make Linked Issues and Subtasks Progress through its Workflows". Anyway, I will explain it with other words:

    1. Non-delayed fields (i.e., "Issue status" and "Execute transitions") execute a transition on other issues (not current one) immediately and synchronously. i.e., they use the same thread as current transition, so current transition execution is blocked until transition on other issue is completed. But when you use those fields on current issue, they behave as delayed fields, since you cannot execute two transitions at the same time on same issue.

    2. Delayed fields (i.e., "Issue status (delayed writing)" and "Execute transitions (delayed execution)") executes the transition on other issues, or current issue only once current transition has ended.

    This is a somehow simplified explanation, since when you execute a transition, you can also trigger new transition executions, if you have post-functions using virtual fields "Issue status", "Execute transition", ..., and then a cascade of executions may happen affecting a same issue. In these cases JIRA Workflow Toolbox uses a queue to guarantee that transition executions are done in correct order, and so it may occur that a non-delayed transition execution, becomes delayed once it enters in a queue, since it will have to wait for its turn to be executed.

  4. Andrey Kiyanovsky reporter

    Fidel,

    Thank you for such explicit explanation. I think these exceptions worth to be mentioned in the documentation.

    Best, AK.

  5. Log in to comment