Example #1
0
 public void ApplyWorkflowChanges(WorkflowChanges workflowChanges)
 {
     using (new WorkflowTraceTransfer(this.InstanceId))
     {
         while (true)
         {
             WorkflowExecutor executor = _runtime.Load(this);
             if (executor.IsInstanceValid)
             {
                 try
                 {
                     executor.ApplyWorkflowChanges(workflowChanges);
                     break;
                 }
                 catch (InvalidOperationException)
                 {
                     if (executor.IsInstanceValid)
                     {
                         throw;
                     }
                 }
             }
         }
     }
 }