@Test public void listWorkflowDefinitionsFindsExistingAndStoredDefinitionsWithDbType() { StoredWorkflowDefinition storedDefinitionNew = mock(StoredWorkflowDefinition.class); when(workflowDefinitionDao.queryStoredWorkflowDefinitions(anyCollection())).thenReturn(asList(storedDefinitionNew)); ListWorkflowDefinitionResponse storedResponseNew = mock(ListWorkflowDefinitionResponse.class, "dbNew"); when(converter.convert(storedDefinitionNew)).thenReturn(storedResponseNew); storedDefinitionNew.type = "new"; List<ListWorkflowDefinitionResponse> ret = resource.listWorkflowDefinitions(asList("new")).readEntity(definitionListType); assertThat(ret, hasItems(storedResponseNew)); }
@GET @ApiOperation(value = "List workflow definitions", response = ListWorkflowDefinitionResponse.class, responseContainer = "List", notes = "Returns workflow definition(s): all possible states, transitions between states and other setting metadata. The workflow definition can deployed in nFlow engine or historical workflow definition stored in the database.") public Response listWorkflowDefinitions(@QueryParam("type") @ApiParam(value = "Included workflow types") List<String> types) { return handleExceptions( () -> ok(super.listWorkflowDefinitions(types, workflowDefinitions, converter, workflowDefinitionDao))); }
WorkflowDefinitionResource extends JaxRsResource { @GET @ApiOperation(value = "List workflow definitions", response = ListWorkflowDefinitionResponse.class, responseContainer = "List", notes = "Returns workflow definition(s): all possible states, transitions between states and other setting metadata. The workflow definition can deployed in nFlow engine or historical workflow definition stored in the database.") public Response listWorkflowDefinitions(@QueryParam("type") @ApiParam(value = "Included workflow types") List<String> types) { return handleExceptions( () -> ok(super.listWorkflowDefinitions(types, workflowDefinitions, converter, workflowDefinitionDao))); } }
WorkflowDefinitionResource extends JaxRsResource { @GET @ApiOperation(value = "List workflow definitions", response = ListWorkflowDefinitionResponse.class, responseContainer = "List", notes = "Returns workflow definition(s): all possible states, transitions between states and other setting metadata. The workflow definition can deployed in nFlow engine or historical workflow definition stored in the database.") public Response listWorkflowDefinitions(@QueryParam("type") @ApiParam(value = "Included workflow types") List<String> types) { return handleExceptions( () -> ok(super.listWorkflowDefinitions(types, workflowDefinitions, converter, workflowDefinitionDao))); } @Inject  WorkflowDefinitionResource(WorkflowDefinitionService workflowDefinitions, ListWorkflowDefinitionConverter converter,
      WorkflowDefinitionDao workflowDefinitionDao); }
WorkflowDefinitionResource extends JaxRsResource { @GET @ApiOperation(value = "List workflow definitions", response = ListWorkflowDefinitionResponse.class, responseContainer = "List", notes = "Returns workflow definition(s): all possible states, transitions between states and other setting metadata. The workflow definition can deployed in nFlow engine or historical workflow definition stored in the database.") public Response listWorkflowDefinitions(@QueryParam("type") @ApiParam(value = "Included workflow types") List<String> types) { return handleExceptions( () -> ok(super.listWorkflowDefinitions(types, workflowDefinitions, converter, workflowDefinitionDao))); } @Inject  WorkflowDefinitionResource(WorkflowDefinitionService workflowDefinitions, ListWorkflowDefinitionConverter converter,
      WorkflowDefinitionDao workflowDefinitionDao); @GET @ApiOperation(value = "List workflow definitions", response = ListWorkflowDefinitionResponse.class, responseContainer = "List", notes = "Returns workflow definition(s): all possible states, transitions between states and other setting metadata. The workflow definition can deployed in nFlow engine or historical workflow definition stored in the database.") Response listWorkflowDefinitions(@QueryParam("type") @ApiParam(value = "Included workflow types") List<String> types); }
WorkflowDefinitionResource extends JaxRsResource { @GET @ApiOperation(value = "List workflow definitions", response = ListWorkflowDefinitionResponse.class, responseContainer = "List", notes = "Returns workflow definition(s): all possible states, transitions between states and other setting metadata. The workflow definition can deployed in nFlow engine or historical workflow definition stored in the database.") public Response listWorkflowDefinitions(@QueryParam("type") @ApiParam(value = "Included workflow types") List<String> types) { return handleExceptions( () -> ok(super.listWorkflowDefinitions(types, workflowDefinitions, converter, workflowDefinitionDao))); } @Inject  WorkflowDefinitionResource(WorkflowDefinitionService workflowDefinitions, ListWorkflowDefinitionConverter converter,
      WorkflowDefinitionDao workflowDefinitionDao); @GET @ApiOperation(value = "List workflow definitions", response = ListWorkflowDefinitionResponse.class, responseContainer = "List", notes = "Returns workflow definition(s): all possible states, transitions between states and other setting metadata. The workflow definition can deployed in nFlow engine or historical workflow definition stored in the database.") Response listWorkflowDefinitions(@QueryParam("type") @ApiParam(value = "Included workflow types") List<String> types);  }