Approval workflow using splits & joins

amar singh July 13, 2011

Hi all,

I am trying to design a workflow in XML.

if an issue is created, it splits to 4 parts [ manager 1 approves, manager 1 rejects, manager 2 approves, manager 2 rejects]

if the manager 1 and 2 both approves it goes to step 1 if they rejects then it goes to step 8(closed).

I have designed the workflow based on http://confluence.atlassian.com/display/JIRACOM/Unordered+workflow+transitions+%28eg.+issue+approval%29 .

but this example only shows that only join leads to step 1, there is no step 8.

As in my case, I had to create 2 joins, one leading to step 1 and other leading to step 8. but it does not work. it still leads to step 2 but with a status of step 8.

I am posting the join statement maybe that's where the fault lies.

Can anyone help.

<joins>

<join id="1">

<conditions type="AND">

<condition type="beanshell">

<arg name="script">

"Finished".equals(jn.getStep(17).getStatus()) &amp;&amp;

"Finished".equals(jn.getStep(18).getStatus())

</arg>

</condition>

</conditions>

<unconditional-result old-status="Finished" status="Approved" step="2"/>

</join>

<join id="2">

<conditions type="AND">

<condition type="beanshell">

<arg name="script">

"Finished".equals(jn.getStep(19).getStatus()) &amp;&amp;

"Finished".equals(jn.getStep(20).getStatus())

</arg>

</condition>

</conditions>

<unconditional-result old-status="Finished" status="Closed" step="8"/>

</join>

 </joins>

2 answers

1 accepted

0 votes
Answer accepted
amar singh July 14, 2011

Do you know how to hide the transition through a post function ?

I was thinking that when one of the joins is executed, I will add a post function underneeth the unconditional result to hide the other transitions.

Thanks

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 14, 2011

You need to hide transitions using a condition. If the condition is not true, eg all sub-Approval records not in state Approved, then the condition won't be shown.

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2011

Hrm... splits and joins are not well supported in jira, eg I believe the bulk issue editor will fail. Approvals are best handled with sub-tasks in my opinion, with the appropriate post-functions to create them, and conditions to prevent the parent being moved forward. Permissions and notifications are much easier to handle too.

Suggest an answer

Log in or Sign up to answer