This activity configures the process of approving: it creates approvals, sets approval rules and conditions. The activity evaluates the result depending on the following factors: The activity can be completed with one of two results: Approved or Rejected. Activity fields Specify conditions to be met for generating approvals. If these conditions are not met, the workflow skips the activity. In this case, the Approved exit is taken. Specify the approval type to define the conditions of the activity exits. Available options: Select this checkbox to add the participants whose approvals are not mandatory to vote. When this checkbox is selected, the Non-Mandatory Participants tab appears. Select responsible users. They will receive the approvals and make their decisions. Click the magnifier icon to select from the list or start typing the user name to select from autosuggest. Select responsible groups. Users included in this group will receive the approvals and make their decisions. Click the magnifier icon to select from the list or start typing the group name to select from autosuggest. Select roles whose owners will receive the approvals and make their decisions. Click the magnifier icon to select from the list or start typing the role name to select from autosuggest. Script If the Advanced checkbox is selected, this script is called to determine if any additional approvals should be created. The script is intended to set the answer variable to a comma-separated list of user IDs to add as approvers. This field appears when the Advanced checkbox is selected. The code example below implements logic as described below: You can pass values to the answer variable either as a string or as an array, for example: answer = ['100000000000000001', '160017550418345219', '159974538715046822'] answer='100000000000000001,160017550418345219,159974538715046822' In this field, you can define the approval logic. Available choice options: This field appears when the Approval Type is equal to Automatically. Specify the conditions to be met for the Approved exit. If there is more than one condition, they will be checked one after another. This field appears when the Approval Type is equal to Manual. Specify the conditions to be met for the Rejected exit. If there is more than one condition, they will be checked one after another. This field appears when the Approval Type is equal to Manual. Non-mandatory participants tab Select responsible users from the Employee list. They will receive the approvals and make their decisions. Yet, their approval is not mandatory. Click the magnifier icon to select from the list or start typing the user's name to select from autosuggest. Groups Select responsible groups. Users included in this group will receive the approvals and make their decisions. Yet, their approval is not mandatory. Click the magnifier icon to select from the list or start typing the group name to select from autosuggest. Roles Select roles whose owners will receive the approvals and make their decisions. Yet, their approval is not mandatory. Click the magnifier icon to select from the list or start typing the role name to select from autosuggest. Advanced This script is called to determine if any additional approvals to be created. The script is intended to set the answer variable to a comma-separated list of user IDs to add as approvers. See an example and clarifications above. This field appears when the Advanced checkbox is selected. Consider Non-Mandatory Participants When selected, non-mandatory participants are able to vote in approval tickets.Name Mandatory Description Name N Activity name. A good practice is to make the name descriptive for clarity. Description N Type a brief description of the activity. It is displayed on the activity block on the canvas if provided. Table Y A table to be affected by this activity. This field is populated automatically. Run Conditions N Approval Type N Non-Mandatory Participants N Mandatory participants tab Employees N Groups N Roles N Advanced N Select this checkbox to specify a script to execute. N const caller = current.getValue('caller');
const callerGroup = new SimpleRecord('sys_user_group');
callerGroup.addQuery('user_id', сaller);
callerGroup.selectAttributes('group_id');
callerGroup.query();
while (callerGroup.next()) {
if (callerGroups.group_id.getValue('responsible')) {
answer = callerGroups.group_id.getValue('responsible');
}
}
Approved When N Approval Conditions Y Reject Conditions Y Employees N N N N Select this checkbox to specify a script to execute. Script N N
Script example
This tab appears when the Non-Mandatory Participants checkbox is selected.
Overview
Content Tools
2 Comments
Anonymous
editor