umbraco / Umbraco.Forms.Issues

Public issue tracker for Umbraco Forms
29 stars 0 forks source link

How to run workflows programatically in Umbraco Forms >= v12 #1196

Closed teeto closed 3 months ago

teeto commented 3 months ago

I have a workflow with more than 1000 records submited. Some of the workflows have not been executed or failed. I need some way of running them, i can do it inside of each form record, but that would be very slow. I would like to be able to iterate through the records, see what workflows failed and in that case, run them again. I have tried using the workflow service but i cant see a method to run a workflow. In other versions i think there was a "ExecuteWorkflows " method that could send a list of workflows to excecute, but i cant find it any more.

AndyButland commented 3 months ago

You'll need to look now for the IWorkflowExecutionService - that's the service responsible for executing workflows, whereas the one you have found I expect will be the one for managing them.