Can you tell me how I can model a workflow in such a way that it loops back to a step that completed a few steps ago?In another words supportconditional branching in workflow

Can you tell me how I can model a workflow in such a way that it loops back to a step that completed a few steps ago?In another words supportconditional branching in workflow

book

Article ID: KB0084878

calendar_today

Updated On:

Products Versions
TIBCO InConcert -
Not Applicable -

Description

Resolution:
For example, consider the following:
Step 1
Step 2
Step 3
Step 4
Step 5

Let's say that this is a serial workflow, so that 1 goes to 2 goes to 3, etc.  
However, steps 4 and 5 both have APPROVE attributes, and if the user sets
APPROVE to FALSE, then it branches back.  If step 4 is not approved, then I
want it to branch back to step 2, and if step 5 is not approved then I want it
to branch back to step 3.

Is this possible in your user interface?  Does your data model support
such loopbacks?

3 approaches within present model

Your example can be programmed in the following way using sub-tasks:

Make Step 3 a sub-task of Step 2.
Make Steps 4 and 5 sub-tasks of Step 3.
Have the Step 5 Perform Condition require APPROVE_4 to be TRUE.
Have Step 3 iterate while APPROVE_5 is FALSE.
Have Step 2 iterate while APPROVE_4 is FALSE.

A more general but more cumbersome (and not generally recommended)
approach would be to create a process attribute NEXT_STEP.  All steps
would be sub-tasks of a top-level task ("Step 0").  Each step (other than
Step 0)  would then require a Perform Condition: Step 1 would be performed
if NEXT_STEP were equal to 1, Step 2 if NEXT_STEP were equal to 2, etc.
Each step would set NEXT_STEP to the corresponding next step to be
executed, or to 0 if the workflow was to terminate.  Step 0 would iterate
while NEXT_STEP was a non-zero value.

In general, it is recommended to design the work-flow using sub-tasks
as in the first approach above.  This should reduce the additional code
required to enable the correct flow of control.

[third approach follows]
InConcert 3.6.2 and above supports Iteration and may able to support the
situation you described.

Job level attributes:
APPROVE_2 (fail to step 2)
APPROVE_3 (fail to step 3)

Task_A (parent container of steps 1-5)
(Iterate condition:  APPROVE_2 = "FALSE" OR APPROVE_3 = "FALSE" )


STEP_1 (perform condition:  APPROVE_2 = "" AND APPROVE_3 = "" )
STEP_2 (perform condition:  APPROVE_2 = "" OR APPROVE_2 = "FALSE" )
STEP_3 (perform condition:  APPROVE_3 = "" OR APPROVE_3 = "FALSE" )
STEP_4 (perform condition:  APPROVE_2 = "" OR APPROVE_2 = "FALSE" )
STEP_5 (perform condition:  APPROVE_3 = "" OR APPROVE_3 = "FALSE" AND APPROVE_2 = TRUE )

Logic:
1.  Root Task is set to AutoActivate = TRUE; Root Task is Activated
2.  Task_A is set to AutoActivate = TRUE; Task_A is Activated
3.  STEP_1 has no precidents and peform condition is evaluated to true; STEP_1 cycles from Wait to Ready
4.  STEP_1 is acquired by a client and completed; STEP_1 is done.

5.  STEP_2 perform condition is evaluated (APPROVE_2 = ""); STEP_2 cycles from Wait to Ready
6.  STEP_2 is acquired by a client and completed; STEP_2 is done.

7.  STEP_3 perform condition is evaluated to true (APPROVE_3 = ""); STEP_3 cycles from Wait to Ready
8.  STEP_3 is acquired by a client and completed;  STEP_3 is done.

9.  STEP_4 cycles from Wait to Ready
10. STEP_4 is acquired by a client and APPROVE_2 is set to "FALSE" and completed;  STEP_4 is done.

11. STEP_5 perform condition is evaluated to false, (APPROVE_2 = "FALSE") so skip STEP_5
12. Task_A is evaluated for iteration, iterate is evaluated to true, STEP_1 is cycled from done to wait
13.  STEP_1 perform condition is evaluated to false, (APPROVE_2 <> "") therefore skip STEP_1

14. STEP_2 perform condition is evaluated to true, (APPROVE_2 = FALSE), therefore cycle from done to wait to ready
15. STEP_2 is acquired by client and completed;  STEP_2 is done

16. STEP_3 perform condition is evaluated to true, (APPROVE_3 = ""), therefore cycle from done to wait to ready
17. STEP_3 is acquired by client and completed;  STEP_3 is done

18. STEP_4 perform condition is evaluated to true, (APPROVE_2 = "FALSE"), therefore cycle from done to wait to ready
19. STEP_4 is acquired by client and APPROVE_2 is set to "TRUE" and completed;  STEP_4 is done.

20. STEP_5 perform condition is evaluated to true, (APPROVE_3 = "" AND APPROVE_2 = "TRUE"); therefore cycle from skip to wait to ready


I think this should work.  InConcert is a linear workflow design, therefore we don't loop to previous steps.  The only thing that you will want to think about, is that when the iteration is performed on Task_A, some of the metrics will be overwritte
n (like STEP_1 task time completed).  Therefore, you may want to collect the metrics as STEP_6 before you recycle to STEP_1.

Peform Condition evaluation is carried out between the wait and ready condition
Iterate Condition evaluation is carried out between the Activated/Acquired and the Complete condition.

Environment

Product: TIBCO InConcert Version: All OS: All --------------------

Issue/Introduction

Can you tell me how I can model a workflow in such a way that it loops back to a step that completed a few steps ago?In another words supportconditional branching in workflow