コード例 #1
0
 /// <summary>
 /// Handle internal transition event.
 /// Override it to handle transition-specific internal events 
 /// received from message bus
 /// </summary>
 /// <param name="ite"></param>
 public virtual void HandleInternalTransitionEvent(InternalTransitionEvent ite)
 {
     if (ite.ProcessInstanceId != this.ProcessInstanceId) throw new ApplicationException("Invalid process instance id");
     if (ite.CorrelationId != this.CorrelationId) throw new ApplicationException("Invalid correlation Id");
 }
コード例 #2
0
 /// <summary>
 /// Dispatch internal transition event to proper 
 /// ActiveTransition object
 /// </summary>
 /// <param name="ite"></param>
 internal virtual void DispatchInternalTransitionEvent(InternalTransitionEvent ite)
 {
     if (!_activated) throw new Exception("Process instance not activated");
     if (ite.ProcessInstanceId != this.InstanceId) throw new ApplicationException("Incorrect activation id");
     TaskShell at = GetActiveTransition(ite.CorrelationId);
     if (at == null)
     {
         at = FindMultiInstanceTransitionWithSubtask(ite.CorrelationId);
     }
     if (at == null)
     {
         log.Warn("Internal transition event: did not find transition {0}", ite.CorrelationId);
         return;
     }
     at.HandleInternalTransitionEvent(ite);
 }
コード例 #3
0
 /// <summary>
 /// Dispatch internal transition event to proper 
 /// ActiveTransition object
 /// </summary>
 /// <param name="ite"></param>
 internal virtual bool DispatchInternalTransitionEvent(InternalTransitionEvent ite)
 {
     if (Status != ProcessStatus.Ready &&
         Status != ProcessStatus.Waiting)
     {
         log.Info("Process {0} - ignoring transition event {1} because process is finished or cancelled", InstanceId, ite);
         return false;
     }
     if (!_activated) throw new Exception("Process instance not activated");
     if (ite.ProcessInstanceId != this.InstanceId) throw new ApplicationException("Incorrect activation id");
     TaskShell at = GetActiveTransition(ite.CorrelationId);
     if (at == null)
     {
         at = FindMultiInstanceTransitionWithSubtask(ite.CorrelationId);
     }
     if (at == null)
     {
         log.Warn("Internal transition event: did not find transition {0}", ite.CorrelationId);
         return false;
     }
     return at.HandleInternalTransitionEvent(ite);
 }
コード例 #4
0
ファイル: TaskShell.cs プロジェクト: alasdairhurst/nginn
 public virtual bool HandleInternalTransitionEvent(InternalTransitionEvent ite)
 {
     return ActiveTask.HandleInternalTransitionEvent(ite);
 }