Approvals skipped due to to invalid rule syntax in flow designer error logs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2022 01:00 AM
Hi,
My second level approval got skipped and I can find this error in logs
Flow Designer: Operation((SC) Change - Normal - Authorize_v1.Branch$1.1f76e11c87bf09d4605d32a73cbb3526.If$1.5b76e11c87bf09d4605d32a73cbb352c.6776251c87bf09d4605d32a73cbb35b4.5df22d920b10030085c083eb37673a04.Create Approvals) skipped due to invalid rule syntax:
Below is my flow designer and we are using a custom action here with scripted rule in ask for approval.
1st level approval at Assess state which would be Primary Service Offering change group.
2nd level approval as per below screenshot at Authorize state which is Cis Approval group in Impacted Service related list with class as service offering.(TSO APV group).
SC get offering approval group is the custom action with below script:
(function execute(inputs, outputs) {
var grChange = inputs.change_request;
var groupIDs = [];
var arrUtil = new ArrayUtil();
var grOffering = new GlideRecord('task_cmdb_ci_service')
grOffering.addQuery('task', grChange.sys_id.toString());
grOffering.addQuery('cmdb_ci_service.sys_class_name', 'service_offering');
grOffering.addQuery('cmdb_ci_service.change_control', '!=', '');
grOffering.groupBy('cmdb_ci_service.change_control');
grOffering.query();
while(grOffering.next()){
var grmember = new GlideRecord('sys_user_grmember');
grmember.addQuery('group', grOffering.cmdb_ci_service.change_control);
grmember.addQuery('user.active', true);
grmember.query();
if(grmember.hasNext()){
groupIDs.push(''+grOffering.cmdb_ci_service.change_control.sys_id.toString());
}
}
groupIDs = arrUtil.unique(groupIDs); // remove duplicates
outputs.group_ids = groupIDs.toString();
})(inputs, outputs);
Thanks,
Harsha
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2022 11:51 PM
Hi Mahendra,
I have shared my scripted action used in the flow in my post. Below is my approval rule script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2022 11:46 PM
Hi Mahendra,
Did you get sometime to look into this? Your help would be much appreciated.
Thanks,
Harsha