I'm implementing functionality to attempt to cancel a workflow instance that is currently in an executing state. I'm using the .NET Cancel() method for a WorkflowApplication, but first I believe I'm required to Load the instance:
wf.Load(id);
then
wf.Cancel();
With the Load method, I get an InstanceLockedException. There is only one workflow host - which in this case is a windows Service running locally on my machine. I believe the instance is locked by the workflow service ... is there a way to get around this?