3
votes

I have workflow with correlation. When I call twice some method with the same parameters i have the following error:

The execution of an InstancePersistenceCommand was interrupted by a key collision. The instance key with value 'bcd874f3-1d47-d9f0-de51-4487d1e4e12e' could not be associated to the instance because it is already associated to a different instance.

Is there any way to delete previous workflow and start new?

1

1 Answers

1
votes

You can add a WorkflowControlEndpoint to the WorkflowServiceHost and use the WorkflowControlClient to terminate the existing workflow before starting a new one with the same correlation key.