- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2020 09:34 AM
when the state of the catalog task related to an RITM is changed to closed cancelled The Work flow is still executing
How to stop the work flow if the state is changed to closed cancelled
Solved! Go to Solution.
- Labels:
-
Service Catalog
-
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2020 09:57 AM
The best way to do this is to add Conditions on this specific task on the workflow, or create a business rule if you want any task that is Closed Incomplete/cancelled to cancel the RITM. When an RITM is Closed Incomplete, there are out of the box Business Rules in place to close incomplete any other open tasks and cancel the workflow. To add Conditions, right-click on the task activity, and choose Add Condition. You should have one condition for each inactive catalog task state, so out of the box that's Closed Complete (3), Closed Incomplete (4), and Closed Skipped (7). Give the condition a Name, then in the Condition field type activity.result==3 for Closed Complete.
Repeat to add the other conditions, then right-click directly on the Always condition and choose Delete. Now all you have to do is route the paths accordingly - you may want to continue on to the next task/activity if Closed Complete, and maybe Closed Skipped too, and point to an activity that makes the RITM Closed Incomplete if the task is Closed Incomplete.
In this example the Set Values activity is setting the (RITM) State = Closed Incomplete, Active = false, and the Stage to Complete.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2020 09:45 AM
Can you provide a screenshot of the workflow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2020 09:57 AM
The best way to do this is to add Conditions on this specific task on the workflow, or create a business rule if you want any task that is Closed Incomplete/cancelled to cancel the RITM. When an RITM is Closed Incomplete, there are out of the box Business Rules in place to close incomplete any other open tasks and cancel the workflow. To add Conditions, right-click on the task activity, and choose Add Condition. You should have one condition for each inactive catalog task state, so out of the box that's Closed Complete (3), Closed Incomplete (4), and Closed Skipped (7). Give the condition a Name, then in the Condition field type activity.result==3 for Closed Complete.
Repeat to add the other conditions, then right-click directly on the Always condition and choose Delete. Now all you have to do is route the paths accordingly - you may want to continue on to the next task/activity if Closed Complete, and maybe Closed Skipped too, and point to an activity that makes the RITM Closed Incomplete if the task is Closed Incomplete.
In this example the Set Values activity is setting the (RITM) State = Closed Incomplete, Active = false, and the Stage to Complete.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 07:19 AM
I have added a new choice Complete cancelled and i modified the conditions based on the suggestions you have given but still when i tested by changing the state of task to closed cancelled the work flow is still running, any pointer where i am missing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 07:52 AM
When viewing the RITM, use the Show Workflow Related Link just above the Related Lists. If the the Catalog Task still shows in green/Running, then you need to add your new State as 'closed state', so that the task will be closed and the workflow will move on. You should see the task in blue/completed with a blue arrow indicating which path it took.
To add the new State as a closed state, right-click on the State field label when viewing the catalog task form, and choose Configure Dictionary. Look on the Dictionary Overrides Related List to see if there is a record for sc_task. Click on it to modify if it exists, otherwise click the New button. Click the Override attributes box, then paste this into the Attributes
close_states=3;4;7
Add a semicolon after the 7 and the value of your new State. Submit/Update and this should do it.