Disable default workflow for a catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2016 09:29 PM
Hi Guys,
I have a catalog item and a custom workflow associated with that item. However when a user orders that item, initially default "Service Catalog Request" workflow is running. This workflow is automatically approving the item, if it's cost is less than 1000$.
I want to disable the workflow "Service Catalog Request" for this catalog item. Please tell me how I can achieve this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2016 09:57 PM
Hi Ram,
Bear in mind that the workflow you specify for the Catalog Item will be running on the Requested Item (RITM) that gets generated, not on the Request that is parent to the RITM.
However, you could create a different REQ workflow for these type of requests that does not have automatic approval. Set it with a condition to match and an order lower than your original REQ workflow. Then on your original workflow, set "If condition matches" to "Run if no other workflows matched yet".
-Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2016 10:29 PM
Hi Brian,
I understood the need of creating a different REQ workflow. But how can i stop the "Default" workflow and run the new workflow? Where do I need to write the conditions?
I can't modify the default workflow. Is there any possibility of writing this in a business rule?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2016 10:43 PM
Hi Brian,
I wanted to disable the workflow, "Service Catalog Request". So, In a business rule, I wrote following script.
While testing, It's printed first log statement. But it's not going inside while loop. No of workflows coming as 0. But I can see the workflow indeed executed, when the request is raised.
gs.log("Running BYOD business rule");
gs.addInfoMessage("Running BYOD Business rule");
//Query for all executing workflow contexts
var flows = new Workflow().getRunningFlows(current);
while(flows.next()){
//Check for associated workflows by name
gs.addInfoMessage(flows.workflow_version.getDisplayValue());
if(flows.workflow_version.getDisplayValue() == 'Service Catalog Request'){
//Cancel the workflow context
new Workflow().cancelContext(flows);
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2016 12:52 AM
Hi Ram,
If you don't want auto approval for request then modify "Service Catalog Request" workflow as per your requirement.
If you want to stop attaching "Service Catalog Request" workflow to request table then change the value of "If condition matches" field to "--None--". By doing this change workflow will not attach to request automatically, unless you write a script to start the workflow.
-Giri