Workflow proceeds to cancellation path even when task is Closed Complete.

tilekarnilesh
Giga Guru

Hi everyone,

I’ve built a workflow for a Project Work Request. After each task, there’s an If activity that checks if the task’s state is Closed Complete (state = 3).

However, when I manually close an SC task as Closed Complete, it then automatically changes to Closed Incomplete and finally goes to the Cancelled branch. Even though the workflow context shows the task as Finished, the "No" path is always taken instead of "Yes."

What I’ve already checked:

The task's state is indeed set to 3 (Closed Complete).

Workflow context shows the task as Finished.

The If condition is correctly configured to evaluate the state.

No errors or skipped steps appear in the workflow execution log.

I’ve attached a screenshot of the state change sequence (Closed Complete → Closed Incomplete → Cancelled) for reference.

I’ve also attached the script condition used in the If activity along with screenshots of the workflow and the task details.

Question:
How can I correctly evaluate if a task is Closed Complete in a workflow If condition?
Do I need to handle something differently when checking the task’s state?
Is there a more reliable approach—such as using a Run Script activity to capture and branch on the task state—especially since the SC task automatically transitions from Closed Complete to Closed Incomplete and then to Cancelled?

Any insights or alternate solution suggestions would be greatly appreciated!

Thanks in advance for the help!

Make sure to attach the following images:

A screenshot of your workflow with the If activity and script snippet.

A screenshot showing the state change (Closed Complete → Closed Incomplete → Cancelled).

Feel free to tweak or add additional context as needed. Happy posting!

tnileshmano_2-1744287633908.png

 

tnileshmano_1-1744287609980.png

 

tnileshmano_0-1744287577186.jpeg

 

0 REPLIES 0