Example of Defining Multiple Approval Rules Based on Project Roles
Suppose you want to define multiple approval rules based on project roles, as follows:
-
If the submitter has the project manager role on the project, then the budget version must be auto-approved.
-
If the submitter has the project administrator role (not project manager role) on the project, then the budget version must be routed to the project manager for approval.
You then need to edit the predefined rule set to define a couple of additional rules that use advanced mode with pattern matching.
- In the Setup and Maintenance work area, go to the Manage Task
Configurations for Project Financial Management task.
The BPM Worklist tool is displayed.
- In the Tasks to be configured pane, search for the ApprovePlanVersion task, and click the ApprovePlanVersion link.
- Click the Edit Task icon in the Tasks to be configured pane to open the task in edit mode.
- Click the Assignees tab.
The participants who must approve project budgets or forecasts are displayed. Click on each of these participants to review the workflow rules that apply to their approval choices.
- Click the Approver participant in the workflow, click
the Go to Rule (the diamond shaped) icon within the
Approver box, and then click the Go to Rule option
that appears.
The list of rules associated with the Approver participant are displayed. Ensure that the BudgetForecastAMXRuleSet rule is selected in the drop-down list.
- Change the IF condition of the predefined rules from 1 is 1 to 1 is 2 to disable the predefined workflow from sending project budget or forecast approvals to the project manager for approval.
- Add the approval rule, as follows:
- In the Rules pane, click the Advanced Add or Modify Options (the + icon) drop-down list and select General Rule.
- Click the Properties link, enter ProjectRoleBasedApproval in the Name field and add the description.
- Select Medium from the Priority drop-down list, select the Advanced Mode checkbox, verify that the Active checkbox is selected, and click OK.
- In the IF part of the rule:
- Click Insert Pattern, then enter Lists in the left box and select Lists from the drop-down list.
- Click the Add Pattern icon, then enter Task1 in the left box and select Task from the drop-down list.
- Click the Add Pattern icon and select Surround from the Surround selected tests with parenthesis drop-down list that's adjacent to the Add Pattern icon you just clicked.
- Select None from the drop-down list below and.
- Enter ProjectTeamMember1 in the left box and choose ProjectTeamMember from the drop-down list in the pattern.
- Click the Advanced Add or Modify
Options drop-down list and select
simple test, and add the IF
conditions within the same pattern as follows:
Value to Enter in the Left Text Box
Value to Select in the Number Comparison Drop-down List
Value to Enter in the Right Text Box
Why to Add the IF Condition
Task1.payload.approvePlanPayload.requestorName
Note that you can also select this value by clicking the Left Value search icon and selecting Task1.payload.approvePlanPayload.requestorName in the Condition Browser dialog box.
is
ProjectTeamMember1.teamMemberUserName
Note that you can also select this value by clicking the Left Value search icon and selecting ProjectTeamMember1.teamMemberUserName in the Condition Browser dialog box.
To specify that the requester is a project team member.
ProjectTeamMember1.teamMemberRoleName
is
"Project Manager"
To check whether the requester plays the Project Manager role in the project.
- In the THEN part of the rule, add a list builder of resource type by
clicking Insert Action > Add
Approver > Resource. Then,
enter the values as follows:
- Response Type: Required
- Users: Task1.payload.approvePlanPayload.approverName
- Groups: null
- Application Role: null
- Rule Name: “ProjectRoleBasedApproval”
Note: The rule name is auto-populated, it's the name that you entered in Step 7.
- Dimension Id: nullNote: The dimension ID is auto-populated as null.
- Add the auto-approval rule for project manager role, as follows:
- In the Rules pane, click the Advanced Add or Modify Options drop-down list and select General Rule.
- Click the Properties link, enter AutoApproveForProjectManagerRole in the Name field, and add the description.
- Select Medium from the Priority drop-down list, select the Advanced Mode checkbox, verify that the Active checkbox is selected, and click OK.
- In the IF part of the rule:
- Click Insert Pattern, then enter Lists in the left box, and select Lists from the drop-down list.
- Click the Add Pattern icon, then enter Task1 in the left box, and select Task from the drop-down list.
- Click the Add Pattern icon and select Surround from the Surround selected tests with parenthesis drop-down list that's adjacent to the Add Pattern icon you just clicked.
- Select None from the drop-down list below and.
- Type ProjectTeamMember1 in the left box and choose ProjectTeamMember from the drop-down list in the pattern.
- Click the Advanced Add or Modify
Options drop-down list and select
simple test, and add the IF
conditions within the same pattern as follows:
Value to Enter in the Left Text Box
Value to Select in the Number Comparison Drop-down List
Value to Enter in the Right Text Box
Why to Add the IF Condition
Task1.payload.approvePlanPayload.requestorName
Note that you can also select this value by clicking the Left Value search icon and selecting Task1.payload.approvePlanPayload.requestorName in the Condition Browser dialog box.
is
ProjectTeamMember1.teamMemberUserName
Note that you can also select this value by clicking the Left Value search icon and selecting ProjectTeamMember1.teamMemberUserName in the Condition Browser dialog box.
To specify that the requester is a project team member.
ProjectTeamMember1.teamMemberRoleName
is
"Project Manager"
To check whether the requester plays the Project Manager role in the project.
- In the THEN part of the rule, add a list builder of supervisory type
by clicking Insert Action > Add
Approver > Supervisory. Then,
enter the values as follows:
- Response Type: Required
- Number of levels: 1
- Starting Participant: HierarchyBuilder.getPrincipal(Task1.payload.approvePlanPayload.approverName,-1,"","")
- Top Participant: HierarchyBuilder.getPrincipal(Task1.payload.approvePlanPayload.approverName,-1,"","")
- Auto Action Enabled: True
- Auto Action: "APPROVE" (Type this value including the quotation marks. Don't copy and paste this value.)
- Rule Name:
“AutoApproveForProjectManagerRole” Note: The rule name is auto-populated, it's the name that you entered in Step 8.
- Dimension Id: nullNote: The dimension ID is auto-populated as null.
- Click Validate on the top right corner to validate the newly defined rules.
- Click the Save icon in the Tasks to be configured pane to save the rules.
- Click the Commit task icon in the Tasks to be configured pane to complete the rule configuration.
- Click OK to close the confirmation message window.