Package org.jbpm.pvm.internal.history.model

Examples of org.jbpm.pvm.internal.history.model.HistoryTaskImpl


    TaskImpl task = (TaskImpl) dbSession.get(TaskImpl.class, taskDbid);
    if (task!=null) {
      task.delete(reason);
      dbSession.delete(task);
      if (deleteHistory) {
        HistoryTaskImpl historyTask = (HistoryTaskImpl) dbSession.get(HistoryTaskImpl.class, taskDbid);
        if (historyTask!=null) {
          dbSession.delete(historyTask);
        }
      }
    } else {
View Full Code Here


    this.assignee = assignee;
  }

  public void process() {
    DbSession dbSession = Environment.getFromCurrent(DbSession.class);
    HistoryTaskImpl historyTaskInstance = (HistoryTaskImpl)
        dbSession.get(HistoryTaskImpl.class, task.getDbid());
    historyTaskInstance.setAssignee(assignee);
  }
View Full Code Here

    this.message = message;
  }

  public HistoryComment execute(Environment environment) throws Exception {
    DbSession dbSession = environment.get(DbSession.class);
    HistoryTaskImpl historyTask = dbSession.get(HistoryTaskImpl.class, taskDbid);
    if (historyTask==null) {
      throw new JbpmException("task "+taskDbid+" doesn't exist");
    }
    HistoryCommentImpl comment = new HistoryCommentImpl(message);
    historyTask.addDetail(comment);
    dbSession.save(comment);
    return comment;
  }
View Full Code Here

      long processInstanceDbid = processInstance.getDbid();
      historyProcessInstance = (HistoryProcessInstanceImpl)
          dbSession.get(HistoryProcessInstanceImpl.class, processInstanceDbid);
    }
   
    HistoryTaskImpl historyTask = null;
    TaskImpl task = variable.getTask();
    if (task!=null) {
      long taskDbid = task.getDbid();
      historyTask = (HistoryTaskImpl)
          dbSession.get(HistoryTaskImpl.class, taskDbid);
View Full Code Here

    HistoryTaskInstanceImpl historyTaskInstance = (HistoryTaskInstanceImpl)
        session.load(HistoryTaskInstanceImpl.class, historyActivityInstanceDbId);
    historyTaskInstance.setEndTime(Clock.getCurrentTime());
    historyTaskInstance.setTransitionName(outcome);

    HistoryTaskImpl historyTask = historyTaskInstance.getHistoryTask();
    historyTask.setOutcome(outcome);
    historyTask.setEndTime(Clock.getCurrentTime());
    historyTask.setState(HistoryTask.STATE_COMPLETED);

    session.update(historyTaskInstance);
  }
View Full Code Here

    long processInstanceDbid = processInstance.getDbid();

    HistoryProcessInstance historyProcessInstance =
        dbSession.get(HistoryProcessInstanceImpl.class, processInstanceDbid);
   
    HistoryTaskImpl historyTask = new HistoryTaskImpl(task);
    historyTask.setExecutionId(execution.getId());
   
    HistoryActivityInstanceImpl historyActivityInstance =
        new HistoryTaskInstanceImpl(historyProcessInstance, execution, historyTask);
   
    String activityType = execution.getActivity().getType();
View Full Code Here

    this.task = task;
  }

  public void process() {
    DbSession dbSession = Environment.getFromCurrent(DbSession.class);
    HistoryTaskImpl historyTask = new HistoryTaskImpl(task);
    dbSession.save(historyTask);
   
    if (task.getSuperTask()!=null) {
      HistoryTaskImpl superHistoryTask = dbSession.get(HistoryTaskImpl.class, task.getSuperTask().getDbid());
      superHistoryTask.addSubTask(historyTask);
    }
  }
View Full Code Here

    this.task = task;
  }

  public void process() {
    DbSession dbSession = Environment.getFromCurrent(DbSession.class);
    HistoryTaskImpl historyTask = dbSession.get(HistoryTaskImpl.class, task.getDbid());
    historyTask.updated(task);
  }
View Full Code Here

  protected void updateHistoryActivityInstance(HistoryActivityInstanceImpl historyActivityInstance) {
    super.updateHistoryActivityInstance(historyActivityInstance);

    DbSession dbSession = Environment.getFromCurrent(DbSession.class);
    HistoryTaskImpl historyTask = (HistoryTaskImpl) dbSession.get(HistoryTaskImpl.class, task.getDbid());
    historyTask.setState(reason);
    historyTask.setEndTime(Clock.getCurrentTime());
  }
View Full Code Here

    this.task = task;
  }

  public void process() {
    DbSession dbSession = EnvironmentImpl.getFromCurrent(DbSession.class);
    HistoryTaskImpl historyTask = dbSession.get(HistoryTaskImpl.class, task.getDbid());
    historyTask.updated(task);
  }
View Full Code Here

TOP

Related Classes of org.jbpm.pvm.internal.history.model.HistoryTaskImpl

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.