- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2018 02:10 PM
Hi gang,
I've got a workflow for an application request catalog item, and in that I'm using a "Catalog Task" activity to create a task. I need to have a 2nd activity later in the workflow reference that created task to either close it, or assign it. To further explain, I'm using orchestration to add a user to an AD group, but I want to have a task record created so that we can track the number of requested items. So I want the task to be created (but not assigned), and then if the "Add user to group" orchestration activity is successful, I want to close that task. But if the orchestration activity is unsuccessful, then I want to be able to set the assignment group.
To do so, when the task is created in the activity, how can I grab the sys_id of the created task record and write it to the scratchpad?
or is there another way to reference a task created with a workflow, later in the workflow?
thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2018 04:16 PM
think I figured it out...this worked for grabbing the sys_id of the task created by the Catalog Task activity.
workflow.scratchpad.taskid = task.setNewGuid();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2018 02:24 PM
You bet! Also do not forget to mark my response as correct when you are done 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2018 02:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2018 04:16 PM
think I figured it out...this worked for grabbing the sys_id of the task created by the Catalog Task activity.
workflow.scratchpad.taskid = task.setNewGuid();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2018 05:21 PM
Hi Abhinay, thanks again for your help, my last post had the working solution. If you'd like to reply with that I'll mark your answer correct.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2018 08:19 PM
No worries! You can mark your answer as correct. I am still wondering why it did not work. Is this property "glide.itil.assign.number.on.insert" true in your instance?