Package org.jbpm.api

Examples of org.jbpm.api.ExecutionService


    Environment env = ((EnvironmentFactory)processEngine).openEnvironment();

    try
    {

      ExecutionService execService = this.processEngine.getExecutionService();
      ProcessInstanceQuery query = execService.createProcessInstanceQuery();
      query.processDefinitionId(String.valueOf(procDefId));

      List<ProcessInstance> processInstances = query.list();

      List<ProcessInstanceRef> results = adoptProcessInstances(processInstances);
View Full Code Here


  {
    Environment env = ((EnvironmentFactory)processEngine).openEnvironment();

    try
    {
      ExecutionService execService = this.processEngine.getExecutionService();
      ProcessInstanceQuery query = execService.createProcessInstanceQuery();
      query.processInstanceId(instanceId);
      ProcessInstance processInstance = query.uniqueResult();
      return ModelAdaptor.adoptExecution( (ExecutionImpl)processInstance);
    }
    finally
View Full Code Here

    Environment env = ((EnvironmentFactory)processEngine).openEnvironment();

    try
    {
      ExecutionService execService = this.processEngine.getExecutionService();
      Set<String> keys = execService.getVariableNames(instanceId);
      data = execService.getVariables(instanceId, keys);
    }
    finally
    {
      env.close();
    }
View Full Code Here

  {
    Environment env = ((EnvironmentFactory)processEngine).openEnvironment();

    try
    {
      ExecutionService execService = this.processEngine.getExecutionService();
      Execution exec = execService.startProcessInstanceById(definitionId);
      return ModelAdaptor.adoptExecution((ExecutionImpl)exec);
    }
    finally{
      env.close();
    }
View Full Code Here

  {
    Environment env = ((EnvironmentFactory)processEngine).openEnvironment();

    try
    {
      ExecutionService execService = this.processEngine.getExecutionService();
      Execution exec = execService.startProcessInstanceById(definitionId);
      execService.setVariables(exec.getId(), processVars);
     
      return ModelAdaptor.adoptExecution((ExecutionImpl)exec);
    }
    finally{
      env.close();
View Full Code Here

    Environment env = ((EnvironmentFactory)processEngine).openEnvironment();

    try
    {

      ExecutionService execService = this.processEngine.getExecutionService();
      Execution exec = execService.findExecutionById(instanceId);
      if(null==exec)
        throw new IllegalArgumentException("No such execution with id "+ instanceId);

      ProcessInstanceRef.RESULT actualResult = result!=null ? result : ProcessInstanceRef.RESULT.COMPLETED;
      execService.endProcessInstance(instanceId, actualResult.toString());
    }
    finally
    {
      env.close();
    }
View Full Code Here

    Environment env = ((EnvironmentFactory)processEngine).openEnvironment();

    try
    {

      ExecutionService execService = this.processEngine.getExecutionService();
      Execution exec = execService.findExecutionById(instanceId);
      if(null==exec)
        throw new IllegalArgumentException("No such execution with id "+ instanceId);

      execService.deleteProcessInstance(instanceId);
    }
    finally
    {
      env.close();
    }
View Full Code Here

  {
    Environment env = ((EnvironmentFactory)processEngine).openEnvironment();

    try
    {
      ExecutionService execService = this.processEngine.getExecutionService();

      if(null==signal)
        execService.signalExecutionById(executionId);
      else
        execService.signalExecutionById(executionId, signal);
    }
    finally
    {
      env.close();
    }
View Full Code Here

    Environment env = ((EnvironmentFactory)processEngine).openEnvironment();

    try
    {
      ExecutionService execService = this.processEngine.getExecutionService();
      ProcessInstanceQuery query = execService.createProcessInstanceQuery();
      query.processInstanceId(instanceId);
      ExecutionImpl processInstance = (ExecutionImpl) query.uniqueResult();

      String currentActivity = processInstance.getProcessInstance().getActivityName();
View Full Code Here

        return processEngine;
    }

    @Override
    public void updateContext(ProcessInstance processInstance) {
        ExecutionService es = getProcessEngine().getExecutionService();
        for (ProcessInstanceAttribute pia : processInstance.getProcessAttributes()) {
            if (pia instanceof BpmVariable) {
                BpmVariable bpmVar = (BpmVariable) pia;
                if (hasText(bpmVar.getBpmVariableName())) {
                    es.setVariable(processInstance.getInternalId(), bpmVar.getBpmVariableName(), bpmVar.getBpmVariableValue());
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.jbpm.api.ExecutionService

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.