Wait for condition Activity Scripting Example

var grActiveTasks = new GlideRecord('sc_task');
grActiveTasks.addQuery('request_item', current.sys_id);
grActiveTasks.addActiveQuery();
grActiveTasks.query();

if(gr.ActiveTasks.next()){
    answer = false;
}
else{
    answer = true;
}

This Wait for condition script can be added to the end of a Workflow to ensure it does not end if any tasks are remain active. This is a great strategy if your organization allows fulfillers to manually add additional tasks to a Workflow.

results matching ""

    No results matching ""