Package org.jbpm.pvm.internal.session

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


    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


    }
    return result;
  }

  private static List<ProcessDefinition> getProcessesToMigrate(String processDefinitionName, MigrationDescriptor migrationDescriptor) {
    RepositorySession repositorySession = EnvironmentImpl.getFromCurrent(RepositorySession.class);
    List<ProcessDefinition> processDefinitions = repositorySession
        .createProcessDefinitionQuery()
        .processDefinitionName(processDefinitionName)
        .orderAsc(ProcessDefinitionQuery.PROPERTY_VERSION)
        .list();
    int startIndex = calculateStartIndex(processDefinitions.size() - 1, migrationDescriptor);
View Full Code Here

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

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

  }

  public List<String> execute(Environment environment) {
    List<String> activityNames = new ArrayList<String>();
   
    RepositorySession repositorySession = environment.get(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

  protected Map<Object, String> outcomeVariableMappings;

  public void execute(ActivityExecution execution) {
    ExecutionImpl executionImpl = (ExecutionImpl) execution;
   
    RepositorySession repositorySession = EnvironmentImpl.getFromCurrent(RepositorySession.class);
   
    ClientProcessDefinition processDefinition = null;
   
    if (subProcessId!=null) {
      processDefinition = repositorySession.findProcessDefinitionById(subProcessId);
    } else {
      processDefinition = repositorySession.findProcessDefinitionByKey(subProcessKey);
    }
   
    ExecutionImpl subProcessInstance = (ExecutionImpl) processDefinition.createProcessInstance(null, execution);
   
    for (String swimlaneName: swimlaneMappings.keySet()) {
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.