Service Catalog Approval workflow "not yet requested"

daved999
Tera Contributor

Hi Everyone,

We have just attempted to restart using the Service Catalog which was developed several versions ago and it appears we now have an issue where a new SC request is not getting past the first approval step.

find_real_file.png

find_real_file.png

I have confirmed that the approval engine is turned off for request (sc_request) and I have verified the workflow is published.  The nominated cost centre manager (or "approver"?) listed in the catalog request never receives the corresponding sc request in their my approvals queue.

Here is the start of the workflow:

find_real_file.png

 

I have checked that all the catalog items are active and are pointing to the above workflow.  I don't have any scripting knowledge and really don't know where to go from here, so any suggestions would be greatly appreciated.  At this stage I'm thinking of deleting the workflow and starting from scratch.  Will any of this get easier in Madrid or New York?

Regards,

Dave

16 REPLIES 16

Thanks for the input Dirk.  You are correct, there is no active context for this workflow.  So I'm guessing I need to go back and check that every component in the catalog and portal is active?

There is a script in the Approval - user activity:

 

answer=[];

var manager_sysid = current.variables.u_docs_manager; //sysID of manager
workflow.scratchpad.manager_sys_id = manager_sysid;
gs.log("Manager Sys ID", manager_sysid);

var manager = new GlideRecord('sys_user'); // get the manager record

manager.get('sys_id', manager_sysid); // get the user record for the manager
gs.log("Manager: ", manager.user_name);

workflow.scratchpad.manager_user_name = manager.user_name;

answer.push(manager.user_name);

------

Regards,

Dave

Hi Thank you for the feedback. The script looks quite good, except the last line, where you push the name of the manager to the answer array. If you want the manager to be the approver by script, you need to use the sysid, instead of the name in the answer array. So, you just need to push: answer.push(manager); Instead of answer.push(manager.user_name); I guess, one of the following is true, why the workflow does not fire: - the workflow is not set to active - the workflow is not designed to run on your table - there is a condition defined, which does not match your record, for the Workflow to be fired. - in the field 'when to run' on the workflow properties page, you have set the value 'none' instead of always. Let me know about your progress, and mark my answer as correct and helpful, please. BR Dirk

Hi Also remember, that the published workflow executes for all users, except for that user, who currently has the workflow checked out for editing. That editing user will execute the checked out version! Maybe, that is also an issue. Check out, how your tests are set up. BR Dirk

daved999
Tera Contributor

The workflow is definitely published, however I have just noticed that the Approvers field no longer appears to have a valid entry... although I can't understand why we would have had a specific user nominated... unless this was a script reference like another workflow which states - ${u_manager_to_approve}

find_real_file.png

Regards,

Dave

Try Checkout workflow and then see the value in Users.

thanks,

ABhishek

Thank you,
Abhishek Gardade