Start a workflow using a javascript | Community
Skip to main content
noemielebaut
January 3, 2020
Solved

Start a workflow using a javascript

  • January 3, 2020
  • 1 reply
  • 3252 views

Hello, 

 

The objective is to create a technical workflow with a query box that selects specific workflows in status Paused or Finished. And then the idea would be to have a JS code which Start or Restart the workflows (probably using a loop, one workflow at a time). 

 

I would like to get the correct JS code to use. 

 

Can you help?

 

Thank you !

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by badr_eddine

Hello, 

 

After generating the condition when your workflow needs to be restarted, you can use this JS code: 

xtk.workflow.Restart(id)

 

id : the id number of the workflow that you want to restart.

 

Regards, 

Badr.

1 reply

badr_eddineAccepted solution
Level 3
January 3, 2020

Hello, 

 

After generating the condition when your workflow needs to be restarted, you can use this JS code: 

xtk.workflow.Restart(id)

 

id : the id number of the workflow that you want to restart.

 

Regards, 

Badr.