Package org.jbpm.pvm.internal.session

Examples of org.jbpm.pvm.internal.session.DbSession


    commandService.execute(this);
  }

  public Object execute(Environment environment) {
    // reload the execution
    DbSession dbSession = environment.get(DbSession.class);
    if (dbSession==null) {
      throw new JbpmException("no "+DbSession.class.getName()+" available in the environment for reloading the execution");
    }
    execution = dbSession.get(ExecutionImpl.class, execution.getId());
    exceptionHandler.executeHandler(execution, exception);
    return null;
  }
View Full Code Here


  public Object execute(Environment environment) throws Exception {
    AsyncContinuations.restoreState(execution);
   
    execution.performAtomicOperationSync(AtomicOperation.EXECUTE_ACTIVITY);

    DbSession dbSession = environment.get(DbSession.class);
    dbSession.delete(this);

    return null;
  }
View Full Code Here

  public Object execute(Environment environment) throws Exception {
    AsyncContinuations.restoreState(execution);

    execution.performAtomicOperationSync(AtomicOperation.TRANSITION_START_ACTIVITY);
   
    DbSession dbSession = environment.get(DbSession.class);
    dbSession.delete(this);

    return null;
  }
View Full Code Here

   
    execution.setState((String) asyncExecutionInfo.get(KEY_STATE));

    execution.performAtomicOperationSync(AtomicOperation.EXECUTE_EVENT_LISTENER);
   
    DbSession dbSession = environment.get(DbSession.class);
    dbSession.delete(this);

    return null;
  }
View Full Code Here

    execution.setState(Execution.STATE_ACTIVE_ROOT);
   
    Signal signal = new Signal(signalName, parameters);
    execution.performAtomicOperationSync(signal);
   
    DbSession dbSession = environment.get(DbSession.class);
    dbSession.delete(this);

    return null;
  }
View Full Code Here

  public TaskCreated(TaskImpl task) {
    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.executionId = executionId;
  }

  public Execution execute(Environment environment) throws Exception {
    DbSession dbSession = environment.get(DbSession.class);
    return dbSession.findExecutionById(executionId);
  }
View Full Code Here

  public TaskUpdated(TaskImpl task) {
    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

    }
    this.taskId = taskId;
  }

  public Void execute(Environment environment) throws Exception {
    DbSession dbSession = environment.get(DbSession.class);
    TaskImpl task = dbSession.get(TaskImpl.class, Long.parseLong(taskId));
    task.setVariables(variables);
  
    return null;
  }
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

TOP

Related Classes of org.jbpm.pvm.internal.session.DbSession

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.