Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Is it possible to start a workflow at a specific activity block using a script?

sherard
Mega Expert

I am familiar with initiating a workflow for a record using startFlow(). Is it possible to initiate a workflow for a record but have the workflow start at a specific activity block and continue the workflow processing from that point on via script?

I have existing several records that are in mid processing. However, a new workflow was created that would work for new records moving forward. I would also like the older records that are in mid processing, to also now start using the workflow. BUT at a specific point in the workflow process.

Does that make sense?

Thanks!

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Workflows always start from Start.



Once an active context is running, you cannot detach it, associate a new version, and move that version to an arbitrary activity (block.) -- As of Helsinki.



Reference:


Workflow Concepts - ServiceNow Wiki


Creating a Workflow - ServiceNow Wiki


Using Workflow Activities - ServiceNow Wiki


View solution in original post

4 REPLIES 4

Chuck Tomasi
Tera Patron

Workflows always start from Start.



Once an active context is running, you cannot detach it, associate a new version, and move that version to an arbitrary activity (block.) -- As of Helsinki.



Reference:


Workflow Concepts - ServiceNow Wiki


Creating a Workflow - ServiceNow Wiki


Using Workflow Activities - ServiceNow Wiki


Well that's a bunch junk! LOL!



Thanks for the info. I appreciate the response!


Hi Sherard,



I have a similar requirement. Hope you had found the answer. Could you please present the series of steps to be performed to attach a new workflow for the existing records at a specific point.



Thanks in advance!



Regards,


Sunil Safare


Nicola Tomasell
Tera Contributor

Hi All,

i need to implement the same. Could you please explain step by step how to do this?

I try to do this creating a new record in "wf_executing" table but it is in "running" and the workflow is waiting that task even if is a simple task like "Set Vaule". It never runs ... 

thanks in advanced,

regards,

NT