Notifications

109 views

Description

Description

How do we cancel an executing Flow Context (any table) when a particular condition is met ?

Procedure

We have an OOTB "Cancel" UI action on the "sys_flow_context" table to cancel the flow.

But instead doing it manually every time on a record, we can write a Business rule and define it on the table where the flow has to be cancelled and include the conditions on when to run.

The Script inside the business rule will be:


var referer = GlideTransaction.get().getRequest().getHeader("referer");
action.setRedirectURL(referer);

var gpa = new sn_ph.GlideProcessAutomation(current.sys_id);
gpa.cancel("manually by " + gs.getSession().getUserName());

Applicable Versions

All Flow Designer supported versions

Article Information

Last Updated:2019-08-02 20:40:23
Published:2019-06-18