Approving a request is taking long time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2016 12:16 PM
Hi there,
Recently we have upgraded to Geneva.And once after the upgrade ,approvals are taking long time almost >30 sec. We are experiencing this slowness whenever we have approval activity followed by catalog task activity in the workflow. We have contacted HI support on the same, they have suggested a workaround that introducing a timer with 5 sec next to the approval activity. Because the slowness is because of task activity.
But to do that change we need to touch all of our workflows. Can someone provide input on this, how can we solve it with out touching all the workflows?
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2016 08:28 AM
Another way would be to change how approvals happen.
When you click the "approve" button it changes the approval to approved or rejected appropriately, then the other things happen like creating the tasks.
If you instead of actually set the approved or rejected you could push it to an event, then handle it in a script action.
UI action script
current.state = "approved"; // this will show the approval as approved
current.setWorkflow(false); // Do not run any other business rules, which is what is taking so long
current.update(); // we can still do the update in case someone goes to the thing to be approved they'll see if if the event hasn'thappend yet
gs.eventQueue('custom.approval.approved', current, current.state, gs.getUserID());//generate the event
Script action script
current.state = "not requested"; // set state back to different state
current.autoSysFields(false); // Do not update sys_* fields
current.setWorkflow(false); // Do not run any other business rules
current.update(); // set this thing back to what it was.
gs.getSession().impersonate(event.parm2);//impersonate the approver
current.state = "approved";
current.autoSysFields(true); // Do update update sys_* fields
current.setWorkflow(true); // Do run any other business rules
current.update();
The only issue with this, is it may take ~2 minutes for following approvals/tasks to get made as you are now dependent on the event queue, however, your uses will feel no delay when they approve/reject things.