Changes

Jump to: navigation, search

Workflow Condition Examples

2,090 bytes added, 19:29, 19 March 2013
Created page with 'There are two rules that should be followed when adding multiple connectors to a workflow task that incorporate conditional logic statements: # Collectively, the conditions on ea…'
There are two rules that should be followed when adding multiple connectors to a workflow task that incorporate conditional logic statements:
# Collectively, the conditions on each task should accommodate every possible permutation.
# Each condition should be mutually exclusive from every other.

Let's discuss each of these rules.

==Rule #1: Collectively, the conditions on each task should accommodate every possible permutation.==


A logical statement can be added to workflow connectors in the Condition field, enabling you to specify which workflow task will be triggered.

'''Example'''
Branching Logic can be implemented to send an approval message to Senior Management when the request is over $100,000, while requests under $100,000 will take a different path when the workflow is triggered.

[[Image:newconnector.jpg]]

In general the Workflow Condition is used with several different connectors attached to a task. Collectively the conditions on each task should accommodate every possibility.
*'''Note''': because the sequence in which the system accesses each connector is not configurable '''it is important that the conditions are mutually exclusive'''. For example, if you have 3 connectors for different paths based on a particular value the conditions could be:
:* '''"@Selection@"="Yes"'''
:* '''"@Selection@"="No"'''
:* '''"@Selection@"!="Yes" and "@Selection@"!="No"'''
:::* The last statement could also be represented as '''"@Selection@" not in ("Yes","No")'''



==Sample Conditions==
* '''@Request Amount.value@>100000'''
* '''"@date(fullstartdate)@">"2013-01-01"'''
* '''"@date(currentdate)@">"@system.submission deadline@"'''

You can also use MYSQL syntax to perform calculations within the Condition:
* '''date_format(now(),"%d")="01"'''
::* This condition will be true only on the 1st of the month. This could be used with a '''[[Recurring Workflow]]''' that loops daily if you wish to send out a summary e-mail on the 1st of every month. See [[Recurring Workflow|here]] for further details.

=See Also=
* [[Workflow Condition]]

[[Category:Workflows]]
8,849
edits

Navigation menu