Previous Topic: Policy Order

Next Topic: Policy Description


Policy Order Example

This simple example demonstrates how policy ordering works. In this example, assume the policy rules are always evaluated.

If an event has multiple policies that are always evaluated, then for the event itself to be approved, all policies must be approved. However, if one policy associated with the event which has a policy evaluation type as ALWAYS is rejected, the event itself is rejected.

Note: If a policy associated with the even has an evaluation type as Onchange, only the changes associated with the attributes contained in that policy are rejected. The event itself is not rejected and the next policy in line is evaluated.

In this example, Policy1, Policy2, and Policy3 all have a policy evalutation type of ALWAYS. Policy1 evaluates to false, the workflow process named Process1 does not execute, and no work item is generated for User1. Event control immediately passes to Policy2. Policy2 and Policy3 both evaluate to true. Because of its higher priority, workflow Process2 runs first, and generates a work item for User2.

If User2 approves the work item, workflow Process3 runs and generates a work item for User3, who must then approve the work item for the event itself to be approved. These actions are shown in the following table:

Priority

Policy

Result

Workflow

Approver

Action

1

Policy1

False

Process1

User1

2

Policy2

True

Process2

User2

Approved

3

Policy3

True

Process3

User3

Approved

However if User2 rejects the work item, the event itself is rejected, and no work item is generated for User3, as shown in the following table:

Priority

Policy

Result

Workflow

Approver

Action

1

Policy1

False

Process1

User1

2

Policy2

True

Process2

User2

Rejected

3

Policy3

True

Process3

User3

Next, Policy1, Policy2, and Policy3 all have a policy evaluation type of ONCHANGE. If User2 rejects the work item, only changes associated with the attributes contained in Policy2 are rejected. Policy3 is then evaluated and Workflow Process3 runs and generates a work item for User3. If User3 rejects the work item, the event is rejected as all changes to this event were rejected. If User3 approves the work item, the event is approved and attribute changes contained in Policy3 get persisted.

Priority

Policy

Result

Workflow

Approver

Action

1

Policy1

False

Process1

User1

2

Policy2

True

Process2

User2

Rejected

3

Policy3

True

Process3

User3

Approved