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 = EnvironmentImpl.getFromCurrent(DbSession.class);
   
    dbSession.save(variable);

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

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

  public Variable getVariable() {
    return variable;
  }
View Full Code Here

  protected void save() {
    this.dbid = DbidGenerator.getDbidGenerator().getNextId();
    DbSession dbSession = EnvironmentImpl.getFromCurrent(DbSession.class, false);
    if (dbSession!=null) {
      dbSession.save(this);
    }
  }

  protected void composeIds() {
    this.id = IdComposer.getIdComposer().createId(processDefinition, parent, this);
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());
  }

  public TaskImpl getTask() {
View Full Code Here

    HistoryProcessInstanceMigrationImpl historyProcessInstanceMigration =
        new HistoryProcessInstanceMigrationImpl(oldVersion, newVersion);
    historyProcessInstance.addDetail(historyProcessInstanceMigration);
   
   
    dbSession.save(historyProcessInstanceMigration);
  }
 
  public ProcessInstance getProcessInstance() {
    return processInstance;
  }
View Full Code Here

  }

  public void process() {
    DbSession dbSession = EnvironmentImpl.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

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.