- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2016 12:50 AM
hi team ,
i want to generate the approvals in the approvers tab in the change form after
completion of all the four task as given below in the screen shot.
here i dont want to keep the condition in the task like first task completed then second task should open.
here my all task going to generate together and here i want once all the task completed then approval should generate
plz help me
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2016 02:22 AM
1. In the workflow add a workflow condition activity that will wait till all tasks related to that change completed. and connect output of that activity to approval user/approval group activity.
Script inside the wait for condition activity should be like,
// Set the variable 'answer' to true or false to indicate if the condition has been met or not.
//answer = true;
var gr_tsk = new GlideRecord("change_task");
gr_tsk.addQuery('change_request', current.sys_id);
gr_tsk.addQuery('state','!=', 24);
gr_tsk.addQuery('state','!=', 3);
gr_tsk.query();
if (gr_tsk.next()) {
answer = false;
} else {
answer = true;
}
Thanks,
Mihir

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2016 03:00 AM
I think you'll find you will have issues with stalled workflows with this approach - because updates on a Change Task are not always going to trigger an update on the Change workflow and cause the Wait condition to be evaluated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2016 02:36 AM