blackmoreb
blackmoreb

Reputation: 23

WF 4, WCF, cancel running workflow

Currently have a simple workflow exposed as a service endpoint. The service correlates on the workflow instance id and everything works as expected (2 service calls available ReceiveBegin, Execute).

My problem is that I would like the user to be able to cancel the long running part of the workflow by calling another Receive on the workflow. Have had a look at the WorkflowApplication.Cancel but as I am running this as a WCF service it doesn't seem to be available.

Documentation seems a bit light on this area and most HOL and examples focus on console apps hosting the workflow.

Upvotes: 2

Views: 1752

Answers (2)

Ron Jacobs
Ron Jacobs

Reputation: 3279

Another option is shown in the WF4 Batch Job example

Upvotes: 1

Maurice
Maurice

Reputation: 27632

With workflow services the Workflow Control Endpoint and WorkflowControlClient will allow you to cancel workflow instances.

Upvotes: 2

Related Questions