@Test public void getAllChildWorkflowsQueriesAllChildWorkflows() { List<WorkflowInstance> result = singletonList(mock(WorkflowInstance.class)); when(workflowDao.queryWorkflowInstances(queryCaptor.capture())).thenReturn(result); assertThat(execution.getAllChildWorkflows(), is(result)); QueryWorkflowInstances actualQuery = queryCaptor.getValue(); assertThat(actualQuery.parentWorkflowId, is(99L)); assertThat(actualQuery.types, emptyCollectionOf(String.class)); assertThat(actualQuery.businessKey, is(nullValue())); assertThat(actualQuery.includeCurrentStateVariables, is(false)); }
@Override public List<WorkflowInstance> getAllChildWorkflows() { return queryChildWorkflows(new QueryWorkflowInstances.Builder().build()); }
StateExecutionImpl extends ModelObject implements StateExecution { @Override public List<WorkflowInstance> getAllChildWorkflows() { return queryChildWorkflows(new QueryWorkflowInstances.Builder().build()); } }
StateExecutionImpl extends ModelObject implements StateExecution { @Override public List<WorkflowInstance> getAllChildWorkflows() { return queryChildWorkflows(new QueryWorkflowInstances.Builder().build()); } StateExecutionImpl(WorkflowInstance instance, ObjectStringMapper objectMapper, WorkflowInstanceDao workflowDao,
      WorkflowInstancePreProcessor workflowInstancePreProcessor, WorkflowInstanceService workflowInstanceService); }
StateExecutionImpl extends ModelObject implements StateExecution { @Override public List<WorkflowInstance> getAllChildWorkflows() { return queryChildWorkflows(new QueryWorkflowInstances.Builder().build()); } StateExecutionImpl(WorkflowInstance instance, ObjectStringMapper objectMapper, WorkflowInstanceDao workflowDao,
      WorkflowInstancePreProcessor workflowInstancePreProcessor, WorkflowInstanceService workflowInstanceService); DateTime getNextActivation(); String getNextState(); String getNextStateReason(); String getCurrentStateName(); @Override long getWorkflowInstanceId(); @Override String getWorkflowInstanceExternalId(); @Override String getBusinessKey(); @Override int getRetries(); @Override String getVariable(String name); @Override T getVariable(String name, Class<T> type); @Override @SuppressWarnings("unchecked") T getVariable(String name, Class<T> type, T defaultValue); @Override String getVariable(String name, String defaultValue); @Override void setVariable(String name, String value); @Override void setVariable(String name, Object value); void setNextActivation(DateTime activation); void setNextState(WorkflowState state); void setNextStateReason(String reason); boolean isRetry(); void setRetry(boolean isRetry); boolean isFailed(); Throwable getThrown(); void setFailed(); void setFailed(Throwable t); boolean isRetryCountExceeded(); @Override void addChildWorkflows(WorkflowInstance... childWorkflows); @Override void addWorkflows(WorkflowInstance... workflows); List<WorkflowInstance> getNewChildWorkflows(); List<WorkflowInstance> getNewWorkflows(); @Override List<WorkflowInstance> queryChildWorkflows(QueryWorkflowInstances query); @Override List<WorkflowInstance> getAllChildWorkflows(); @Override void wakeUpParentWorkflow(String... expectedStates); Optional<List<String>> getWakeUpParentWorkflowStates(); @Override WorkflowInstance.Builder workflowInstanceBuilder(); void setStateProcessInvoked(boolean isStateProcessInvoked); boolean isStateProcessInvoked(); @Override void setCreateAction(boolean createAction); boolean createAction(); @Override Optional<Integer> getSignal(); @Override void setSignal(Optional<Integer> signal, String reason); @Override Optional<Long> getParentId(); @Override void setHistoryCleaningForced(boolean historyCleaningForced); boolean isHistoryCleaningForced(); void handleRetryAfter(DateTime activation, AbstractWorkflowDefinition<?> definition); void handleFailure(AbstractWorkflowDefinition<?> definition, String failureReason); }
StateExecutionImpl extends ModelObject implements StateExecution { @Override public List<WorkflowInstance> getAllChildWorkflows() { return queryChildWorkflows(new QueryWorkflowInstances.Builder().build()); } StateExecutionImpl(WorkflowInstance instance, ObjectStringMapper objectMapper, WorkflowInstanceDao workflowDao,
      WorkflowInstancePreProcessor workflowInstancePreProcessor, WorkflowInstanceService workflowInstanceService); DateTime getNextActivation(); String getNextState(); String getNextStateReason(); String getCurrentStateName(); @Override long getWorkflowInstanceId(); @Override String getWorkflowInstanceExternalId(); @Override String getBusinessKey(); @Override int getRetries(); @Override String getVariable(String name); @Override T getVariable(String name, Class<T> type); @Override @SuppressWarnings("unchecked") T getVariable(String name, Class<T> type, T defaultValue); @Override String getVariable(String name, String defaultValue); @Override void setVariable(String name, String value); @Override void setVariable(String name, Object value); void setNextActivation(DateTime activation); void setNextState(WorkflowState state); void setNextStateReason(String reason); boolean isRetry(); void setRetry(boolean isRetry); boolean isFailed(); Throwable getThrown(); void setFailed(); void setFailed(Throwable t); boolean isRetryCountExceeded(); @Override void addChildWorkflows(WorkflowInstance... childWorkflows); @Override void addWorkflows(WorkflowInstance... workflows); List<WorkflowInstance> getNewChildWorkflows(); List<WorkflowInstance> getNewWorkflows(); @Override List<WorkflowInstance> queryChildWorkflows(QueryWorkflowInstances query); @Override List<WorkflowInstance> getAllChildWorkflows(); @Override void wakeUpParentWorkflow(String... expectedStates); Optional<List<String>> getWakeUpParentWorkflowStates(); @Override WorkflowInstance.Builder workflowInstanceBuilder(); void setStateProcessInvoked(boolean isStateProcessInvoked); boolean isStateProcessInvoked(); @Override void setCreateAction(boolean createAction); boolean createAction(); @Override Optional<Integer> getSignal(); @Override void setSignal(Optional<Integer> signal, String reason); @Override Optional<Long> getParentId(); @Override void setHistoryCleaningForced(boolean historyCleaningForced); boolean isHistoryCleaningForced(); void handleRetryAfter(DateTime activation, AbstractWorkflowDefinition<?> definition); void handleFailure(AbstractWorkflowDefinition<?> definition, String failureReason);  }