- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2016 03:35 AM
Hi All,
I'm facing a strange issue with my instance.
In an SOP document when I click "Request Approval" it is automatically getting approved.
Instead of changing the "SOP Approval status" to "Requested".
I don't know what is wrong with the workflow. Also there is no auto approval workflow to change the SOP Approval status.
Can anyone help me figure out the root cause. Or how to debug this.
Thanks in advance
Prici
Solved! Go to Solution.
- Labels:
-
Team Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2016 04:56 AM
Automatic approval typically occurs when there is no approver. For example, you say "Chuck's Manager needs to approve this" and I have no manager defined. The workflow says "Rather than be stuck here with no way out, I'm going right on through." Check the underlying data to ensure it meets the conditions of your workflow. If you have cases, like mine, where there is no approver, check before you enter the approval and reroute to a notification, a waiting for, etc, or check after the approval and adjust the workflow accordingly.
Reference:
Workflow Concepts - ServiceNow Wiki
Creating a Workflow - ServiceNow Wiki
Using Workflow Activities - ServiceNow Wiki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2016 04:02 AM
Hi Prici,
Check in your workflow if the activity is having user record to approve? If yes, check the approval options in the activity.
Thanks,
Sunil Safare
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2016 04:07 AM
Hi Pricillia,
Definitely there should be a workflow which will do auto-approvals. For request and Requested Item, there will be separate workflows for it.
If you want to debug the workflow you can click on ALL CONTEXTS in workflow, you will find list of workflows and select the required workflow for debugging.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2016 04:56 AM
Automatic approval typically occurs when there is no approver. For example, you say "Chuck's Manager needs to approve this" and I have no manager defined. The workflow says "Rather than be stuck here with no way out, I'm going right on through." Check the underlying data to ensure it meets the conditions of your workflow. If you have cases, like mine, where there is no approver, check before you enter the approval and reroute to a notification, a waiting for, etc, or check after the approval and adjust the workflow accordingly.
Reference:
Workflow Concepts - ServiceNow Wiki
Creating a Workflow - ServiceNow Wiki
Using Workflow Activities - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2016 04:42 AM
Hi chuck,
Thank you for the details and actually you have diverted me in the right direction to find the root cause.
In the Workflow Approval scripts, the field ids which we are using is not correct.
The error is,
the field id is - u_subcategory_1
but in the script it was - current.u_sub_category_1
Due to this error it was skipping the approval part. After making changes it was working fine. Which is the approval parts are not skipped.
The script part is,
gr.addQuery('u_category',current.u_category);
gr.addQuery('u_sub_category_1',current.u_sub_category_1); // the high lighted part is wrong.
gr.addQuery('u_sub_category_2',current.u_subcategory_2);
gr.query();
Also I have a query here,
The same script is working fine in the other instance (which is workflow approvals are not skipped and executed properly). Ideally it is not considering the query part which contains the error i think.
Both instances are Geneva version. But when I check the difference between the instances, the one which contains this "patch6-hotfix2-05-18-2016_05-23-2016_1554"
patch is executing the above scripts.
The other instance which does not contains the hot fix, is not executing the scripts.
Is it related to the hotfix or some other reason is there behind.
Please advice me.
Thanks
Prici