Categories
#Resource expression

Separation of duties

We have previously outlined an expense report example.

However, we would like to specify that a manager cannot approve their own expense report. As a manager is also an employee, they could otherwise end up approving their own expense report.

This example explains how we can create a rule that prevents the same user from performing different actions.

In the resource panel, we can enter a "User Expression", also called a resource expression, as shown below:

We can enter the expression,

__USER__ != FilloutExpenseReport@UserId

along with an error message to display if the rule is broken.

"__USER__" refers to the user executing the activity. We assume that the IT system can provide a unique ID for each user. FilloutExpenseReport@UserId refers to the ID of the user who executed the activity "FilloutExpenseReport". If nobody has executed the activity, the value will be null.