- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2018 12:15 AM
Hi guys,
After reading a couple of days Docs and this forum, I still didn't find the answer.
(link to Docs: Scripted templates)
I'm running a workflow from RITM and creating a Change ticket with a couple of change tasks. I'm using a template to create all these -- success.
However, the template is not adding the affected CI to the change ticket and I also cannot add it by passing the values from the workflow. If I don't apply the template, the values are passed successfully but together with template it seems that it's not possible. Can someone suggest a workaround?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2018 12:28 AM
Finally got this working. I created an event that I launch from Change Request workflow as a final task. RITM workflow then waits for this event and continues after it's launched.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2018 04:26 AM
OK guys.
The reason the first script doesn't need a row change.insert (or update) is that the template has child templates. When I took those off, Change ticket was not created anymore. Then I just added rows:
change.cmdb_ci = current.configuration_item;
change.parent = current.number;
change.insert();
And Change ticket is now created using template. Just like I wanted.
Next solution was to modify the Change process workflow to add child tasks (again, using a template) with another workflow (as the original workflow also does) - and wait for that to complete before creating the second one. Now I was also able to pass affected CI from current ticket to the child task. Child tasks are also completed in the correct order and the later task is not created until the first one is complete. Excellent!
Now the last issue is left:
The original RITM ticket is waiting for the Change ticket to close. In my workflow, I have a "Wait for" condition that checks whether the change ticket is in state "Closed". When a change ticket is closed, it writes comments to the RITM and changes the State from 'Pending' to 'Open'. I tried using both these as indicator for the workflow to continue but no success. Help with this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2018 05:23 AM
So now you have change.insert() in the added code lines.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2018 11:08 AM
Yes. Do you have any idea for the last issue? How can I check that the Change ticket is closed as I explained in my previous message?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2018 12:28 AM
Finally got this working. I created an event that I launch from Change Request workflow as a final task. RITM workflow then waits for this event and continues after it's launched.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2018 06:47 PM
Hi latvamik,
am trying to create the change request using template from workflow. Change Tasks are not getting attached to it. can someone help me with this?