Hi workflow serivce catalog

J_31
Kilo Sage

Hi 

 

I want to create a workflow for the this catalog item - it should generate two approval one for the 1. User Name and other to Manager of the user mentioned in User Name field. 

if any one either the user or manager of the user(user_name ) approves - item should be approved - if either of the one rejects - item should be rejected. 

Could you please help with workflow steps to acheive this. 

J_31_0-1699715786688.png

 

2 REPLIES 2

Vasu ch
Kilo Sage

Hi @J_31 

I'm not sure about the workflow but this can be easily done using flow designer.

Create a flow and the trigger for the flow should be Service Catalog. Use Ask for Approval flow action. See below.

Vasuch_0-1699809683140.png

In Rules, select Approve or Reject when Anyone approves or rejects. And just drag the respective user and user's manager (using dot walk) from the data pills. 

 

 

Kai Tingey
Tera Guru

 

If you are setting the requested for in your sc_req_item to the person specified in the 'user name' field, you can just do it in your approval activity. Use the user picker and select 'requested for' and 'requested for -> manager'

 

KaiTingey_0-1699848973014.png

 

If you need to the item's 'requested for' to be someone else, but still want to send the approval activity to the 'user name' user and manager - then you can just use a script activity in your workflow to build a comma separated list of sys_id's to push to the approval task.

 

something like:

workflow.scratchpad.approvers = current.variables.user_name+','+current.variables.user_name.manager;

 

then in your approval activity use advanced condition and then specify;

answer = workflow.scratchpad.approvers;