public virtual ProcessDefinitionBuilder ExecutionListener(string eventName, IDelegateListener <IBaseDelegateExecution> executionListener) { if (transition == null) { ScopeStack.Peek().AddExecutionListener(eventName, executionListener); } else { transition.AddExecutionListener(executionListener); } return(this); }
protected internal virtual void InitExecutionListeners(IHistoryEventProducer historyEventProducer, IHistoryLevel historyLevel) { ProcessInstanceStartListener = new ProcessInstanceStartListener(historyEventProducer, historyLevel); ProcessInstanceEndListener = new ProcessInstanceEndListener(historyEventProducer, historyLevel); ActivityInstanceStartListener = new ActivityInstanceStartListener(historyEventProducer, historyLevel); ActivityInstanceEndListener = new ActivityInstanceEndListener(historyEventProducer, historyLevel); UserTaskAssignmentHandler = new ActivityInstanceUpdateListener(historyEventProducer, historyLevel); UserTaskIdHandler = UserTaskAssignmentHandler; }
public virtual ProcessDefinitionBuilder ExecutionListener(IDelegateListener <IBaseDelegateExecution> executionListener) { if (transition != null) { transition.AddExecutionListener(executionListener); } else { throw new PvmException("not in a transition scope"); } return(this); }
protected internal virtual void AddListenerToMap(IDictionary <string, IList <IDelegateListener <IBaseDelegateExecution> > > listenerMap, string eventName, IDelegateListener <IBaseDelegateExecution> listener, int index) { IList <IDelegateListener <IBaseDelegateExecution> > listeners; listenerMap.TryGetValue(eventName, out listeners); if (listeners == null) { listeners = new List <IDelegateListener <IBaseDelegateExecution> >(); listenerMap[eventName] = listeners; } if (index < 0) { listeners.Add(listener); } else { listeners.Insert(index, listener); } }
public virtual void AddExecutionListener(string eventName, IDelegateListener <IBaseDelegateExecution> executionListener, int index) { AddListener(eventName, executionListener, index); }
public virtual void AddListener(string eventName, IDelegateListener <IBaseDelegateExecution> listener, int index) { AddListenerToMap(listeners, eventName, listener, index); }
public virtual void AddBuiltInListener(string eventName, IDelegateListener <IBaseDelegateExecution> listener) { AddBuiltInListener(eventName, listener, -1); }
public virtual void AddExecutionListener(IDelegateListener <IBaseDelegateExecution> executionListener) { AddListener(ExecutionListenerFields.EventNameTake, executionListener); }
public void InvokeListener(IDelegateListener <IBaseDelegateExecution> listener) { listener.Notify(this); }
public ExecutionListenerInvocation(IDelegateListener <IBaseDelegateExecution> executionListenerInstance, IDelegateExecution execution) : base(execution, null) { this.ExecutionListenerInstance = executionListenerInstance; this.Execution = execution; }