Approval - User not creating approval tasks if 'created by' matches the user who needs to approve.

Carl Fransen1
Kilo Sage

Hi All,

Having some simple issues with my workflow and wondered  this is working by design, something I've done wrong, or is a bug in the system.

I have a simple workflow to generate 2 approval records, request manager approval (via script) and then one-up manager approval (also via script).  The two approver activities are essentially identical, they only point to a different field.  See workflow and activity screenshots below:

find_real_file.png

 

find_real_file.png

 

The requirement should also for a person to open a HR Case for someone else, hence the 'requester' can be different, but this still doesn't create the correct approval tasks.

Can anyone help me figure out why the approvals aren't generated if the 'opened_by' matches the person the approval is being requested from?

Much appreciated.

1 ACCEPTED SOLUTION

In the end what I did here was to add validation to the Record Produce to disallow the user to put themselves as the approvers.  I added a Catalogue Client Script, OnSubmit, to throw up an error and stop the save from occurring.

The original problem around the approval tasks no appearing was the BR shown in a previous update, this is still needed for the Change process where people sit in multiple groups but cannot approve their own changes.

Thanks for all your help with this.

 

Cheers

Carl.

View solution in original post

11 REPLIES 11

Harish KM
Kilo Patron
Kilo Patron

your approval script is correct.before approval activity there is something called generate..whatz dat?

can you log your variable in approval activity and check?

Regards
Harish

the 'generate' activity generates all the approval records up front, not just when they are needed in the workflow - it provides visibility to the requester what approvals there are in the queue.

How do I log my variable into the approval activity?

gs.log("My Approver"+current.variables.yourvariablename);

in your approval script add this line and check in logs what value your getting

Regards
Harish

Diana Lewis1
Mega Expert

You may want to check if the field you are pulling from (requester's manager) has data.  In the past, I've seen approvals skipped when there is no data returned, like an approval group which has no members.