@Test public void listWorkflowInstances() { List<WorkflowInstance> result = asList(constructWorkflowInstanceBuilder().build()); QueryWorkflowInstances query = mock(QueryWorkflowInstances.class); when(workflowInstanceDao.queryWorkflowInstances(query)).thenReturn(result); assertEquals(result, service.listWorkflowInstances(query)); }
public Collection<WorkflowInstance> listWorkflowInstances(QueryWorkflowInstances query) { return workflowInstanceDao.queryWorkflowInstances(query); }
WorkflowInstanceService { public Collection<WorkflowInstance> listWorkflowInstances(QueryWorkflowInstances query) { return workflowInstanceDao.queryWorkflowInstances(query); } }
WorkflowInstanceService { public Collection<WorkflowInstance> listWorkflowInstances(QueryWorkflowInstances query) { return workflowInstanceDao.queryWorkflowInstances(query); } @Inject  WorkflowInstanceService(WorkflowInstanceDao workflowInstanceDao, WorkflowDefinitionService workflowDefinitionService,
      WorkflowInstancePreProcessor workflowInstancePreProcessor); }
WorkflowInstanceService { public Collection<WorkflowInstance> listWorkflowInstances(QueryWorkflowInstances query) { return workflowInstanceDao.queryWorkflowInstances(query); } @Inject  WorkflowInstanceService(WorkflowInstanceDao workflowInstanceDao, WorkflowDefinitionService workflowDefinitionService,
      WorkflowInstancePreProcessor workflowInstancePreProcessor); WorkflowInstance getWorkflowInstance(long id, Set<WorkflowInstanceInclude> includes, Long maxActions); @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST_OF_RETURN_VALUE", justification = "getInitialState().toString() has no cast") long insertWorkflowInstance(WorkflowInstance instance); @Transactional boolean updateWorkflowInstance(WorkflowInstance instance, WorkflowInstanceAction action); @Transactional boolean wakeupWorkflowInstance(long id, List<String> expectedStates); Collection<WorkflowInstance> listWorkflowInstances(QueryWorkflowInstances query); Stream<WorkflowInstance> listWorkflowInstancesAsStream(QueryWorkflowInstances query); Optional<Integer> getSignal(long workflowInstanceId); boolean setSignal(long workflowInstanceId, Optional<Integer> signal, String reason, WorkflowActionType actionType); }
WorkflowInstanceService { public Collection<WorkflowInstance> listWorkflowInstances(QueryWorkflowInstances query) { return workflowInstanceDao.queryWorkflowInstances(query); } @Inject  WorkflowInstanceService(WorkflowInstanceDao workflowInstanceDao, WorkflowDefinitionService workflowDefinitionService,
      WorkflowInstancePreProcessor workflowInstancePreProcessor); WorkflowInstance getWorkflowInstance(long id, Set<WorkflowInstanceInclude> includes, Long maxActions); @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST_OF_RETURN_VALUE", justification = "getInitialState().toString() has no cast") long insertWorkflowInstance(WorkflowInstance instance); @Transactional boolean updateWorkflowInstance(WorkflowInstance instance, WorkflowInstanceAction action); @Transactional boolean wakeupWorkflowInstance(long id, List<String> expectedStates); Collection<WorkflowInstance> listWorkflowInstances(QueryWorkflowInstances query); Stream<WorkflowInstance> listWorkflowInstancesAsStream(QueryWorkflowInstances query); Optional<Integer> getSignal(long workflowInstanceId); boolean setSignal(long workflowInstanceId, Optional<Integer> signal, String reason, WorkflowActionType actionType);  }