コード例 #1
0
 public virtual ProcessDefinitionBuilder executionListener(ExecutionListener executionListener)
 {
     if (transition_Renamed != null)
     {
         transition_Renamed.addExecutionListener(executionListener);
     }
     else
     {
         throw new PvmException("not in a transition scope");
     }
     return(this);
 }
コード例 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testExecutionEntitySerialization() throws Exception
        public virtual void testExecutionEntitySerialization()
        {
            ExecutionEntity execution = new ExecutionEntity();

            ActivityImpl activityImpl = new ActivityImpl("test", null);

            activityImpl.ExecutionListeners["start"] = Collections.singletonList <ExecutionListener>(new TestExecutionListener());
            execution.setActivity(activityImpl);

            ProcessDefinitionImpl processDefinitionImpl = new ProcessDefinitionImpl("test");

            processDefinitionImpl.ExecutionListeners["start"] = Collections.singletonList <ExecutionListener>(new TestExecutionListener());
            execution.setProcessDefinition(processDefinitionImpl);

            TransitionImpl transitionImpl = new TransitionImpl("test", new ProcessDefinitionImpl("test"));

            transitionImpl.addExecutionListener(new TestExecutionListener());
            execution.Transition = transitionImpl;

            execution.ProcessInstanceStartContext.Initial = activityImpl;
            execution.setSuperExecution(new ExecutionEntity());

            execution.Active             = true;
            execution.Canceled           = false;
            execution.BusinessKey        = "myBusinessKey";
            execution.DeleteReason       = "no reason";
            execution.ActivityInstanceId = "123";
            execution.Scope = false;

            sbyte[] data = writeObject(execution);
            execution = (ExecutionEntity)readObject(data);

            assertEquals("myBusinessKey", execution.BusinessKey);
            assertEquals("no reason", execution.DeleteReason);
            assertEquals("123", execution.ActivityInstanceId);
        }
コード例 #3
0
 protected internal virtual void addTakeEventListener(TransitionImpl transition)
 {
     transition.addExecutionListener(EXECUTION_LISTENER);
 }
コード例 #4
0
 public virtual void parseSequenceFlow(Element sequenceFlowElement, ScopeImpl scopeElement, TransitionImpl transition)
 {
     transition.addExecutionListener(new CdiEventListener());
 }