How to close change request once all the change tasks should closed in flow designer

Supriya Behera3
Tera Contributor

I need to know how to close change request once all the change tasks have been closed. First Assignment group should be closed then Additional assignment group should be closed then change request will closed. After assignment group closed , change request is closed but i need after assignment group and additional assignment group will closed, then change request will be closed. So, where to set task and closed condition.Please reply to ASAP, Thanks!

6 REPLIES 6

In this case, where you seem to have built a rather complex flow to handle the entire change request process, I would say no, don't insert my example into your flow.

There is a built in wait default active whenever you create tasks in a Flow, and since I don't know  how your Flow is set up (other than the pieces you've attached as images in the question recently), it's kind of hard to give a good answer.

Or can we use BR for this. 

 

var actTask = new GlideRecord('change_task');
actTask.addQuery('active', true);
actTask.addQuery('change_request', current.sys_id);
actTask.query();
while (actTask.next()) {

actTask.state = 3;

actTask.update();

//action.setRedirectURL(current);

}