
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2020 02:19 PM
Hi all,
I am looking to create an 'Offboarding' type of Catalog Item, that when a requests comes through, it creates 5 different RITM's assigning to different assignment groups for each. With in those RITM's there will be multiple SCTASKs. Is this possible?
1 RITM to the Service Desk, in this RITM, there should be 8 SCTASKs assigned to the Service Desk that has individual tasks to perform to ensure a person is offboarded properly.
2 RITM sent to the Applications Team, in this RITM there will be approx 12 SCTASKs that are created to remove access to certain applications.
and so on...
Does anyone have an idea how I can achieve this?
Thanks very much!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2020 02:54 PM
If you haven't done so already, there's an option on the order guide to cascade variables, so you'll want to be sure that is checked, then create variables with the same names on each of the catalog items so that the data you capture from the requestor appears on each RITM. On the workflow of each catalog item you can add a Run Script activity at the beginning. The workflow is running on the sc_req_item (RITM) table, so to set the short description you would use something like
current.short_description = 'Termination - ' + current.variables.v_user.name;
Where v_user is the Name of the variable. On the Create Task activities, you can leave the Short description field blank, then check the Advanced box and in the Advanced Script put something like
task.short_description = 'Termination - ' + current.variables.v_user.name + ' show them the door.';
Then be sure to select the variables at the bottom that you want to appear on this task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2020 03:59 PM
I have done this with a workflow script. There's one method that creates RITMs under unique REQs, and another that can create all of the RITMs under the same REQ. As far as the tasks, you would define those on the workflow for this catalog item, then you would have a variable or some way to identify which path each RITM should take. I can dig up the script to get you started if you want to try it this way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2020 02:56 AM
I also need to point out that what you're describing is a good use case of an order guide, so I wanted to be sure you considered that before going down the scripting path. If you're not familiar, an order guide can be a way to bundle items, so in this case you would create the 5 catalog items, each with their own workflows that can do whatever, but they're not exposed to the service catalog. A user would submit a Offboarding order guide, which appears in the service catalog but will look a little different. You collect whatever information is needed in variables, then there are a couple of confirmation/checkout screens, then when they submit the request the 5 catalog items are created, each as an RITM under one REQ.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2020 02:28 PM
Thanks very much for the response. I was able to setup a Order Guide for this that kicks off the different catalog items - its incredibly close to what I am after. I am wondering though, how would I ultimately change the Short Description of the Request, RITM and SCTASKs that are generated to show the name of the person that's being offboarded?
I've set up 3 variables on the Order Guide, one being the offboarding users name. I was hoping to have that variable cascade through each RITM and SCTASK somewhere in the Short Description of each, if possible. Is this possible?
As you can see, it does kick off all RITMs and Tasks under one Request which is super awesome, just need to get the Short Descriptions to include the name of the "Person leaving" and End Date as well.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2020 02:53 PM
Cory, on the order guide there is a tick box "cascade variables" so if you have that enabled and your variable has the same name it is available on RITM level. From here you can access it and play as you wish.
Example:
- On order guide you have a variable user_name that is the user leaving company
- On "Delete user from Active directory" catalog item you have the same variable
- So they select the user_name on oder guide and it will be filled on any "child" RITM
- in the RITM workflow just access it by querying current.variables.variable name, in this case current.variables.user_name
- Then just set the short description in the workflow script (current.short_description = "Remove AD account of" + current.variables.user_name) or Task creation (task.short_description = "Remove AD account of" + current.variables.user_name)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2020 02:54 PM
If you haven't done so already, there's an option on the order guide to cascade variables, so you'll want to be sure that is checked, then create variables with the same names on each of the catalog items so that the data you capture from the requestor appears on each RITM. On the workflow of each catalog item you can add a Run Script activity at the beginning. The workflow is running on the sc_req_item (RITM) table, so to set the short description you would use something like
current.short_description = 'Termination - ' + current.variables.v_user.name;
Where v_user is the Name of the variable. On the Create Task activities, you can leave the Short description field blank, then check the Advanced box and in the Advanced Script put something like
task.short_description = 'Termination - ' + current.variables.v_user.name + ' show them the door.';
Then be sure to select the variables at the bottom that you want to appear on this task.