Note that there are some explanatory texts on larger screens.

plurals
  1. POError when attempting to Resume a Windows Workflow
    primarykey
    data
    text
    <p>When attempting to Resume a Workflow with the following code:</p> <pre><code> public WorkflowApplication LoadInstance(Guid instanceId) { if (this.instances.ContainsKey(instanceId)) return this.instances[instanceId]; WorkflowApplication instance = new WorkflowApplication(new Tarpon.Workflows.CreateContact()); // Create Persistable Workflow SqlWorkflowInstanceStore store = new SqlWorkflowInstanceStore(ConfigurationManager.ConnectionStrings["WorkflowPersistance"].ConnectionString); store.HostLockRenewalPeriod = new TimeSpan(0, 0, 5); instance.InstanceStore = store; // Load Instance instance.Completed += OnWorkflowCompleted; instance.Idle += OnIdle; instance.PersistableIdle += OnIdleAndPersistable; instance.Aborted += OnAborted; instance.Load(instanceId); // Save instance in list of running instances this.instances.Add(instance.Id, instance); // ERROR IS THROWN HERE return instance; } </code></pre> <p>I get and error on the line "<strong>this.instances.Add(instance.Id, instance)</strong>":</p> <pre><code>The execution of an InstancePersistenceCommand was interrupted because the instance '9b9430b6-f182-469d-bcae-0886d546f7ea' is locked by a different instance owner. This error usually occurs because a different host has the instance loaded. The instance owner ID of the owner or host with a lock on the instance is '30411662-b9b3-4250-9e2c-5aaa9895b740'. </code></pre> <p>I have attempted to lower the HostLockRenewalPeriod in the above code, and also added the below code to hopefully disable the lock on the Instance but to no avail. It also never seems to break into the below code. Every time I go past the Load() method, I get th above error.</p> <pre><code> public PersistableIdleAction OnIdleAndPersistable(WorkflowApplicationIdleEventArgs e) { instances.Remove(e.InstanceId); return PersistableIdleAction.Unload; } </code></pre> <p>It seems this code works half the time, but the other half it does not resume it's workflows correctly. Does anyone have any clue to what I can do to remove the lock properly, without having to re-write all of this functionality?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload