Examples of findProcessDefinitionById()


Examples of org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntityManager.findProcessDefinitionById()

    List<ProcessDefinitionEntity> processDefinitionEntities = new ArrayList<ProcessDefinitionEntity>();
    ProcessDefinitionEntityManager processDefinitionManager = commandContext.getProcessDefinitionEntityManager();
   
    if(processDefinitionId != null) {
     
      ProcessDefinitionEntity processDefinitionEntity = processDefinitionManager.findProcessDefinitionById(processDefinitionId);
      if(processDefinitionEntity == null) {
        throw new ActivitiObjectNotFoundException("Cannot find process definition for id '"+processDefinitionId+"'", ProcessDefinition.class);
      }
      processDefinitionEntities.add(processDefinitionEntity);
     
View Full Code Here

Examples of org.jbpm.pvm.internal.session.RepositorySession.findProcessDefinitionById()

    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

Examples of org.jbpm.pvm.internal.session.RepositorySession.findProcessDefinitionById()

  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

Examples of org.jbpm.pvm.internal.session.RepositorySession.findProcessDefinitionById()

    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

Examples of org.jbpm.pvm.internal.session.RepositorySession.findProcessDefinitionById()

  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

Examples of org.jbpm.pvm.internal.session.RepositorySession.findProcessDefinitionById()

  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

Examples of org.jbpm.pvm.internal.session.RepositorySession.findProcessDefinitionById()

    RepositorySession repositorySession = Environment.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);
View Full Code Here

Examples of org.jbpm.pvm.internal.session.RepositorySession.findProcessDefinitionById()

  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

Examples of org.jbpm.pvm.internal.session.RepositorySession.findProcessDefinitionById()

  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

Examples of org.jbpm.pvm.internal.session.RepositorySession.findProcessDefinitionById()

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