Package org.jbpm.pvm.internal.session

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


    this.deploymentId = deploymentId;
    this.cascade = cascade;
  }

  public Object execute(Environment environment) throws Exception {
    RepositorySession repositorySession = environment.get(RepositorySession.class);
    List<ProcessDefinition> processDefinitions = repositorySession.createProcessDefinitionQuery()
      .deploymentId(deploymentId)
      .list();
   
    DbSession dbSession = environment.get(DbSession.class);
View Full Code Here


  }
 
  public ProcessInstance execute(Environment environment) throws Exception {
    ClientProcessDefinition processDefinition = null;
   
    RepositorySession repositorySession = environment.get(RepositorySession.class);
    processDefinition = (ClientProcessDefinition) repositorySession.findProcessDefinitionByKey(processDefinitionKey);
    if (processDefinition==null) {
      throw new JbpmException("no process definition with key '"+processDefinitionKey+"'");
    }
   
    ClientProcessInstance processInstance = processDefinition.createProcessInstance(executionKey);
View Full Code Here

    this.variables = variables;
    this.executionKey = executionKey;
  }

  public ProcessInstance execute(Environment environment) throws Exception {
    RepositorySession repositorySession = environment.get(RepositorySession.class);

    ClientProcessDefinition processDefinition = (ClientProcessDefinition)
    repositorySession.findProcessDefinitionById(processDefinitionId);
    if (processDefinition==null) {
      throw new JbpmException("no process definition with id '"+processDefinitionId+"'");
    }
   
    ClientProcessInstance processInstance = processDefinition.createProcessInstance(executionKey);
View Full Code Here

  public GetDeploymentResourceNamesCmd(String deploymentId) {
    this.deploymentId = deploymentId;
  }

  public Set<String> execute(Environment environment) throws Exception {
    RepositorySession repositorySession = environment.get(RepositorySession.class);
    DeploymentImpl depImpl = repositorySession.getDeployment(deploymentId);
    return depImpl.getResourceNames();
  }
View Full Code Here

  public DeployCmd(DeploymentImpl deployment) {
    this.deployment = deployment;
  }

  public String execute(Environment environment) throws Exception {
    RepositorySession repositorySession = environment.get(RepositorySession.class);
    return repositorySession.deploy(deployment);
  }
View Full Code Here

   
    List<ProcessDefinition> processDefinitions = new ArrayList<ProcessDefinition>();
    for (Map<String, Object> properties: propertyMaps) {
      String deploymentId = properties.get("deploymentDbid").toString();
      String objectName = (String)properties.get("objectName");
      RepositorySession repositorySession = EnvironmentImpl.getFromCurrent(RepositorySession.class);
      ProcessDefinitionImpl processDefinition = (ProcessDefinitionImpl) repositorySession.getObject(deploymentId, objectName);
      processDefinitions.add(processDefinition);
    }
   
    return processDefinitions;
  }
View Full Code Here

 
  public ProcessDefinitionImpl getProcessDefinition() {
    if ( (processDefinition==null)
         && (processDefinitionId!=null)
       ) {
      RepositorySession repositorySession = EnvironmentImpl.getFromCurrent(RepositorySession.class);
      processDefinition = (ProcessDefinitionImpl) repositorySession.findProcessDefinitionById(processDefinitionId);
      if (processDefinition==null) {
        throw new JbpmException("couldn't find process definition "+processDefinitionId+" in the repository");
      }
    }
    return processDefinition;
View Full Code Here

    this.resourceName = resourceName;
    this.bytes = IoUtil.readBytes(inputStream);
  }

  public Void execute(Environment environment) throws Exception {
    RepositorySession repositorySession = environment.get(RepositorySession.class);
    repositorySession.updateDeploymentResource(deploymentId, resourceName, bytes);
    return null;
  }
View Full Code Here

  public SuspendDeploymentCmd(String deploymentId) {
    this.deploymentId = deploymentId;
  }

  public Object execute(Environment environment) throws Exception {
    RepositorySession repositorySession = environment.get(RepositorySession.class);
   
    DeploymentImpl deployment = (DeploymentImpl) repositorySession.getDeployment(deploymentId);
    if (deployment==null) {
      throw new JbpmException("deployment "+deploymentId+" doesn't exist");
    }
   
    deployment.suspend();
View Full Code Here

  public ResumeDeploymentCmd(String deploymentId) {
    this.deploymentId = deploymentId;
  }

  public Object execute(Environment environment) throws Exception {
    RepositorySession repositorySession = environment.get(RepositorySession.class);
    DeploymentImpl deployment = (DeploymentImpl) repositorySession.getDeployment(deploymentId);
    deployment.resume();
    return null;
  }
View Full Code Here

TOP

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

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.