Conditions and Loops

Print this Topic  Previous Topic Home Topic Next Topic
You are here: Globodox Workflow >Conditions and Loops

Condition And Loops are used in a workflow to decide if a Task (or a group of Tasks) should be performed and if it should be performed multiple times.

If-Then
The If-Then block can be used to specify that a Task (or a group of Tasks) must only be performed when the specified condition is satisfied. For example you can setup a rule like...

[Send Document To John For Approval]

 
IF [Document Has Been Approved By JohnTHEN

[Send Document to Mary for Approval]

END IF
 

See, Create a Workflow using the If-Then block

IF-Then-Else
The If-Then-Else block can be used to specify that a Task (or a group of Tasks) must only be performed when the specified condition is satisfied and another Task (or a group of Tasks) must be performed when the specified condition is not satisfied. For example you can setup a rule like...

[Send Document To John For Approval]

 
IF [Document Has Been Approved By JohnTHEN

[Send Document to Mary for Approval]

ELSE

    [Send Document to Jack for Approval]

END IF
 

See, Create a Workflow using If-then-else block

If-Then-Repeat Tasks
The If-Then-Repeat block can be used to specify that a Task (or a group of Tasks) must be performed repeatedly if the specified condition is satisfied (the Workflow Engine will perform the tasks repeatedly until the specified condition is no more satisfied) . For example you can setup a rule like...

[Send Document To John For Approval]

 
IF [Document Has Not Been Approved By JohnTHEN

    [Send Document to Mary for Approval]

    [Send Document to John for Approval]

REPEAT TASKS
 

Note: In the example above the Workflow Engine will keep sending the document to Mary and then John for approval until the document is approved by John.
 

See, Create a Workflow using the If then Repeat task block

Do Tasks-Repeat-If
The Do Tasks-Repeat-If block can be used to specify that a Task (or a group of Tasks) must be performed at least once and repeated if the specified condition is satisfied (the Workflow Engine will perform the tasks repeatedly until the specified condition is no more satisfied) . For example you can setup a rule like...

 

 
DO TASK

    [Send Document to Mary for Approval]

    [Send Document to John for Approval]

REPEAT IF [Document Has Not Been Approved By John]
 

Note: In the example above the Workflow Engine will keep sending the document to Mary and then John for approval until the document is approved by John.
 

See, Create a Workflow using the Do Task Repeat If block

 
Specifying Conditions for the Approve Documents Task
 
You can specify conditions to If block based on the result of Approve Documents task. For e.g. you can tell the Workflow to perform a certain task when the document is approved and perform another task when it is rejected.

The Approve Task has the following parameters...

Approved:

Use this parameter to check if the document has been approved or rejected by the approver and based on the result you can ask the system perform the next task

Comments:

Use this parameter to check the comment of the approver and based on the comment written you can ask the system perform the next task.

Approval Date:

Use this parameter to check the date when the document was approved and based on the date of approval you can ask the system perform the next task.

Details:

Use this parameter to check the comments of all the approvers of the document and based on the comments written you can ask the system perform the next task.

Approved Parameter: To use the Approved parameter type the following in Condition box of the If block

[Task Name].[Parameter][Operator][Field Value]

e.g. 1: ApprovalFromTheSupervisor.Approved=Yes

where, ApprovalFromTheSupervisor is the Task Name

Approved is the parameter

= is the Operator

Yes is the value

e.g. 2: ApprovalFromTheSupervisor.Approved=No

The following operators are available for the Approved task

= equal to
<> not equal to

By default the initial value of the conditions will be set to Null.

Tip: You can also enter two conditions by using AND/OR operators. For e.g.

ApprovalFromTheSupervisor.Approved=No AND ApprovalFromJohn.Approved=Yes

ApprovalFromTheSupervisor.Approved=Yes OR ApprovalFromJohn.Approved=Yes

 

Approval Date Parameter: To use the Approval Date parameter type the following in Condition box of the If block

[Task Name].[Parameter][Operator][Field Value]

e.g. 1: ApprovalFromTheSupervisor.Approval Date=01/20/2009

where, ApprovalFromTheSupervisor is the Task Name

Approval Date is the parameter

= is the Operator

01/20/2009 is Value (date format mm/dd/yyyy)

e.g. 2: ApprovalFromTheSupervisor.Approval Date>=01/20/2009

The following operators are available for the Approval Date task

= Approved On
<> Not  Approved On
> Approved before
>= Approved before or On
< Approved After
<= Approved After or On

By default the initial value of the conditions will be set to Null.

Details Parameter: To use the Details parameter type the following in Condition box of the If block.

[Task Name].[Parameter][Operator][Field Value]

e.g: ApprovalFromTheSupervisor.Details Like Approved

where, ApprovalFromTheSupervisor is the Task Name

Details is the parameter

Like is the Operator

Approved is Value

The following operators are available for the Approval Date Paramter

= Equal to
<> Not equal to
Like Contains

By default the initial value of the conditions will be set to Null.

 
Specifying Conditions for the Get YesNo Field Value and Set YesNo Field Task

You can specify conditions to If block based on the value in the field that is specified in the Get YesNo Field Value (or Set YesNo Field Value) task. For e.g. you can tell the Workflow to perform a certain task when the value of the field is Yes and perform another task when the value of the field No.

The Get YesNo Field Value and the Set YesNo Field Value Task has the following parameters...

Value

Use this parameter to check the value of the specified YesNo field and based on the value you can ask the system perform the next task

To use the Value parameter, type the following in Condition box of the If block

[Task Name].[Parameter][Operator][Field Value]

e.g. 1: GetInvoicePaid.Value=Yes

where, GetInvoicePaid is the Task Name
Value is the Parameter
= is the Operator
Yes is the Field Value

e.g. 2: GetAmount.Value<'800'

e.g. 3: GetAmount.Value>'=800'

The following operators are available for the Value Parameter of the Get YesNo Field Value (or Set YesNo Field Value) task.

= Equal to
<> Not equal to

By default the initial value of the conditions will be set to Null.

 
Specifying Conditions for the Get DateTime Field Value and Set DateTime Field Task

You can specify conditions to If block based on the value in the field that is specified in the Get DateTime Field Value (or Set DateTime Field Value) task. For e.g. you can tell the Workflow to perform a certain task when the value of the field corresponds to a certain value and perform another task when the value of the field does not correspond to that value. .

The Get DateTime Field Value and the Set DateTime Field Value Task has the following parameters...

Value

Use this parameter to check the value of the specified DateTime field and based on the value you can ask the system perform the next task

To use the Value parameter, type the following in Condition box of the If block

[Task Name].[Parameter][Operator][Field Value]

e.g. 1: GetInvoiceDate.Value=01/20/2009

where, GetInvoiceDate is the Task Name

Value is the parameter

= is the Operator

01/20/2009 is Value (date format mm/dd/yyyy)

e.g. 2: GetInvoiceDate.Value>=01/20/2009

The following operators are available for the Value parameter of the Get DateTime Field Value (or Set DateTime Field Value) task

= Approved On
<> Not  Approved On
> Approved before
>= Approved before or On
< Approved After
<= Approved After or On

By default the initial value of the conditions will be set to Null.

 
Specifying Conditions for the Get Numeric Field Value and Set Numeric Field Task

You can specify conditions to If block based on the value in the field that is specified in the Get Numeric Field Value (or Set Numeric Field Value) task. For e.g. you can tell the Workflow to perform a certain task when the value of the field is equal to a certain value and perform another task when the value of the field is not equal to that value.

The Get Numeric Field Value and the Set Numeric Field Value Task has the following parameters...

Value

Use this parameter to check the value of the specified numeric field and based on the result you can ask the system perform the next task

To use the Value parameter, type the following in Condition box of the If block

[Task Name].[Parameter][Operator][Field Value]

e.g. 1: GetAmount.Value='800'

where, GetAmount is the Task Name
Value is the Parameter
=is the Operator
800 is the Field Value

e.g. 2: GetAmount.Value<'800'

e.g. 3: SetAmount.Value>'=800'

The following operators are available for the Value Parameter of the Get Numeric Field Value (or Set Numeric Field Value) task.

= Equal to
<> Not equal to
> Greater than
>= Greater than equal to
< Less than
<= Less than equal to

By default the initial value of the conditions will be set to Null.

 

Specifying Conditions for the Get Text Field Value and Set Text Field Task

You can specify conditions to If block based on the value in the field that is specified in the Get Text Field Value (or Set Text Field Value) task. For e.g. you can tell the Workflow to perform a certain task when the value of the text field is contains a certain value and perform another task when the value of the field is not contain that value.

The Get Text Field Value and the Set Text Field Value Task has the following parameters...

Value

Use this parameter to check the value of the specified text field and based on the result you can ask the system perform the next task

To use the Value parameter, type the following in Condition box of the If block

[Task Name].[Parameter][Operator][Field Value]

e.g: ApprovalFromTheSupervisor.Details Like Approved

where, ApprovalFromTheSupervisor is the Task Name

Value is the parameter

Like is the Operator

Approved is Value

The following operators are available for the Value parameter of the Get Text Field Value (or Set Text Field Value) task

= Equal to
<> Not equal to
Like Contains

By default the initial value of the conditions will be set to Null.
 


Related Topics

Workflow Designer
Workflow Monitor

General Activities (Tasks)

 

 


Page URL: https://www.globodox.com/support/help/index.htm?conditions_and_loops.htm