Ejemplo n.º 1
0
 public virtual ProcessDefinitionBuilder ExecutionListener(string eventName, IDelegateListener <IBaseDelegateExecution> executionListener)
 {
     if (transition == null)
     {
         ScopeStack.Peek().AddExecutionListener(eventName, executionListener);
     }
     else
     {
         transition.AddExecutionListener(executionListener);
     }
     return(this);
 }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 public virtual ProcessDefinitionBuilder ExecutionListener(IDelegateListener <IBaseDelegateExecution> executionListener)
 {
     if (transition != null)
     {
         transition.AddExecutionListener(executionListener);
     }
     else
     {
         throw new PvmException("not in a transition scope");
     }
     return(this);
 }
Ejemplo n.º 4
0
        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);
            }
        }
Ejemplo n.º 5
0
 public virtual void AddExecutionListener(string eventName, IDelegateListener <IBaseDelegateExecution> executionListener, int index)
 {
     AddListener(eventName, executionListener, index);
 }
Ejemplo n.º 6
0
 public virtual void AddListener(string eventName, IDelegateListener <IBaseDelegateExecution> listener, int index)
 {
     AddListenerToMap(listeners, eventName, listener, index);
 }
Ejemplo n.º 7
0
 public virtual void AddBuiltInListener(string eventName, IDelegateListener <IBaseDelegateExecution> listener)
 {
     AddBuiltInListener(eventName, listener, -1);
 }
Ejemplo n.º 8
0
 public virtual void AddExecutionListener(IDelegateListener <IBaseDelegateExecution> executionListener)
 {
     AddListener(ExecutionListenerFields.EventNameTake, executionListener);
 }
Ejemplo n.º 9
0
 public void InvokeListener(IDelegateListener <IBaseDelegateExecution> listener)
 {
     listener.Notify(this);
 }
Ejemplo n.º 10
0
 public ExecutionListenerInvocation(IDelegateListener <IBaseDelegateExecution> executionListenerInstance, IDelegateExecution execution)
     : base(execution, null)
 {
     this.ExecutionListenerInstance = executionListenerInstance;
     this.Execution = execution;
 }