The CreatorCon Call for Content is officially open! Get started here.

Manual Approval - Without Updating Flow Designer

Manal  AQUIL
Tera Contributor

Hi Community Members, 

 

Kindly, help me solve below scenario:

 

Scenario: We have an RITM/ Change where approvals have already been triggered for certain people. Now,  we want to add additional approvers  or update existing  approvers.

 

Solution: 

1. I tried to add Manual Approver (Users) in approval action activity in flow designer. This enabled that whenever an existing RITM or CHG will get new approval inserted then that approval record will also get tagged to flow context and hence approval of the newly inserted approver is also required.  But this solution will require a lot of manual work if I want this manual approver functionality for more than 150 Flows .Hence, I want a generic solution.

 

2. So as a second solution, I tried to create a UI action on task table (so the button will be visible on RITM/ CHG) i.e when button is clicked on RITM then it will update the existing approver attached to RITM and since existing approval is updated and hence flow context also doesn't break . But this solution only worked when I tried as an admin User and doesn't work for non admin user .

 

Kindly, suggest a feasible solution so that I can update or insert new approval to RITM or CHG and upon approved by new approver the flow should move forward (without breaking flow) . 

 

Thanks,

Manal Aquil

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

@Manal AQUIL 

what error it gave with the UI action?

It was unable to update the approval record?

share the error details and screenshots.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

@Manal AQUIL 

Another approach

-> create subflow which accepts task sysId and list of additional approvers

-> Insert new approval records (sysapproval_approver) linked to the task dynamically.

-> Updates the flow context to include these new approvals so the flow waits for them too.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thanks for responding @Ankur Bawiskar 

Even If create a subflow I will need to call this subflow in 150 existing flows  . 

I need generic solution so that I should not update any existing flow

Rafael Batistot
Kilo Patron

Hi @Manal AQUIL 

 

May you try runs server-side under system privileges (so it’s not blocked by ACLs).

Example server-side insert:

 

var gr = new GlideRecord('sysapproval_approver');
gr.initialize();
gr.approver = '<user_sys_id>'; // new approver
gr.sysapproval = current.sys_id; // RITM or Change
gr.state = 'requested';
gr.insert();

If you found this response helpful, please mark it as Helpful. If it fully answered your question, consider marking it as Correct. Doing so helps other users find accurate and useful information more easily.