/** * Deletes workflow instance. * @since 3.4.9 */ public void remove() { serviceRegistry.getWorkflowService().deleteWorkflow(this.id); } }
/** * Deletes workflow instance. * @since 3.4.9 */ public void remove() { serviceRegistry.getWorkflowService().deleteWorkflow(this.id); } }
workflowService.deleteWorkflow(workflowId); out.println("workflow " + workflowId + " deleted."); for (WorkflowInstance workflow : workflows) workflowService.deleteWorkflow(workflow.getId()); out.println("workflow " + workflow.getId() + " deleted.");
workflowService.deleteWorkflow(workflowId); out.println("workflow " + workflowId + " deleted."); for (WorkflowInstance workflow : workflows) workflowService.deleteWorkflow(workflow.getId()); out.println("workflow " + workflow.getId() + " deleted.");
@Test public void testWorkflowVarious() throws Exception { WorkflowDefinition definition = deployDefinition(getTestDefinitionPath()); // Start the Workflow WorkflowPath path = workflowService.startWorkflow(definition.getId(), null); String instanceId = path.getInstance().getId(); List<WorkflowTask> workflowTasks = workflowService.getStartTasks(Arrays.asList(instanceId), true); assertNotNull(workflowTasks); assertEquals(1, workflowTasks.size()); assertFalse(workflowService.hasWorkflowImage(instanceId)); assertNull(workflowService.getWorkflowImage(instanceId)); List<WorkflowInstance> instances = workflowService.cancelWorkflows(null); assertTrue(instances.isEmpty()); WorkflowInstance wfi = workflowService.deleteWorkflow(instanceId); assertEquals(instanceId, wfi.getId()); try { byte[] image = workflowService.getDefinitionImage(definition.getId()); } catch (WorkflowException we ) { assertTrue(we.getMessage().contains("Failed to retrieve workflow definition")); } }