Examples of DbSession


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

    return lob.extractBytes();
  }

  public void setObject(Object value) {
    if (this.lob!=null) {
      DbSession dbSession = Environment.getFromCurrent(DbSession.class, false);
      if (dbSession!=null) {
        dbSession.delete(this.lob);
      }
    }
    this.lob = new Lob((byte[])value);
  }
View Full Code Here

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

  public void setVariables(Map<String, ?> variables) {
    this.variables = variables;
  }

  protected ClientExecution getExecution(Environment environment, String executionId) {
    DbSession dbSession = environment.get(DbSession.class);
    ClientExecution execution = dbSession.findExecutionById(executionId);
    if (execution == null) {
      throw new JbpmException("execution " + executionId + " doesn't exist");
    }
    return execution;
  }
View Full Code Here

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

    }
    return (Set) subTasks;
  }

  public TaskImpl createSubTask() {
    DbSession dbSession = Environment.getFromCurrent(DbSession.class);
    TaskImpl subTask = (TaskImpl) dbSession.createTask();
    if (subTasks == null) {
      subTasks = new HashSet<TaskImpl>();
    }
    addSubTask(subTask);
    return subTask;
View Full Code Here

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

    this.taskId = taskId;
    this.outcome = outcome;
  }

  public Void execute(Environment environment) throws Exception {
    DbSession dbSession = environment.get(DbSession.class);
    TaskImpl task = dbSession.get(TaskImpl.class, Long.parseLong(taskId));
    if (outcome==null) {
      task.complete();
    } else {
      task.complete(outcome);
    }
    dbSession.delete(task);
    return null;
  }
View Full Code Here

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

    this.deleteProcessInstances = deleteProcessInstances;
    this.deleteHistory = deleteHistory;
  }

  public Void execute(Environment environment) {
    DbSession dbSession = Environment.getFromCurrent(DbSession.class);
    if (dbSession==null) {
      throw new JbpmException("no "+DbSessionBinding.TAG+" configured");
    }
    dbSession.deleteProcessDefinition(processDefinitionId, deleteProcessInstances, deleteHistory);
    return null;
  }
View Full Code Here

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

    }
    this.taskId = taskId;
  }

  public Set<String> 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+" doesn't exist");
    }
   
    Set<String> outcomes = new HashSet<String>();
View Full Code Here

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

  public GetTaskCommentsCmd(String taskId) {
    this.taskId = taskId;
  }

  public List<HistoryComment> execute(Environment environment) throws Exception {
    DbSession dbSession = environment.get(DbSession.class);

    List<HistoryComment> comments = dbSession.findCommentsByTaskId(taskId);
    forceInitializationAndClean(comments);
    return comments;
  }
View Full Code Here

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

  public ExecuteJobCmd(Long jobDbid) {
    this.jobDbid = jobDbid;
  }

  public Job execute(Environment environment) throws Exception {
    DbSession dbSession = environment.get(DbSession.class);
    if (dbSession==null) {
      throw new JbpmException("no db-session configured");
    }
    JobImpl<?> job = (JobImpl<?>) dbSession.get(JobImpl.class, jobDbid);

    // in case of decision jobs, the job might have been deleted
    // before we execute it (they are in a list)
    if (job != null) {
        JobContext jobContext = new JobContext(job);
View Full Code Here

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

  }

  public ProcessInstance execute(Environment environment) throws Exception {
    ClientExecution execution = null;
   
    DbSession dbSession = environment.get(DbSession.class);
    execution = dbSession.findExecutionById(executionId);
    if (execution==null) {
      throw new JbpmException("execution "+executionId+" does not exist");
    }
   
    execution.signal(signalName, parameters);
View Full Code Here

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

    this.commentId = commentId;
    this.message = message;
  }

  public HistoryComment execute(Environment environment) throws Exception {
    DbSession dbSession = environment.get(DbSession.class);
    HistoryCommentImpl parentComment = dbSession.get(HistoryCommentImpl.class, Long.parseLong(commentId));
    if (parentComment==null) {
      throw new JbpmException("parent comment doesn't exist: "+commentId);
    }
    HistoryComment replyComment = parentComment.createReply(message);
    return replyComment;
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.