I have created a utility workflow which monitors specific technical work flows to ensure they are running normally. If a work flow which should be running but isn't is found the following are executed to stop and restart it (using java script)
xtk.workflow.Stop(strId)
xtk.workflow.Start(strId)
The problem is that if the job has a scheduler it will wait until it's next scheduled start, what I need is a way to "Execute Pending Task Now" so that the job restarts immediately. I can see xtk:worflow methods for wakeup which looks like it might be want but I can't get it to start right away.
Is there away to start the workflow so that it runs immediately?
Solved! Go to Solution.
Hi @Ken_Qrious - there are a few ways to achieve this. I've found the simplest is to add an External signal to the start of the workflow and use xtk.workflow.PostEvent to kick it off via the External signal activity. This gives you the scheduler which will kick off when the schedule arrives, plus it also gives you a way to execute the workflow at any other time (once the workflow is running).
Cheers
Darren
Hi @Ken_Qrious - there are a few ways to achieve this. I've found the simplest is to add an External signal to the start of the workflow and use xtk.workflow.PostEvent to kick it off via the External signal activity. This gives you the scheduler which will kick off when the schedule arrives, plus it also gives you a way to execute the workflow at any other time (once the workflow is running).
Cheers
Darren
Perfect answer, but carefull with this kind of methodology:
Root cause of the issue should always be addressed in priority...
I remember a customer that made in the past a such mechanism (but for none OOTB workflows) despite support recommandation: he burned in 5 monthes his xtkNewId sequence
Thanks for the replies @Darren_Bowers and @LaurentLam, it's good to be aware of potential pitfalls. The main use for the auto restart would be for technical work flows which load data from external systems. The process would be limited to selected work flows and would generate an alert to our support team.
Views
Replies
Total Likes
Views
Likes
Replies