- 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-23-2018 09:43 AM
Hi Abhinay, that property in our DEV instance is actually set to false, is that why it didn't work?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2018 09:51 AM
No, setting to true will not work. In this case it should have worked. Can you take out the line 18, 19 in your screenshot and then go to the request item form and click Workflow context link and then add scratchpad field on to the form and you should see all the scratchpad variables and the values there