In this lesson, you model the workflow so that the approval process can be run again after the workflow step
Edit Relocation Form Again (Employee)
. For this purpose, you set up a loop that directs the process back to the
Approve Relocation Form
step if the employee has completed the
Edit Relocation Form Again (Employee)
step
.
Open
the
Graphical Model
area in the
Workflow Builder
Choose the
Step Types That Can Be Inserted
menu bar.
Select the
Loop (Until)
entry. Hold down the left-hand mouse button to drag it into the
Graphical Model
area, onto the line before the
Edit Relocation Form (Administrator)
step.
The mouse pointer uses a plus symbol (+) to show you where you can insert the loop.
The detail view for the loop appears.
In the
Step Name
field, enter the following text:
Revised by author?
Choose the
Condition
area.
The
Change
Condition
dialog box appears. The condition that you are currently editing is displayed in the lower section of the dialog box. A red arrow identifies the condition that has just been edited is by.
Make a comparison with the value
PROCSTATE
in the Workflow Container.
Create the condition <
PROCSTATE
not equal to
RESENT
> as follows:
Double-click the value
PROCSTATE
in the Workflow Container.
The value
PROCSTATE
is copied to the condition line.
Choose
RESENT
from the
Constant
dropdown listand chooseEnter
The value
RESENT
is copied to the condition line.
In the
Operators
area, choose
Not equal to
.
The
Change Condition
dialog box should now resemble the figure below:
Choose
Transfer Condition
The following expression now appears in the
Condition
area:&PROCSTATE& ≠ RESENT
Note that after running the
Edit Relocation Form Again (Employee)
workflow step, the result of the condition query for the loop is
always RESENT. Even if the employee does not change the form, he or she can only choose
Send
. This produces a RESENT result, which causes the approval loop to run again.
The result of the condition query for the loop is only different to RESENT, if the
Edit Relocation Form Again (Employee)
workflow step is
not previously run.
Label the branches in the workflow template. Under
Outcomes
, enter descriptions for the outcomes
True
and
False
.
The following descriptions are used in our example:
True (Loop End):
Continue
False (New Loop Pass):
Revised by author
Choose
Transfer and Go to Graphic
Save and activate your workflow template.
Your workflow template now looks like the following figure:
The first process step in which the employee starts the process is outside of the workflow and is therefore not represented in this graphic. The
Edit Relocation Form (Superior)
step (which the figure shows as the first step) is the second step of the process.