- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2017 03:26 PM
Hi All,
We have a catalog item that needs an approval from multiple groups, so we have incorporated this in a workflow by using core activity "Approval - Group". With this option i understand approval engine kick the approval requests immediately with State = Requested, but is there anything i can do to generate approvals first in State = Not Yet Requested ?
Any help can be greatly appreciated.
thanks,
sry
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
-
Team Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2017 03:52 PM
You might be able to make this work with a Business Rule on the Approvals [sysapproval_approver] table to run before insert and set the State field to Not Yet Requested [not requested].
You will probably want to have some conditions so it doesn't apply to all approvals. If you can't get it to work, try setting the order to something huge like 999999.
There might be a better way than this to accomplish what you need to do. Remember: just because you can do this doesn't me you should.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2017 03:52 PM
You might be able to make this work with a Business Rule on the Approvals [sysapproval_approver] table to run before insert and set the State field to Not Yet Requested [not requested].
You will probably want to have some conditions so it doesn't apply to all approvals. If you can't get it to work, try setting the order to something huge like 999999.
There might be a better way than this to accomplish what you need to do. Remember: just because you can do this doesn't me you should.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2017 01:20 PM
Hi Shawn, thank you very much for the solution. it worked initially for the first level of approvals. However we do have few more approvals after this initial group approval and we do not want them to be "Not yet Requested".
I am not able to put these conditions in the business rule that i created on sysapproval_approver table. Below is the workflow.
Requirement is we just need approval request = Not yet Requested for approval group "First Gate Approval". But for "Security Team" and "Audit Team" we need approval request = Requested
thanks,
sry

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2017 02:11 PM
Could you add to your business rule an if statement to check on the Type of approval [wf_activity] field? That would allow you to only set it to Not yet started by wrapping the script in:
if (current.wf_activity.getValue('name') == 'First Gate approval') {
// Your code here
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2017 02:16 PM
My previous reply was assuming only using the Advanced tab without the Actions tab.
You could also do this by using the Filter conditions and select Type of approval is First Gate approval.