flow designer approval

El Cuchi
Tera Guru

Hi All,

 

I am moving a workflow to flow designer but i am having some issues. Hence, your help will be appreciated it.

 

1 - in my workflow i request approval to more than a group. one is fixed and the others are based on the business application selected. I managed to add approvals, but one user from a group approves, others from same group are not set to "no longer required' and it completes the request without waiting for the rest of the groups to approve.

I need for one person for each group to approve.
here is my script
var answer = [];
var approvers = 'a7923e8edbe429103985be43f3961941';

//search for managed by group of business applications
var app = fd_data.trigger.request_item.variables.business_applications_affected.toString();
    //search for application managed by group
    var gr = new GlideRecord('cmdb_ci_business_app');
    gr.addQuery('sys_id','IN', app);
    gr.query();
    while(gr.next()){
        if(gr.managed_by_group!=''){
            approvers=approvers+','+gr.managed_by_group;
        } else {
            if(gr.managed_by_group=='') {
               approvers=approvers+','+gr.application_manager;
            }
        }
    }
//}
return "ApprovesAnyG["+approvers+"]OrRejectsAnyU["+approvers+]";
 
why?
 
2 - in the workflow i have a "run script" activity. how do i do the same in flow designer?
my script inspect a variable and then searches in the business application table. When found it set a specific field to true.
 
regards,
max
 
7 REPLIES 7

Arya123
Tera Expert

Hi,

 

After setting up approval actions for each group, use the "Wait for Condition" action to ensure that the flow waits for all required approvals before proceeding.

 

 

 

thanks for your suggestion. i am new to flow and do not understand what you are saying. would u pls add more details?

Hi,

Step 1 )Configure separate approval steps for each group.(give the first approval group )

2)  add Action -->Use "Wait for Condition" to ensure all approvals are completed

3) add Action---> Select Ask for approval ---( give the next group)