Examples of deleteProcessInstance()


Examples of org.activiti.engine.RuntimeService.deleteProcessInstance()

    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("DeleteInstance", variableMap);
    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " " + processInstance.getProcessDefinitionId());
   
    // 删除流程
    runtimeService.deleteProcessInstance(processInstance.getId(), "ssss");
   
    /*
    // 正常结束流程
    TaskService taskService = activitiRule.getTaskService();
    Task singleResult = taskService.createTaskQuery().singleResult();
View Full Code Here

Examples of org.activiti.engine.RuntimeService.deleteProcessInstance()

        } finally {
          BuildLoggerMap.remove(build);
            if (procId != null && rtSvc.createExecutionQuery().processInstanceId(procId).singleResult() != null){
              // should kick in when the current build is aborted
              log.println(Consts.UI_PREFIX+": aborting \""+workflowName+"\" (#"+procId+")");
              rtSvc.deleteProcessInstance(procId,build.getFullDisplayName()+" finished");
            }
        }
        return result;
    }
   
View Full Code Here

Examples of org.activiti.engine.RuntimeService.deleteProcessInstance()

        RuntimeService runtimeService = processEngine.getRuntimeService();

        if (this.instanceIDs != null && this.instanceIDs.length > 0) {
            for (String instanceID : instanceIDs) {
                runtimeService.deleteProcessInstance(instanceID, "Forcefully terminating the instance");
                out().printf("Process instance %s terminated\n", instanceID);
            }
            return null;
        }
View Full Code Here

Examples of org.activiti.engine.RuntimeService.deleteProcessInstance()

        } else {
            out().println("Signalling all executions in all active process instances...");
            List<ProcessInstance> piList = runtimeService.createProcessInstanceQuery().orderByProcessInstanceId().asc().list();
            for (ProcessInstance pi : piList) {
                String instanceID = pi.getProcessInstanceId();
                runtimeService.deleteProcessInstance(instanceID, "Forcefully terminating the instance");
                out().printf("Process instance %s terminated\n", instanceID);
            }
        }

        return null;
View Full Code Here

Examples of org.camunda.bpm.engine.RuntimeService.deleteProcessInstance()

  @Override
  public void deleteProcessInstance() {
    RuntimeService runtimeService = engine.getRuntimeService();
    try {
      runtimeService.deleteProcessInstance(processInstanceId, null);
    } catch (ProcessEngineException e) {
      throw new InvalidRequestException(Status.NOT_FOUND, e, "Process instance with id " + processInstanceId + " does not exist");
    }

  }
View Full Code Here

Examples of org.jbpm.api.ExecutionService.deleteProcessInstance()

      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

Examples of org.jbpm.db.GraphSession.deleteProcessInstance()

  }

  public String deleteProcessInstance() {
    JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
    GraphSession graphSession = jbpmContext.getGraphSession();
    graphSession.deleteProcessInstance(this.id);
    return ("deleteInstance");
  }

  private void initialize() {
    JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
View Full Code Here

Examples of org.jbpm.pvm.internal.session.DbSession.deleteProcessInstance()

    this.cascade = cascade;
  }

  public Void execute(Environment environment) throws Exception {
    DbSession dbSession = Environment.getFromCurrent(DbSession.class);
    dbSession.deleteProcessInstance(processInstanceId, cascade);
    return null;
  }

}
View Full Code Here

Examples of org.jbpm.pvm.internal.session.DbSession.deleteProcessInstance()

      String processDefinitionId = processDefinition.getId();
      List<String> processInstanceIds = dbSession.findProcessInstanceIds(processDefinitionId);
     
      if (cascade) {
        for (String processInstanceId: processInstanceIds) {
          dbSession.deleteProcessInstance(processInstanceId, true);
        }

        dbSession.deleteProcessDefinitionHistory(processDefinitionId);
       
      } else {
View Full Code Here

Examples of org.jbpm.pvm.internal.session.DbSession.deleteProcessInstance()

        superProcessExecution.signal();
      }
     
      DbSession dbSession = Environment.getFromCurrent(DbSession.class, false);
      if (dbSession!=null) {
        dbSession.deleteProcessInstance(id, false);
      }
    }
  }
 
  public void end(OpenExecution executionToEnd) {
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.