/// <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"); }
/// <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); }
/// <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); }
public virtual bool HandleInternalTransitionEvent(InternalTransitionEvent ite) { return ActiveTask.HandleInternalTransitionEvent(ite); }