Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Business Rules are Boolean expressions you write and apply to the lines that connect activities to one another at points where the process can flow in different directions depending on the conditions encountered by the activities. When you apply a Business Rule to an activity line, you are setting the conditions that determine whether the process can flow through that line or not.
To add business rules to workflows
Right-click anywhere on the white space of the workflow open in the Workflow Designer and
selectselect Workflow Business Rules
fromfrom the context menu.
Image Removed
Image AddedEnter a name for the Business Rule in the Workflow Business Rules window that opens and click on
thethe Add
buttonbutton.
Image Removed
Image AddedDouble-click the new rule to create an event handler for it.
Image Removed
Image AddedAdd code for the Business Rule in the C# Editor that opens.
Image Removed
Image Added
Apply the rule to activity lines
Right-click one of the lines proceeding from an activity where more than one outcome is possible and
choosechoose Select Line Rule
fromfrom the context menu.
Image Removed
Image AddedIn the Select Rule window that appears, from
thethe Rule
dropdrop-down list, select the rule. To have the process flow through the line when
aa false
conditioncondition is met, select the If Rule Not True option. Otherwise leave the option cleared.
Image Modified- Click
Click OK
toto close the Select Rule window.
Repeat the process for the second line proceeding from the same activity, this time setting
thethe If Rule Not True
optionoption to the opposite as that set for the first line.
The lines change color after the Business Rules are applied.
Image RemovedImage Added
Info | ||
---|---|---|
false | title | KeyOrange lines indicate that the attached business rule evaluates to false. Blue lines indicate that the attached business rule evaluates to true. Black lines indicate that there is no business rule applied. |
Div | |||||||
---|---|---|---|---|---|---|---|
| |||||||
IN THIS ARTICLE | topicTOC
Table of Contents | | maxLevel |
|
style | font-size: 1rem; margin-bottom: -65px; margin-left: 40px;text-transform: uppercase; |
---|
On this page
|