Workflow taking too long to execute and hangs even at zero warnings and errors at validation

Dom Davidson
Giga Contributor

Hello ServiceNow Gurus,

I have a fairly large workflow that generates about 50 tasks, uses a couple of "branch and join", a few "wait for" conditions, "if" conditions, and a few set value conditions.

During validation and at publish- the system shows there are no warnings or critical errors. However, when the workflow conditions are met on the form and triggered- the workflow takes a long time to execute and often doesn't execute and hangs.

What are a few things I can do to remediate this issue?

Much thanks for you insight on this.

-Dominic

1 ACCEPTED SOLUTION

Manoj Kumar16
Giga Guru

Try to place the chunks in seperate workflows and use them as a subworkflow in your main workflow. I hope this helps.


View solution in original post

8 REPLIES 8

Manoj Kumar16
Giga Guru

I have a few questions-



Can you provide a snapshot of the workflow ?



Are you creating the tasks using workflow activity or using initialize() or newRecord() function to generate the tasks ?



What is the span of the timers you have created on the workflow and how many such timers exist ?


Hi Manoj,



Please see attached snapshots of my workflow.



To answer your questions;


-All tasks were created using the workflow activity.


-And there are no timers created on this workflow.



Workflow 1 of 2.PNGWorkflow 2 of 2.PNG


-Dominic


Manoj Kumar16
Giga Guru

Hi Dominic,



Are you using this workflow in a catalog item or any table ? where are you creating the tasks? If you want to create a catalog task then you should use catalog task activity instead of create task.



But I would recommend-



Instead of creating so many workflow activities- why don't you create a table and mention all the task details there- eg.- columns in the table will contain- short description,assignment groups,description,condition etc. If the tasks created depends on particular region or country then you can mentioned that too in the table.



Create a runscript activity to get the condition specified in the catalog item and run a GlideRecord in the table you created to pick up the assignment groups and to create the tasks using initialize function in sc_task table.


Hi Manoj,



The table the workflow is driven off is the Release table(rm_release).   The workflow is only triggered when the user selects Major Release, and the tasks are created on the Release Task table(rm_task).



Also, I checked my requirements, I am not allowed to create a secondary table.



What are my other options?



Thanks.


-Dominic