Group Approvals and "cancelled" behavior, result is "skipped"

Edward Halliday
Mega Guru

I have the OOTB workflow activity "Group Approval"

find_real_file.png

I have added a condition "canceled" which has the condition...

find_real_file.png

 

 

When i change the group approval record to cancelled the workflow activity result is "skipped" which makes the activity go through the approved exit condition. 

Why does it not go through the canceled exit condition? 

In the Workflow activity definition there is an onCancel: function  that looks to be what i want to trigger but i have no idea why it is not triggering?

Thanks for any help or insight. 

1 ACCEPTED SOLUTION

Raf1
Tera Guru

Try setting the State of the approvals to "Not yet requested" instead of cancelling them.

Please refer below:

https://community.servicenow.com/community?id=community_question&sys_id=38fb0325db9cdbc01dcaf3231f96...

View solution in original post

4 REPLIES 4

Raf1
Tera Guru

Try setting the State of the approvals to "Not yet requested" instead of cancelling them.

Please refer below:

https://community.servicenow.com/community?id=community_question&sys_id=38fb0325db9cdbc01dcaf3231f96...

Edward Halliday
Mega Guru

Hey Raf, good to see you!

 

When the Group Approval is set too 'not yet requested' no result condition is met. It does not exit the group approval workflow activity. 

ie the activity.result == 'not requested' (also tried 'not_requested'). 

 

find_real_file.png

 

I also tried a Wait For Condition Based on Script where i checked for the value to be not yet required. (and nudged the workflow to trigger)

But this caused the result of 'rejected'

 

if (counts.approved != 0) {
answer = 'approved';
} else if (counts.rejected =! 0) {
answer = 'rejected';
} else if (counts.not_required !=0) {
answer = 'not_required';
} else if (count.not_required !=0) {
answer = 'not requested';
activity.result = 'not requested';
}

 

Ended up modifying the Activity definition to fix

Hi Edward,

Could please let me know what chance you have make to the Activity definition to fix this issue?