简体   繁体   中英

Windows Workflow Foundation Pause By Id

Is it possible to Pause a running workflow if the only information I have is the Id of the process?

        workflowApp.Run();
        var workflowId = workflowApp.Id;

My requirement is that I have a web app where multiple users can start and pause processes, and the id of the processes will be stored in a database.

As far as I can tell I need a reference to the System.Activities.WorkflowApplication to pause the application as follows:

workflowApp.Unload();

How can I call Unload() to pause a running process if all I have is the Id of the running process?

I've noticed that an entry for a process is only added to the [System.Activities.DurableInstancing].[InstancesTable] when calling the Unload() method.

If you use a WorkflowApplication to run a workflow you are responsible for managing it. You can use the WorkflowServiceHost if you want to delegate that responsibility and use the Workflow Control Endpoint to unload or suspend a workflow instance by id.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM