Package org.jbpm.taskmgmt.exe

Examples of org.jbpm.taskmgmt.exe.TaskInstance.end()


  }

  public static void endOneTask(Token token) {
    TaskMgmtInstance tmi = (TaskMgmtInstance)token.getProcessInstance().getInstance(TaskMgmtInstance.class);
    TaskInstance taskInstance = (TaskInstance) tmi.getUnfinishedTasks(token).iterator().next();
    taskInstance.end();
  }
}
View Full Code Here


    // close the task instance
    String transitionButton = JsfHelper.getParameter("taskform:transitionButton");
    log.debug("Submitted button:" + transitionButton);
    TaskInstance taskInstance = taskMgmtSession.loadTaskInstance(taskInstanceId);
    if ("Save and Close Task".equals(transitionButton)) {
      taskInstance.end();
    } else {
      taskInstance.end(transitionButton);
    }

    ProcessInstance processInstance = taskInstance.getTaskMgmtInstance().getProcessInstance();
View Full Code Here

    log.debug("Submitted button:" + transitionButton);
    TaskInstance taskInstance = taskMgmtSession.loadTaskInstance(taskInstanceId);
    if ("Save and Close Task".equals(transitionButton)) {
      taskInstance.end();
    } else {
      taskInstance.end(transitionButton);
    }

    ProcessInstance processInstance = taskInstance.getTaskMgmtInstance().getProcessInstance();
    if (processInstance.hasEnded()) {
      JsfHelper.addMessage("The process has finished.");
View Full Code Here

      String variableName = "taskInstance";
      TaskInstance taskInstance = (TaskInstance) contextInstance.getVariable(variableName);
     
      // complete the task
      if (outcome==null) {
        taskInstance.end();
      } else {
        taskInstance.end(outcome);
      }
    }
  }
View Full Code Here

     
      // complete the task
      if (outcome==null) {
        taskInstance.end();
      } else {
        taskInstance.end(outcome);
      }
    }
  }

  public boolean isConversationEnd() {
View Full Code Here

    JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
    if (this.taskInstanceId > 0) {
      TaskMgmtSession taskMgmtSession = jbpmContext.getTaskMgmtSession();
      TaskInstance taskInstance = taskMgmtSession.loadTaskInstance(this.taskInstanceId);
      if (transitionName.equals("")) {
        taskInstance.end();
      } else {
        taskInstance.end(transitionName);
      }
      processInstance = taskInstance.getToken().getProcessInstance();
    } else if (this.tokenInstanceId > 0) {
View Full Code Here

      TaskMgmtSession taskMgmtSession = jbpmContext.getTaskMgmtSession();
      TaskInstance taskInstance = taskMgmtSession.loadTaskInstance(this.taskInstanceId);
      if (transitionName.equals("")) {
        taskInstance.end();
      } else {
        taskInstance.end(transitionName);
      }
      processInstance = taskInstance.getToken().getProcessInstance();
    } else if (this.tokenInstanceId > 0) {
      GraphSession graphSession = jbpmContext.getGraphSession();
      Token token = graphSession.loadToken(this.tokenInstanceId);
View Full Code Here

    if (taskInstance.getAvailableTransitions().size() > 1) {
      initializeAvailableTransitions(taskInstance);
      return "showTransitions";
    }

    taskInstance.end();

    ProcessInstance processInstance = taskInstance.getToken().getProcessInstance();
    jbpmContext.save(processInstance);

    this.initializeTasksList(processInstance);
View Full Code Here

    List taskInstances = taskMgmtSession.findTaskInstances("victim");
    assertEquals(1, taskInstances.size());
    TaskInstance taskInstance = (TaskInstance) taskInstances.get(0);
    taskInstance.setVariable("a", "value a updated");
    taskInstance.setVariable("b", "value b updated");
    taskInstance.end();
   
    jbpmContext.save(taskInstance);
    long taskInstanceId = taskInstance.getId();
    long tokenId = taskInstance.getToken().getId();
    newTransaction();
View Full Code Here

    taskVariables.put("item", "cookies");
    taskVariables.put("quantity", "lots of them");
    taskVariables.put("address", "sesamestreet 46");
   
    taskInstance.addVariables(taskVariables);
    taskInstance.end();
   
    assertEquals("cookies", contextInstance.getVariable("item"));
    assertEquals("lots of them", contextInstance.getVariable("quantity"));
    assertEquals("sesamestreet 46", contextInstance.getVariable("address"));
    assertEquals("cookie monster", taskMgmtInstance.getSwimlaneInstance("buyer").getActorId());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.