Try our conversational search powered by Generative AI!

terminate invalid workflow

Vote:
 

I have a custom workflow and several instances of that workflow are already running. I have made some changes to the workflow definition  and now the persisted workflow cannot be deserialized. The proper solution would probably be to deploy older version of the assemblies, but I would prefer to go a safer route: just terminate all workflows that cannot be restored. I tried the following code:

WorkflowSystem.InstanceHandler.TerminateInstance(workflowId, "cannot deserialize");

However, it still tries to deserialize the workflow and throws a SerializationException with message of "The object with ID 177 implements the IObjectReference interface for which all dependencies cannot be resolved. The likely cause is two instances of IObjectReference that have a mutual dependency on each other."

So how do I get rid of the offending workflows?

#63776
Nov 29, 2012 11:54
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.