Defining Parameterized Get Next Approver rules
To define a Parameterized Get Next Approver rule
- Complete the basic information about the rule. For more information, see Creating-a-rule.
- Select Parameterized Get Next Approver from the Rule Type list.
- The Run If condition is optional. Use this field to define a conditional statement to control whether the rule runs.
- In the If Multiple Results field, select a value from the menu.
This field determines what occurs when more than one row of data is returned by the Get Next Approver rule.
The following options are available:- Value from First—Uses the value from the first record retrieved.
- Values from All—Uses all of the values retrieved.
- Return Error—Returns an error message if more than one record is retrieved.
- Clear—This field is blank.
- In the If Multiple Approvers field, select a value from the menu.
This field value determines the signature requirements when more than one approver is returned by the Get Next Approver rule.- One Must Sign—A single signature record is created and only one of the approvers listed in the record is required to act upon the approval request to consider the record complete.
- All Must Sign—A separate signature record is created for each individual in the approver list, including individuals within a role. In this case, all of the approvers retrieved by the Get Next Approver rule must act upon the approval request.
- Clear—This field is blank.
- In the Next Approver Rule Is field, select a value from the menu.
This field value determines how the approver list is constructed when multiple Get Next Approver rules are included in the process.- Additive—Indicates that any name or role this rule assigns to the approver list is added to the existing approver list, and further rules are to be processed.
- Ending—Indicates that any name or role this rule assigns to the approver list is added to the existing approver list, but no further rules are to be processed.
- Exclusive—Indicates that this rule assigns the entire approver list, and no further rules are processed. In addition, if a previous rule created an approver list, that list is ignored.
- Clear—This field is blank.
- From the Guaranteed Add list, select one of the following options:
- Yes—The parameterized rule runs even when a Completion rule would otherwise determine that the process is finished, thus guaranteeing that the user will be added as an approver.
- No—If a Completion rule determines that the conditions exist for the process to be finished, the process does not return to the Get Next Approver stage to run this rule.
- Click the Set Fields tab.
- In the Set Fields Type field, select the appropriate action type; for more information, see Defining-actions-for-a-rule.
- Select a query form name from the From Form menu.
This value indicates in which form to search for the query. - In the On Server field, select the server where the form is located.
- Current—The form exists on the current server.
- Alternate—The form exists on another server. In this case, type the server name where the form is located in the Server field.
- Depending on the action type, enter the qualification statement or command line in the Qualification area.
- In the Fields Data area, enter the name of the field or fields to receive the data in the Field Name column, and a value statement or the name of each source form field in the Value column.
- Click Save.
Example of Parameterized Get Next Approver rule
The following figure illustrates how an example Parameterized Get Next Approver rule operates. The example rule includes the following settings:
- Run If qualification: $Level$ = "%1"
- Guaranteed Add: Yes
- Set Fields: $Next Approver$ = "%2"
Example of a Parameterized Get Next Approver rule
The following actions are available for defining a Parameterized Get Next Approver rule:
- A user enters an approval request in a process that includes an approval hierarchy, such as a Parent-Child or Level process.
- When working with the approval request, the first approver uses the preview feature to view the existing approvers for the request, for example, by clicking a button on the approval form. The approver decides to add Michel LeTourneau as an approver at a future level, for example, level 4.
The approver uses functionality added to the approval request form, such as a button that opens an "Add Approvers" form, to enter the level and the approver name. When the approver saves their changes, a filter runs that captures these values and sends an Add-PGNA-Values application command using the values to the Approval Server, for example:
*Application-Command Approval Add-PGNA-Values -o "My Param Rule" -l "4/Michel LeTourneau"*- The Approval Server receives the command, and stores the data in the Param Data field on the AP:Detail record.
- After the Approval Server runs the Get Next Approver rules, it runs Parameterized Get Next Approver rules. While running the parameterized rules, it retrieves the values from the Param Data field in the detail record. In this case, it retrieves 4/Michel LeTourneau and parses this value into %1="4" and %2="Michel LeTourneau"
- The Approval Server replaces the variables in the Parameterized rule with these values:
- Run If qualification—$Level$ = 4
- Set Fields—$Next Approver$ = "Michel LeTourneau"
- If the condition matches, the Set Fields action is executed. If the condition never matches and the regular Get Next Approver rules do not return any approvers, the Approval Server checks for the Guaranteed Add flag. If this flag is set to Yes, the parameterized rule is run, even though the Run If condition is not satisfied.
Parameterized Get Next Approver rules are executed when a preview is generated, so the added approver is visible when future approvers preview the request.