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

Thank you for the screenshot. Very helpful!



Basically, same answer as above. The TaskStatUtils are in charge of understanding what "completion" means. If you add/modify that attribute noted in the wiki article I cited, you'll be all set.


Hi Jayanth,

Did you find the solution?Is this working to you?

My workflow is not moving further for custom state even though it is checked for Wait for completion

I have added the close_states in the dictionary for change_task. but it seems to be not working.

 

Community Alums
Not applicable

Hi Jayanth,

 

I am facing a similar issue. I have added the attribute in Dictionary Override. However the workflow is still stuck at Create task activity. Could you please help me and let me now if you have done any other steps

 

Thank you

Hi Shruthi/All,

 

Iam also facing the same issue, please let me know if u have found solution for this.

 

Thank you.