DxSherpa - D

Approvals in ServiceNow

Approvals in ServiceNow

This blog is intended to showcase the approval process in ServiceNow. It will help to understand how the approval engine and workflow engine works to generate the approval process. This blog also covers the usage of both the ways to configure the approvals in ServiceNow.

Approval Definition:-

The basic idea behind approval is that it is a written compliance provided by an authorized body to proceed with a requested activity while meeting the standards of an organization.

Approvals in ServiceNow:-

Approvals in ServiceNow can be defined as a process that associate authorized members, groups or individual users with the responsibility of either approving or rejecting that task.

Approvals can be configured by navigating to System Policy-> Approvals.

How to Configure Approvals?

The way approvals are getting configured differs from organization to organization. It depends on how the administrator want to configure an approval process for different modules and what all authorities or groups are involved to handle it.

In ServiceNow, one can configure approvals for all the task based tables. The flexibility of setting up the approval process for different tables shall be achieved through the selection of Approval Engine and the Approval Workflow.

Approval Engine:-Approval Engine in ServiceNow provides three different options to configure the approval process for different task table.

  1. Approval Rules
  2. Process Guides.
  3. Turn off Engine
  1. Approval Rules:-Approval rule is one of the options to configure the approval process. These are simple rules which will be matched against the task table records. The matching approval rule will get fired and create a request for users or groups who will be responsible for approving that task.Navigate to approval rules through System Policy->Rules->ApprovalsApprovals in ServiceNowIn above screenshot, the Approval Rule is written on ‘sc_request’ table for a particular user of a particular group.

    This approval rule will trigger when the condition specified is matched with the request (sc_request) and set the approval state as ‘Requested’.

    Here, ‘Run rule before’ field will specify that the particular rule should run before the record is inserted or updated on the particular table.

    Once any catalog request is generated for price more than 1000$ then above approval rule will get triggered and generate an approval request for specified Group as shown in below screenshot.

    Approvals in ServiceNow

  2. Process Guide:-Process guide is another option to configure the approval process. These are also the sequence of steps that will execute in order to handle the approvals and rejections of a particular request.Approvals in ServiceNowIn above screenshot, the process guide is written on ‘sc_request’ table. The ‘Start’ field refers to a process step that will execute when this process guide is triggered.Process steps are nothing but the actions that should follow on approval and rejection.

    Approvals in ServiceNow

    Here, the Process step will generate the approval for mentioned users. After approval, this process will move forward to next process step.

    However this functionality is deprecated and no longer in use.

  3. Turn off Engine:-This option in approval engine is used to turn off both the options i.e. Approval Rules and Process Guide. This option gets selected when workflow takes care of approval activity.

Set up an Approval Engine:- In order to set up the options provided by Approval Engine, one needs to set it up first.

Navigate to system properties->Approval Engine

Approvals in ServiceNow

Approval Engine can be set up individually for different modules through this table.

If the option is set to turn ‘engine off’ then the approvals are not enabled for that particular table and if it is disabled then the Approval Workflow is responsible for managing the approval process of that particular table.

Change the setting accordingly and click on save.

The Changes done on this table will get reflected and saved in

glide.approval_engine.. system property.

Approvals through workflow:- Configuring approvals through workflow is another way to achieve approval process in ServiceNow. Through workflow one can create group or individual approvals.

To configure the same navigate to Workflow->Workflow Editor

In workflow editor, Approval is one of the core activities which one can drag and drop to configure the approval process.

Approvals in ServiceNow

Approval Group Activity
This activity creates an approval for each member of the group specified in the workflow. In Approval Group Activity, one can define groups for which the approval gets triggered. For additional group to get involved in approval process, one can write a script in this activity. The benefit of workflow approval is that it can be scheduled through approval activity. One can provide a specific schedule for an approval process to get triggered. Workflow activity allows defining the condition for approval. In this, one can define how the application should behave while waiting for approval and what if the approval request gets rejected. This activity can only be used for tables that are extended from Task table. For example:- Incident, Change Request etc.

Approvals in ServiceNow
Approvals in ServiceNow

Approval User Activity:
This activity will process the approval request for one or more individual users. Approval user activity can be configured in the similar way as the Approval Group Activity however in this; activity group can also be specified along with individuals for approval request. The difference between Approval User, Approval Group Activity is that approval user activity can be created on each table however the approval group activity can only be created for table extending from task.

Approval Action Activity:
This activity performs the action on current task. This activity is used to mark the task as approved. Approval action depicts the final disposition selected by the approver .

Manual Approval Activity:
This activity watches the approval process that the user adds manually for an application outside an approval process. By default the value selected by the approver is considered as the final disposition for that approval request.

For this activity, one can define only two conditions as below:

– Wait for :- wait for condition given in this field to approve the request.

– When anyone rejects:- either reject the manual process or wait for the response from another process.

This activity is only available for tables extended from Task table.

Approvals in ServiceNow

Approval Coordinator Activity:
The Approval Coordinator activity provides a way to make an approval’s outcome depending on the outcome of one or more child activities. The child activities can include Approval – User, Approval – Group and Manual Approval activities.

In the ‘Wait for’ field, one must specify what will be the flow before the Approval Coordinator decides whether to approve or reject the request. In ‘When anyone rejects’ field, one must specify what the coordinator should do when there is a rejection from any one of the child activities.

While creating approval coordinator activity, after clicking on submit (in workflow canvas window), one will be able to attach the child activities. Its outcome is responsible for outcome of Approval Coordinator Activity.

This activity is only available for tables extended from Task table.

Approvals in ServiceNow

Generate Workflow Activity:

This workflow activity is used to immediately generate task or approval records from any task/ approval activities placed after the Generate activity in the workflow execution path. Without the Generate activity, the workflow waits to create any records until reaching the associated activity.

The Generate activity follows all transitions through the workflow to each activity. For each activity:

If it is a task activity, creates the task and sets:

– The State to Pending
– The Expected Start Date
– The Due Date

If it is an approval activity, creates the approvals and sets:
– The approval State to Not Requested
– The Expected Start Date
– The Due Date

This activity is only available for tables extended from Task table.

Rollback Workflow Activity:-

This activity rollbacks the transition directly to the activity specified in the ongoing workflow transition. The Conditions in this activity determines which activity will trigger next depending on reset condition provided.

‘Rollback To transitions’ all the approvals those are triggered before this activity as Not yet Requested and Rollback all the task executed before as Open or Pending.

When conditions in a workflow trigger a ‘Rollback To activity’, the workflow transition starts processing backwards to a specified activity in the workflow and resets certain activities already executed back to their original state. This is useful when handling an unexpected failure while processing the approvals or as part of a logical flow.

We are pretty sure that this blog must have given an in-depth idea of configuring Approvals through Approval Engine and through Workflow Engine in ServiceNow.

Any comments\suggestions are most welcome. We have posted further blogs as well on other topics and will frequently come back with something innovative.