Examples of DbSession


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

    this.userId = userId;
    this.take = take;
  }

  public Void execute(Environment environment) {
    DbSession dbSession = environment.get(DbSession.class);
    TaskImpl task = dbSession.get(TaskImpl.class, Long.parseLong(taskId));
    if (task==null) {
      throw new JbpmException("task "+taskId+" does not exist");
    }
    if (take) {
      task.take(userId);
View Full Code Here

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

    this.processInstanceId = processInstanceId;
    this.state = state;
  }

  public Object execute(Environment environment) throws Exception {
    DbSession dbSession = Environment.getFromCurrent(DbSession.class);
    ExecutionImpl processInstance = (ExecutionImpl) dbSession.findProcessInstanceById(processInstanceId);
    processInstance.end(state);
    return null;
  }
View Full Code Here

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

public class ActivityStart extends HistoryEvent {

  private static final long serialVersionUID = 1L;

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

    long processInstanceDbid = execution.getProcessInstance().getDbid();

    HistoryProcessInstance historyProcessInstanceImpl = (HistoryProcessInstance)
        dbSession.get(HistoryProcessInstanceImpl.class, processInstanceDbid);
   
    HistoryActivityInstanceImpl historyActivityInstance =
        createHistoryActivityInstance(historyProcessInstanceImpl);
   
    String activityType = execution.getActivity().getType();
    historyActivityInstance.setType(activityType);
   
    dbSession.save(historyActivityInstance);
   
    execution.setHistoryActivityInstanceDbid(historyActivityInstance.getDbid());
  }
View Full Code Here

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

  public TaskActivityStart(TaskImpl task) {
    this.task = task;
  }
 
  public void process() {
    DbSession dbSession = Environment.getFromCurrent(DbSession.class);

    ExecutionImpl processInstance = execution.getProcessInstance();
    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();
    historyActivityInstance.setType(activityType);
   
    dbSession.save(historyActivityInstance);
   
    execution.setHistoryActivityInstanceDbid(historyActivityInstance.getDbid());
  }
View Full Code Here

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

      this.parentTaskDbid = Long.parseLong(parentTaskId);
    }
  }

  public Task execute(Environment environment) throws Exception {
    DbSession dbSession = environment.get(DbSession.class);
    TaskImpl task = (TaskImpl) dbSession.createTask();
    task.setSuperTaskDbid(parentTaskDbid);
    return task;
  }
View Full Code Here

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

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

  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

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

  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

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

   
    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

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

    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
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.