Close Task in Workflow Closed Skipped vs Closed Complete

Katie A
Mega Guru

I have a workflow with a Create Task activity that is set to "Wait for Completion."

I would like to be able to transition to a different activity based on whether the task was marked "Closed Complete" or "Closed Skipped". I was looking into the "Add Condition" on the activity but it does not look like the Task state can be checked using that condition.

I also considered using an IF statement AFTER that activity closes to check the state of that task.

Will I need to use a script to build a query and check the task value in the IF activity script field? Or is there a more simple method to check the task's state before proceeding to the appropriate activity?

Thanks!

1 ACCEPTED SOLUTION

manikorada
ServiceNow Employee
ServiceNow Employee

Kathryn,



You should be able to use the Add option for this.


The condition will be soemthing like 'activity.result == 3' for 'closed complete'


View solution in original post

2 REPLIES 2

manikorada
ServiceNow Employee
ServiceNow Employee

Kathryn,



You should be able to use the Add option for this.


The condition will be soemthing like 'activity.result == 3' for 'closed complete'


Brad Tilton
ServiceNow Employee
ServiceNow Employee

You should be able to add a new condition to the create task activity where you can take a second action based on the result (state field value) of the activity as long as active changes to false. This community post gives an idea of what you can do.



Add new condition for a catalog task activity