Workflow cancellation during approval activity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2009 05:48 PM
I am working on setting up a workflow for Change. I have created a Change Control Group approval. If the Change Control Group approves then there is a CAB approval if the Change Control Group does not approve then the change is rerouted back to the Requestor. After the Requestor is finished, the requestor sends it back to the Change Control Group for approval. At this point the change control group needs to have the option to cancel the Change which should set the Change state to "Closed - Cancelled" or change control can approve or reject the change.
I am having difficulty getting the change to cancel.
First Problem is the workflow is at the approval and it wants either to approve or reject. I tried adding a new condition but had no luck.
I noticed there is a cancel UI Action on the workflow with the following code:
var w = new Workflow(); w.cancelContext(current);
Which I figured that I could modify to:
var w = new Workflow(); w.cancel(current);
It cancels which is great but it keeps setting the State of the Change to Closed Complete or "3".
Does anybody know how I can cancel a Change while the workflow is at an approval activity?
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2009 06:41 AM
I have a similar issue with the Catalog Task (triggered by the requested item workflow).
I am also looking to have more details on the "w.cancelContext(id)" function...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2009 11:05 AM
Me too, but on the Request level. I want to be able to add additional Catalog items to a Request that is already started. If the price goes from $0 (access request) to one that is over $1 (request for an item), I want the approval workflow to cancel and start a new (different) approval workflow.
I have been using the following wiki article but can't seem to get it to do what I want.
http://wiki.service-now.com/index.php?title=Workflow_FAQ
It leaves the original workflow going then jumps into the second one, skipping the first half of the approval process.
We have $0 = Manager approval only
We have >$1 = Manager and VP approval.
So when I have an SR start with $0, add an item that costs money, it keeps both approval workflows going but the workflow for approval with cost starts after the Manager's approval (like it has already been approved which it hasn't).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2009 11:29 AM
var w. = new Workflow();
w.cancel(current);
var context = w.startFlow('d2400ec20a0a3c1c00ca5ff5c6fae421', current, current.operation()); }
Will cancel the workflow. but now I have to figure out how to tell the new workflow that a Cancelled approval does not mean it was approved or to skip it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2011 05:43 AM
Did you ever get this working fully? I am curious on the details of how you resolved this.
Appreciate your time and effort!