Package org.jbpm.pvm.internal.session

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


   
    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 = Environment.getFromCurrent(RepositorySession.class);
      ProcessDefinitionImpl processDefinition = (ProcessDefinitionImpl) repositorySession.getObject(deploymentId, objectName);
      processDefinitions.add(processDefinition);
    }
   
    return processDefinitions;
  }
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

    this.deploymentId = deploymentId;
    this.resourceName = resourceName;
  }

  public byte[] execute(Environment environment) {
    RepositorySession repositorySession = environment.get(RepositorySession.class);
    return repositorySession.getBytes(deploymentId, resourceName);
  }
View Full Code Here

    this.processDefinitionId = processDefinitionId;
    this.activityName = activityName;
  }

  public String execute(Environment environment) {
    RepositorySession repositorySession = Environment.getFromCurrent(RepositorySession.class);
    ProcessDefinitionImpl processDefinition = repositorySession.findProcessDefinitionById(processDefinitionId);
   
    ActivityImpl activity = processDefinition.getActivity(activityName);
   
    ActivityBehaviour behaviour = activity.getBehaviour();
    if (behaviour instanceof FormBehaviour) {
View Full Code Here

  }

  public List<String> execute(Environment environment) {
    List<String> activityNames = new ArrayList<String>();
   
    RepositorySession repositorySession = Environment.getFromCurrent(RepositorySession.class);
    ProcessDefinitionImpl processDefinition = repositorySession.findProcessDefinitionById(processDefinitionId);
   
    for (ActivityImpl activity: (List<ActivityImpl>) processDefinition.getActivities()) {
      if (activity.getIncomingTransitions().isEmpty()) {
        activityNames.add(activity.getName());
      }
View Full Code Here

    this.processDefinitionId = processDefinitionId;
    this.activityName = activityName;
  }

  public ActivityCoordinates execute(Environment environment) throws Exception {
    RepositorySession repositorySession = environment.get(RepositorySession.class);
    ProcessDefinitionImpl processDefinition = (ProcessDefinitionImpl) repositorySession.findProcessDefinitionById(processDefinitionId);
    if (processDefinition==null) {
      throw new JbpmException("process definition "+processDefinitionId+" doesn't exist");
    }
    ActivityImpl activity = processDefinition.findActivity(activityName);
    if (activity==null) {
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

 
  public ProcessDefinitionImpl getProcessDefinition() {
    if ( (processDefinition==null)
         && (processDefinitionId!=null)
       ) {
      RepositorySession repositorySession = Environment.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.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

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.