Generate Approval request with Not Yet Requested

sry
Giga Guru

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

1 ACCEPTED SOLUTION

Shawn Dowler
Tera Guru

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.


View solution in original post

6 REPLIES 6

Shawn Dowler
Tera Guru

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.


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



workflow.png



thanks,


sry


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


}


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.