The CreatorCon Call for Content is officially open! Get started here.

Workflow doesnt create a task after approval for one of the Switches

lukasz szumilas
Tera Guru

Hello,

 

I have a Catalog Item with a workflow to create a Catalog Task after approvals. The workflow consist of different switches depending on the choices the user makes. All Switches are working fine and creating a task after approval, but one after approval doesnt create a task. I checked an all the nodes are linked. When i checked the Workflow Activity History for not working scenario the last step is the Switch with choosen option (so no task activity). For working scenario after Switch with choosen option the task is being created and flow goes further.

I also checked the Workflow Log and for working switch its just 1 record:

"The Workflow Log for working one is just: Name_of_workflow, for RITM000879554"

For the Not working Switch the Workflow Log has 4 messages:

first) "The Workflow Log for working one is just: Name_of_workflow, for RITM000879554"

second-fourth) "After running a sequence of activities we expected a 'last executing' record to predict the future stages from"

 

I tried to add a wait condition after a switch and before Catalog task creation but it didnt help. If anyone encountered similiar issue or has idea please help, thanks !

1 REPLY 1

Syedmd08
Kilo Guru

Here are a few suggestions to help you troubleshoot and resolve the issue:

  1. Check the conditions for the switch: Make sure that the conditions for the switch are configured correctly and that the appropriate variables are being evaluated. If the conditions are not met, then the workflow will not progress to the next step.

  2. Verify the associated script: Check the script that is associated with the switch to ensure that it is running without errors. If there are any syntax errors or logical issues, then the script may be preventing the workflow from progressing.

  3. Review the Workflow Log: Review the Workflow Log for any errors or issues that may be causing the workflow to fail. The messages you provided from the log suggest that there may be an issue with the execution sequence of activities in the workflow. You may need to review the activities preceding the switch to identify any potential issues.

  4. Test the Workflow: Test the workflow by creating a test Catalog Item and submitting it with the same conditions as the one that is failing. This will help you identify any issues specific to the Catalog Item and its associated workflow.

  5. Consider contacting ServiceNow Support: If the above steps do not help you resolve the issue, you may need to contact ServiceNow Support to help you diagnose and resolve the issue. They can review the logs and provide additional guidance to help you troubleshoot the problem.

 
 
 
 
Please mark my reply as Helpful and/or Accept Solution, if applicable. Thanks!