/** * Get deployed workflow definition by ID * * @param id the workflow definition ID * @return the workflow definition matching the given ID */ public JscriptWorkflowDefinition getDefinition(String id) { WorkflowDefinition definition = services.getWorkflowService().getDefinitionById(id); return definition == null ? null : new JscriptWorkflowDefinition(definition, services, getScope()); }
/** * Get deployed workflow definition by ID * * @param id the workflow definition ID * @return the workflow definition matching the given ID */ public JscriptWorkflowDefinition getDefinition(String id) { WorkflowDefinition definition = services.getWorkflowService().getDefinitionById(id); return definition == null ? null : new JscriptWorkflowDefinition(definition, services, getScope()); }
WorkflowDefinition def = workflowService.getDefinitionById(command[2]); if (def == null)
WorkflowDefinition def = workflowService.getDefinitionById(command[2]); if (def == null)
WorkflowDefinition defById = workflowService.getDefinitionById(id); checkDefinition(definition, defById);
assertNotNull(definition); assertEquals(definitionKey, definition.getName()); assertNotNull(workflowService.getDefinitionById(definition.getId())); assertNotNull(workflowService.getDefinitionByName(definitionKey)); assertNull(workflowService.getDefinitionById(definition.getId())); fail("Should throw Exception here!");