Package org.jbpm.pvm.internal.session

Examples of org.jbpm.pvm.internal.session.DbSession.save()


        TaskImpl parentTask = (TaskImpl) dbSession.get(TaskImpl.class, task.getSuperTaskDbid());
        parentTask.addSubTask(task);
        task.setSuperTaskDbid(null);
      }
     
      dbSession.save(task);
     
      HistoryEvent.fire(new TaskCreated(task));

    } else {
      dbSession.update(task);
View Full Code Here


  }

  public void process() {
    DbSession dbSession = Environment.getFromCurrent(DbSession.class);
   
    dbSession.save(variable);

    HistoryProcessInstanceImpl historyProcessInstance = null;
    ExecutionImpl processInstance = variable.getProcessInstance();
    if (processInstance!=null) {
      long processInstanceDbid = processInstance.getDbid();
View Full Code Here

    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

      historyTask = (HistoryTaskImpl)
          dbSession.get(HistoryTaskImpl.class, taskDbid);
    }
   
    HistoryVariableImpl historyVariable = new HistoryVariableImpl(historyProcessInstance, historyTask, variable);
    dbSession.save(historyVariable);
  }
}
View Full Code Here

        createHistoryActivityInstance(historyProcessInstanceImpl);
   
    String activityType = execution.getActivity().getType();
    historyActivityInstance.setType(activityType);
   
    dbSession.save(historyActivityInstance);
   
    execution.setHistoryActivityInstanceDbid(historyActivityInstance.getDbid());
  }

  protected HistoryActivityInstanceImpl createHistoryActivityInstance(HistoryProcessInstance historyProcessInstanceImpl) {
View Full Code Here

        new HistoryTaskInstanceImpl(historyProcessInstance, execution, historyTask);
   
    String activityType = execution.getActivity().getType();
    historyActivityInstance.setType(activityType);
   
    dbSession.save(historyActivityInstance);
   
    execution.setHistoryActivityInstanceDbid(historyActivityInstance.getDbid());
  }

}
View Full Code Here

  }

  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

    task.setDescription(taskDefinition.getDescription());
    task.setPriority(taskDefinition.getPriority());
    task.setFormResourceName(taskDefinition.getFormResourceName());
   
    // save task so that TaskDbSession.findTaskByExecution works for assign event listeners
    dbSession.save(task);

    SwimlaneDefinitionImpl swimlaneDefinition = taskDefinition.getSwimlaneDefinition();
    if (swimlaneDefinition!=null) {
      SwimlaneImpl swimlane = execution.getInitializedSwimlane(swimlaneDefinition);
      task.setSwimlane(swimlane);
View Full Code Here

  public void schedule(Timer timer) {
    log.debug("scheduling "+timer);

    // flush timer to database
    DbSession dbSession = Environment.getCurrent().get(DbSession.class);
    dbSession.save(timer);
    dbSession.flush();

    // retrieve timer as entity bean, contact timer service
    try {
      LocalTimer timerBean = timerHome.findByPrimaryKey(((TimerImpl)timer).getDbid());
View Full Code Here

    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

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.