Package org.jbpm.pvm.internal.client

Examples of org.jbpm.pvm.internal.client.ClientProcessDefinition


  public ClientProcessDefinition findLatestProcessDefinitionByKey(String processDefinitionKey) {
    Query query = session.getNamedQuery("findProcessDefinitionsByKey");
    query.setString("key", processDefinitionKey);
    query.setMaxResults(1);
    ClientProcessDefinition processDefinition = (ClientProcessDefinition) query.uniqueResult();
    return processDefinition;
  }
View Full Code Here


  public ClientProcessDefinition findProcessDefinitionById(String processDefinitionId) {
    Query query = session.getNamedQuery("findProcessDefinitionById");
    query.setString("id", processDefinitionId);
    query.setMaxResults(1);
    ClientProcessDefinition processDefinition = (ClientProcessDefinition) query.uniqueResult();
    return processDefinition;
  }
View Full Code Here

    this.executionKey = executionKey;
    setVariables(variables);
  }
 
  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);
    processInstance.setVariables(variables);
    processInstance.start();
   
    if (!processInstance.isEnded()) {
      Session session = Environment.getFromCurrent(Session.class);
View Full Code Here

  }

  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);
    processInstance.setVariables(variables);
    processInstance.start();

    if (!processInstance.isEnded()) {
      Session session = Environment.getFromCurrent(Session.class);
View Full Code Here

  public void execute(ActivityExecution execution) {
    ExecutionImpl executionImpl = (ExecutionImpl) execution;
   
    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);
   
    for (String swimlaneName: swimlaneMappings.keySet()) {
      String subSwimlaneName = swimlaneMappings.get(swimlaneName);
      SwimlaneImpl subSwimlane = subProcessInstance.createSwimlane(subSwimlaneName);
      SwimlaneImpl swimlane = executionImpl.getSwimlane(swimlaneName);
View Full Code Here

    this.executionKey = executionKey;
    setVariables(variables);
  }
 
  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);
    processInstance.setVariables(variables);
    processInstance.start();
   
    return processInstance;
  }
View Full Code Here

  }

  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);
    processInstance.setVariables(variables);
    processInstance.start();

    if (!processInstance.isEnded()) {
      Session session = environment.get(Session.class);
View Full Code Here

  public ClientProcessDefinition findLatestProcessDefinitionByKey(String processDefinitionKey) {
    Query query = session.getNamedQuery("findProcessDefinitionsByKey");
    query.setString("key", processDefinitionKey);
    query.setMaxResults(1);
    ClientProcessDefinition processDefinition = (ClientProcessDefinition) query.uniqueResult();
    return processDefinition;
  }
View Full Code Here

  public ClientProcessDefinition findProcessDefinitionById(String processDefinitionId) {
    Query query = session.getNamedQuery("findProcessDefinitionById");
    query.setString("id", processDefinitionId);
    query.setMaxResults(1);
    ClientProcessDefinition processDefinition = (ClientProcessDefinition) query.uniqueResult();
    return processDefinition;
  }
View Full Code Here

  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()) {
      String subSwimlaneName = swimlaneMappings.get(swimlaneName);
      SwimlaneImpl subSwimlane = subProcessInstance.createSwimlane(subSwimlaneName);
      SwimlaneImpl swimlane = executionImpl.getSwimlane(swimlaneName);
View Full Code Here

TOP

Related Classes of org.jbpm.pvm.internal.client.ClientProcessDefinition

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.