public boolean isSuspended() { return wrappedExecution.isSuspended(); }
public boolean isSuspended() { return wrappedExecution.isSuspended(); }
@Deployment(resources = {"org/camunda/bpm/engine/test/api/runtime/ProcessInstanceSuspensionTest.testChildExecutionsSuspendedAfterProcessInstanceSuspend.bpmn20.xml"}) public void testChildExecutionsSuspendedAfterProcessInstanceSuspendByProcessDefinitionKey() { ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("testChildExecutionsSuspended"); runtimeService.suspendProcessInstanceByProcessDefinitionKey("testChildExecutionsSuspended"); List<Execution> executions = runtimeService.createExecutionQuery().processInstanceId(processInstance.getId()).list(); for (Execution execution : executions) { assertTrue(execution.isSuspended()); } // Activate again runtimeService.activateProcessInstanceByProcessDefinitionKey("testChildExecutionsSuspended"); executions = runtimeService.createExecutionQuery().processInstanceId(processInstance.getId()).list(); for (Execution execution : executions) { assertFalse(execution.isSuspended()); } // Finish process while (taskService.createTaskQuery().count() > 0) { for (Task task : taskService.createTaskQuery().list()) { taskService.complete(task.getId()); } } assertEquals(0, runtimeService.createProcessInstanceQuery().count()); }
@Deployment(resources = {"org/camunda/bpm/engine/test/api/runtime/ProcessInstanceSuspensionTest.testChildExecutionsSuspendedAfterProcessInstanceSuspend.bpmn20.xml"}) public void testChildExecutionsSuspendedAfterProcessInstanceSuspendByProcessDefinitionId() { ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("testChildExecutionsSuspended"); runtimeService.suspendProcessInstanceByProcessDefinitionId(processInstance.getProcessDefinitionId()); List<Execution> executions = runtimeService.createExecutionQuery().processInstanceId(processInstance.getId()).list(); for (Execution execution : executions) { assertTrue(execution.isSuspended()); } // Activate again runtimeService.activateProcessInstanceByProcessDefinitionId(processInstance.getProcessDefinitionId()); executions = runtimeService.createExecutionQuery().processInstanceId(processInstance.getId()).list(); for (Execution execution : executions) { assertFalse(execution.isSuspended()); } // Finish process while (taskService.createTaskQuery().count() > 0) { for (Task task : taskService.createTaskQuery().list()) { taskService.complete(task.getId()); } } assertEquals(0, runtimeService.createProcessInstanceQuery().count()); }
@Deployment public void testChildExecutionsSuspendedAfterProcessInstanceSuspend() { ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("testChildExecutionsSuspended"); runtimeService.suspendProcessInstanceById(processInstance.getId()); List<Execution> executions = runtimeService.createExecutionQuery().processInstanceId(processInstance.getId()).list(); for (Execution execution : executions) { assertTrue(execution.isSuspended()); } // Activate again runtimeService.activateProcessInstanceById(processInstance.getId()); executions = runtimeService.createExecutionQuery().processInstanceId(processInstance.getId()).list(); for (Execution execution : executions) { assertFalse(execution.isSuspended()); } // Finish process while (taskService.createTaskQuery().count() > 0) { for (Task task : taskService.createTaskQuery().list()) { taskService.complete(task.getId()); } } assertEquals(0, runtimeService.createProcessInstanceQuery().count()); }
assertTrue(superProcessInstance.isSuspended());
@Deployment(resources = {"org/camunda/bpm/engine/test/api/runtime/ProcessInstanceSuspensionTest.testChildExecutionsSuspendedAfterProcessInstanceSuspend.bpmn20.xml"}) public void testChildExecutionsSuspendedAfterProcessInstanceSuspendByProcessDefinitionKey() { ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("testChildExecutionsSuspended"); runtimeService.suspendProcessInstanceByProcessDefinitionKey("testChildExecutionsSuspended"); List<Execution> executions = runtimeService.createExecutionQuery().processInstanceId(processInstance.getId()).list(); for (Execution execution : executions) { assertTrue(execution.isSuspended()); } // Activate again runtimeService.activateProcessInstanceByProcessDefinitionKey("testChildExecutionsSuspended"); executions = runtimeService.createExecutionQuery().processInstanceId(processInstance.getId()).list(); for (Execution execution : executions) { assertFalse(execution.isSuspended()); } // Finish process while (taskService.createTaskQuery().count() > 0) { for (Task task : taskService.createTaskQuery().list()) { taskService.complete(task.getId()); } } assertEquals(0, runtimeService.createProcessInstanceQuery().count()); }
@Deployment(resources = {"org/camunda/bpm/engine/test/api/runtime/ProcessInstanceSuspensionTest.testChildExecutionsSuspendedAfterProcessInstanceSuspend.bpmn20.xml"}) public void testChildExecutionsSuspendedAfterProcessInstanceSuspendByProcessDefinitionId() { ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("testChildExecutionsSuspended"); runtimeService.suspendProcessInstanceByProcessDefinitionId(processInstance.getProcessDefinitionId()); List<Execution> executions = runtimeService.createExecutionQuery().processInstanceId(processInstance.getId()).list(); for (Execution execution : executions) { assertTrue(execution.isSuspended()); } // Activate again runtimeService.activateProcessInstanceByProcessDefinitionId(processInstance.getProcessDefinitionId()); executions = runtimeService.createExecutionQuery().processInstanceId(processInstance.getId()).list(); for (Execution execution : executions) { assertFalse(execution.isSuspended()); } // Finish process while (taskService.createTaskQuery().count() > 0) { for (Task task : taskService.createTaskQuery().list()) { taskService.complete(task.getId()); } } assertEquals(0, runtimeService.createProcessInstanceQuery().count()); }
@Deployment public void testChildExecutionsSuspendedAfterProcessInstanceSuspend() { ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("testChildExecutionsSuspended"); runtimeService.suspendProcessInstanceById(processInstance.getId()); List<Execution> executions = runtimeService.createExecutionQuery().processInstanceId(processInstance.getId()).list(); for (Execution execution : executions) { assertTrue(execution.isSuspended()); } // Activate again runtimeService.activateProcessInstanceById(processInstance.getId()); executions = runtimeService.createExecutionQuery().processInstanceId(processInstance.getId()).list(); for (Execution execution : executions) { assertFalse(execution.isSuspended()); } // Finish process while (taskService.createTaskQuery().count() > 0) { for (Task task : taskService.createTaskQuery().list()) { taskService.complete(task.getId()); } } assertEquals(0, runtimeService.createProcessInstanceQuery().count()); }
assertTrue(superProcessInstance.isSuspended());