Wait for completion in workflow

k_jayanth
Tera Contributor

In the change task state i have replaced 'close skipped' with 'close failed', In the workflow if 'wait for condition' is checked and the state of task is either closed complete or incomplete the flow will complete the task and execution moves forward but how can make the workflow to go forward even when the states value is 'closed failed', in short i want the attributes of closed complete and incomplete to be added to closed failed.

Many Thanks

- Jayanth

1 ACCEPTED SOLUTION

Ah, I think I may understand a little better now. No, do not modify the TaskStateUtil script include. That controls how all tasks behave.



It sounds like you created a new state and value (I'll assume the state value is 11 in this case.)



What you need to do is update the dictionary entry on the table to include your new state value "11" in the close_states attribute so TaskStateUtil treats it the same as the default 3, 4, 7 values (setting Active=false when you get to it, triggering any closure business rules, etc.)



http://wiki.servicenow.com/index.php?title=TaskStateUtil#gsc.tab=0


View solution in original post

18 REPLIES 18

Chuck Tomasi
Tera Patron

Can you include a screenshot of what you are working on? It sounds like you just need to add the condition to your condition filter.



Condition:


State | is one of | Closed Complete


                                                        Closed incomplete


                                                          Closed Failed



(sorry about the alignment, they all appear in one box similar to below.)


find_real_file.png


Hi Chuck,



Thank you for responding, can you please tell where i should add this condition.


Here you go:


  1. Open the workflow using Workflow> Workflow Editor
  2. Locate the workflow on the right side
  3. When the workflow has opened, use the menu icon (three bars) to Checkout the workflow (so you can edit it)
  4. Locate the If activity in question on the workflow and double click the header bar for that activity
  5. Change your condition there
  6. Close the activity
  7. Publish the workflow
  8. Test


Reference:


Workflow Concepts - ServiceNow Wiki


Creating a Workflow - ServiceNow Wiki


Using Workflow Activities - ServiceNow Wiki


Sharique Azim
Mega Sage

Hi jayanth,



Although using the suggestion by adam in Add state to closed states   should be helpful.



But you can also modify the workflow     condition by using gliderecord,and   checking if the values in closed complete/incomplete or the   one you created close failed.