- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 12:38 PM
I have a custom workflow I am working on and the user requested that a catalog task performs two different options when a catalog task is marked "Closed Complete" and when it is marked "Closed Cancelled". When this particular catalog task is marked "closed complete" it is supposed to go to the PAB Approval and I have it working successfully. When the user marks it "closed cancelled" it is supposed to go to the ITSM PMO Approval. However, I cannot get the "closed cancelled" to work properly. I saw a few discussion up here and tried to use the examples but they did not work for me. It may just be me....lol. But I have the examples of what I have going on below and attached.
So I used the always condition that was there already for the catalog task and updated it with the PAB Approval Main as where I want the task to go after it is closed completed and I created a or made a copy of the condition and updated it to be named "Closed Cancelled" and I want it to go to the ITSM PMO Approval but it won't go. The "Always" for Close complete works, but not the closed cancelled. So i am wondering do I need to change the condition from true to activity.result and something or what because it goes to PAB Approval instead of ITSM PMO approval. Can someone please assist me as I am on a deadline?
Thank you so much!
Chenelle
252-544-4404
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 12:50 PM
Hello Chenelle,
Using the state variable to control the path of execution in a workflow is fraught with (bad) consequences.
I recommend that you consider placing a catalog variable, probably multiple choice, on the task. This catalog variable would allow the user in the assessment task to select the method of approval. They would then close the task normally.
You would also add an IF block after the task. The IF block will check the value of your catalog variable and then branch accordingly.
Here's an example from one of our workflows. In this case, the paths are Run Script blocks, and in your case you would use Catalog Task blocks.
But the idea is the same. In the green block, the a user sets a value for a variable which is tested in the following "If block". The condition of the If block determines which path is taken.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 12:50 PM
Hello Chenelle,
Using the state variable to control the path of execution in a workflow is fraught with (bad) consequences.
I recommend that you consider placing a catalog variable, probably multiple choice, on the task. This catalog variable would allow the user in the assessment task to select the method of approval. They would then close the task normally.
You would also add an IF block after the task. The IF block will check the value of your catalog variable and then branch accordingly.
Here's an example from one of our workflows. In this case, the paths are Run Script blocks, and in your case you would use Catalog Task blocks.
But the idea is the same. In the green block, the a user sets a value for a variable which is tested in the following "If block". The condition of the If block determines which path is taken.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 01:45 PM
Thank you for responding Steve. So your answer sounds good, however I am stuck on the "placing a catalog variable, probably multiple choice, on the task". So basically I would create a variable that would be hidden on the front end but view-able on the task level and the person fulfilling the the catalog task can answer the question and that will determine the path of the closed cancelled or closed complete? Please advise further if you can....
Thanks!
Chenelle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 02:06 PM
There is such a thing as a workflow variable that you can create for a given workflow. You can place it one the tasks which need to see it.
Here's a link to a wiki article for you: http://wiki.servicenow.com/index.php?title=Using_Variables_in_a_Workflow#gsc.tab=0
That said, I have used a slightly different approach. Create a variable on the catalog item ( just like your other variables for the form ) and hide it with a Catalog UI Pollicy. Check "Applies to Catalog Item view", but do NOT check "Applies on Catalog Tasks" nor "Applies on Requested Items".
This means that the variable will NOT appear as the user fills our the form, but WILL appear for the people working the ticket.
Here's a link for you: http://wiki.servicenow.com/index.php?title=Service_Catalog_Variables#gsc.tab=0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2016 06:54 AM
Ok, gotcha! Thank you Steve, I will try it out!