workflow is stuck at begin after restart of its workflow

dhruva
Kilo Contributor

Workflow is stuck at begin after restart of its workflow.

find_real_file.png

Here when "flag to yes " activity is reached i am restarting it via BR

BR is as follows:

createtask();

function createtask() {

  gs.addInfoMessage("restarting workflow");

  current.u_response = '';

new Workflow().restartWorkflow(current);

}

what might be the issue here ??why is it gettin gstuck at begin even though when validated shows no signs of warnings/errors

1 ACCEPTED SOLUTION

arron_ubhi
ServiceNow Employee
ServiceNow Employee

Hi Dhruva,



Have you attempted to do an update to the source record where the workflow is running?



The workflow does not seem to continue as although the workflow has restarted, there is no update to the record in order for the workflow to progress.



Once you update the source record, e.g. Change Request, Requested Item, etc, then the workflow should proceed as expected.



You will need to modify the logic to allow the source record to be updated, so that the workflow can move forward



Please note: I would NOT recommend using any "current.update()" script in the business rule to force the workflow to move forward as this will cause a performance impact


Reference: Business Rules Best Practices - ServiceNow Wiki



Please let me know if you have any further questions.




Best Regards,



Arron


View solution in original post

7 REPLIES 7

dhruva
Kilo Contributor

I have tried doing it and it worked .:)


thanks Arron


arron_ubhi
ServiceNow Employee
ServiceNow Employee

You're welcome Dhruva - always happy to assist!



If you are satisfied with the answer provided, please mark the question as "Answered".



Best Regards,



Arron


punitchourey
Tera Contributor

Arron/Dhruva,

 

we are also facing the same issue. We are restating the workflow on change of a particular value of a field via after business rule.

Workflow is getting restarted however stuck at Begin.

We can not use current.update().

Please let me know how to fix it.

 

Thanks,

Punit