Package org.jbpm.graph.exe

Examples of org.jbpm.graph.exe.ProcessInstance


      "    </task>" +
      "  </task-node>" +
      "</process-definition>"
    );
   
    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    processInstance.signal();
    TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
    assertEquals(1, taskMgmtInstance.getTaskInstances().size());
    TaskInstance changeNappy = (TaskInstance) taskMgmtInstance.getTaskInstances().iterator().next();
    assertEquals("me", changeNappy.getActorId());
   
    Set expectedPooledActors = new HashSet();
View Full Code Here


      "</process-definition>"
    );
   
    AssignActionHandler.assignments = new ArrayList();
   
    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    processInstance.signal();
   
    List expectedAssignments = new ArrayList();
    expectedAssignments.add("from 'null' to 'me'");
    assertEquals(expectedAssignments, AssignActionHandler.assignments);
   
    TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
    TaskInstance doSomething = (TaskInstance) taskMgmtInstance.getTaskInstances().iterator().next();
    doSomething.setActorId("you");

    expectedAssignments.add("from 'me' to 'you'");
    assertEquals(expectedAssignments, AssignActionHandler.assignments);
View Full Code Here

      "</process-definition>"
    );
   
    AssignActionHandler.assignments = new ArrayList();
   
    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    processInstance.getContextInstance().setVariable("assignmentBean", new AssignmentBean());
    processInstance.signal();
   
    TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
    TaskInstance doSomething = (TaskInstance) taskMgmtInstance.getTaskInstances().iterator().next();
    assertEquals("me", doSomething.getActorId());
    assertNull(doSomething.getPooledActors());
  }
View Full Code Here

      "</process-definition>"
    );
   
    AssignActionHandler.assignments = new ArrayList();
   
    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    processInstance.getContextInstance().setVariable("assignmentBean", new AssignmentBean());
    processInstance.signal();
   
    TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
    TaskInstance doSomething = (TaskInstance) taskMgmtInstance.getTaskInstances().iterator().next();
    assertEquals("you", doSomething.getActorId());
    assertNull(doSomething.getPooledActors());
  }
View Full Code Here

      "</process-definition>"
    );
   
    AssignActionHandler.assignments = new ArrayList();
   
    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    processInstance.getContextInstance().setVariable("assignmentBean", new AssignmentBean());
    processInstance.signal();
   
    TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
    TaskInstance doSomething = (TaskInstance) taskMgmtInstance.getTaskInstances().iterator().next();
    assertNull(doSomething.getActorId());
   
    Set expectedActorIds = new HashSet();
    expectedActorIds.add("me");
View Full Code Here

      "</process-definition>"
    );

    processDefinition = saveAndReload(processDefinition);
   
    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    processInstance.signal();
   
    processInstance = saveAndReload(processInstance);

    Iterator timersIter = schedulerSession.findTimersByDueDate();
    assertTrue(timersIter.hasNext());
View Full Code Here

      "</process-definition>"
    );

    processDefinition = saveAndReload(processDefinition);
   
    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    processInstance.signal();
   
    jbpmContext.save(processInstance);
    newTransaction();
   
    List taskInstances = taskMgmtSession.findTaskInstancesByToken(processInstance.getRootToken().getId());
    assertEquals(1, taskInstances.size() );
   
    TaskInstance taskInstance = (TaskInstance) taskInstances.get(0);
    taskInstance.end();
   
View Full Code Here

      "</process-definition>"
    );

    processDefinition = saveAndReload(processDefinition);
   
    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    processInstance.signal();
   
    jbpmContext.save(processInstance);
   
    newTransaction();
View Full Code Here

      "</process-definition>"
    );

    processDefinition = saveAndReload(processDefinition);
   
    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    processInstance.signal();
   
    jbpmContext.save(processInstance);
    newTransaction();
   
    // fetch the original duedate
View Full Code Here

   
    // The next line creates one execution of the process definition.
    // After construction, the process execution has one main path
    // of execution (=the root token) that is positioned in the
    // start-state.
    ProcessInstance processInstance =
        new ProcessInstance(processDefinition);
   
    // After construction, the process execution has one main path
    // of execution (=the root token).
    Token token = processInstance.getRootToken();
   
    // Also after construction, the main path of execution is positioned
    // in the start-state of the process definition.
    assertSame(processDefinition.getStartState(), token.getNode());
   
View Full Code Here

TOP

Related Classes of org.jbpm.graph.exe.ProcessInstance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.