Notifications

25 views

Description

Use BR to Attach On-Call workflow when assignment group is mandatory

Cause

On-Call workflows are used to identify the current on-call person and assign the task to him based on his acknowledgment.

One way to attach On-Call workflow is to use trigger rules.

But Trigger rules extends assignment rules and they will not be processed when incident assignment group is mandatory.

 

Resolution

The alternative way is to create a Business rule on corresponding table and attach the required workflow using the script.

 

Here is the BR Definition:

When to execute:

After Insert (Please do not execute this BR on update as it might lead to multiple workflow contexts if the workflow adds any work notes to the task)

Filter Conditions:

As per your requirement

Script:

(function executeRule(current, previous /*null when async*/) {

var workflowSysId = '78d9b342ff010200f6d6ffffffffff9d';//sys_id of Workflow (EX: On-Call: Assign by Acknowledgement)

vars = {};
vars.assignment_group = current.assignment_group; //populate input variables based on the workflow

var wf = new Workflow();
var wfc = wf.startFlow(workflowSysId, current, current.operation(), vars);

})(current, previous);

 

 

Article Information

Last Updated:2019-11-08 05:20:25
Published:2019-11-08