Package org.activiti.engine

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


    @RequestMapping("console-removeProcessInstance")
    public String removeProcessInstance(
            @RequestParam("processInstanceId") String processInstanceId,
            @RequestParam("deleteReason") String deleteReason) {
        RuntimeService runtimeService = processEngine.getRuntimeService();
        runtimeService.deleteProcessInstance(processInstanceId, deleteReason);

        return "redirect:/bpm/console-listProcessInstances.do";
    }

    /**
 
View Full Code Here


        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

        } 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

    RuntimeService runtimeService = processEngine.getRuntimeService();
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("muleProcess");
    Assert.assertFalse(processInstance.isEnded());
    Object result = runtimeService.getVariable(processInstance.getProcessInstanceId(), "theVariable");
    Assert.assertEquals(30, result);
    runtimeService.deleteProcessInstance(processInstance.getId(), "test");
   
    processEngine.getHistoryService().deleteHistoricProcessInstance(processInstance.getId());
    repositoryService.deleteDeployment(deployment.getId());
    assertAndEnsureCleanDb(processEngine);
    ProcessEngines.destroy();
View Full Code Here

    RuntimeService runtimeService = processEngine.getRuntimeService();
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("muleProcess");
    Assert.assertFalse(processInstance.isEnded());
    Object result = runtimeService.getVariable(processInstance.getProcessInstanceId(), "theVariable");
    Assert.assertEquals(20, result);
    runtimeService.deleteProcessInstance(processInstance.getId(), "test");
    processEngine.getHistoryService().deleteHistoricProcessInstance(processInstance.getId());
    processEngine.getRepositoryService().deleteDeployment(deployment.getId());
    assertAndEnsureCleanDb(processEngine);
    ProcessEngines.destroy();
  }
View Full Code Here

    RuntimeService runtimeService = processEngine.getRuntimeService();
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("muleProcess");
    Assert.assertFalse(processInstance.isEnded());
    Object result = runtimeService.getVariable(processInstance.getProcessInstanceId(), "theVariable");
    Assert.assertEquals(10, result);
    runtimeService.deleteProcessInstance(processInstance.getId(), "test");
    processEngine.getHistoryService().deleteHistoricProcessInstance(processInstance.getId());
    processEngine.getRepositoryService().deleteDeployment(deployment.getId());
    assertAndEnsureCleanDb(processEngine);
    ProcessEngines.destroy();
  }
View Full Code Here

    count = taskService.createTaskQuery().count();
    assertEquals(3, count);
   
    // 清理未完成的流程,避免影响其他测试方法
    runtimeService.deleteProcessInstance(processInstance.getId(), "");
    HistoryService historyService = activitiRule.getHistoryService();
    historyService.deleteHistoricProcessInstance(processInstance.getId());
  }

  /**
 
View Full Code Here

    confirmPopup.addListener(new ConfirmationEventListener() {
      private static final long serialVersionUID = 1L;
      protected void confirmed(ConfirmationEvent event) {
        RuntimeService runtimeService = ProcessEngines.getDefaultProcessEngine().getRuntimeService();
        runtimeService.deleteProcessInstance(processInstanceId, null);
        processInstancePage.refreshSelectNext();
      }
    });
   
    viewManager.showPopupWindow(confirmPopup);
View Full Code Here

    HistoryService historyService = activitiRule.getHistoryService();
    long count = historyService.createHistoricVariableInstanceQuery().count();
    assertEquals(2, count);
   
    //historyService.deleteHistoricProcessInstance(processInstance2.getId());
    runtimeService.deleteProcessInstance(processInstance2.getId(), "test");
    count = historyService.createHistoricVariableInstanceQuery().count();
    assertEquals(2, count);
    System.out.println("==============");
    historyService.deleteHistoricProcessInstance(processInstance2.getId());
    count = historyService.createHistoricVariableInstanceQuery().count();
View Full Code Here

    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

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.