- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2019 04:49 AM
Hi everyone,
I could use some help with this issue.
Here is what I'm trying to do:
Goal: Create a change record after a catalog task is completed and store the change # in the catalog task. Do not continue the workflow until the catalog task AND change are closed.
Current solution:
Within the workflow, after the Catalog Task activity, I added a Create Task activity that creates the change and clicked "Wait for completion". This will allow the workflow to proceed when the change closes.
Issue with above solution: I need to store the change number (not the Sys ID) in the catalog task description within the Create Task activity but it doesn't seem to be available because I can't determine when the change is committed to the database.
Another idea I thought about using was the Wait for Condition activity but that only applies when the record (in this case, the requested item) is updated so that won't work.
Any suggestions on how to store the change number into the catalog task?
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2019 08:23 AM
I used task.number in create task activity script and it works for me. It did give me the task #.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2019 05:31 AM
I don't think this is possible within the Create Task activity. I just did a test and tried the following with no result.
gs.info('new task number=' + task.getDisplayValue());
So the task number isn't known until after the Create task runs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2019 05:36 AM
Chuck,
Thanks for the information. Any suggestions/ideas on how I could do what I want to do? Perhaps a business rule on the sc_task on update? I'm suggesting on how to do this.
Thanks,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2019 05:38 AM
You and I and Stewe Lundin are the same wavelength. A BR on the sc_task record could retrieve the sys_id, number (aka Display Value) etc and you could then store that in the change record provided you have a link of some time (a la a reference field that links the task to the change) then update the change.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2019 07:30 AM
You can use getNextObjNumberPadded to get the next number
new NumberManager(gr.sys_meta.name).getNextObjNumberPadded()