Approval Flow based on Service Managed By

gaf627
Tera Expert

I'm trying to create a Flow using Flow Designer that can be reused for several access request catalog items.  The approver is the Managed By on the Service (cmdb_ci_service) access is being requested for. I'm trying to avoid creating a Flow for each Service.  I'm able to accomplish this with Workflow, by creating a variable for the Service and making the name of the Service the default.  I then use a run script in the workflow to map the variable to RITM Configuration Item field.  I'm then able to reference the Configuration Item for Managed By approval.

I would like to use Flow to accomplish this, but the challenge I'm having is Flow requires me to reference the specific Catalog Item or Variable Set to get the variable. This would require me to create a Flow for each service because I'm using the variable default to set the Service.  

I'm open to suggestions.  I'm new to Flow Designer, so hopefully I'm just missing something.  Thanks!

1 ACCEPTED SOLUTION

Hello glad it works yeah so what you can do is instead of updating the RITM you can do a lookup record using the OOB action on the cmdb_ci__service and then use that lookup’s object to fetch the managed by on the ask for approval action it should work

View solution in original post

9 REPLIES 9

Ahh so it catalog item 1---> service 1
cat item2 ---> service2

I mean the service are static and tightly coupled with respective items right ?

Then what I can think of for the catalog item 1 create a variable 1 put default value of the service that we are want and make it unavaialble and make the name begin like staticservice_ .... which will be common begin for all the other variables for other items

Then what we can think of is we can do a lookup record on the variable table querying the item submitted in the RITM and look for that variable whose name starts with "staticservice..." and fetch the hardcoded value that we have in the flow.

My PDI is down since 8 days so cannot dry run myself but you can give it a shot 🙂

This is what i meant created a static variable with a default value of the cmdb_ci_service sys_id hardcoded

find_real_file.png

Used the above information on the flow

find_real_file.png

So if you create such variables with a common name like staticservce_1 , staticservice_2, staticservice_3

the on the condition like i have used you can try the same , assuming I got your use case right

Thanks Rohit!  This got me down the right path.  I was able to do a look up record on the Variable Ownership (sc_item_option_mtom).  I then used an update record to update the the configuration item on the requested item with variable value. The problem I now have is the Ask For Approval Action sits in a waiting state and does not assign the Approver.  I believe this is because of timing.  If I save or update the RITM, then the Ask For Approval fires. I tried to put in a Wait For Condition Action, but that didn't seem to work.

 

find_real_file.png

Hello glad it works yeah so what you can do is instead of updating the RITM you can do a lookup record using the OOB action on the cmdb_ci__service and then use that lookup’s object to fetch the managed by on the ask for approval action it should work

Thank you so much!  This worked!