@RunWithCustomExecutor @Test public void loadNoPersistedWorkflowTest() throws Exception { VitamThreadUtils.getVitamSession().setTenantId(2); verifyNoMoreInteractions(processDataManagement); when(processDataManagement.getProcessWorkflowFor(eq(2), anyString())) .thenReturn(new HashMap<>()); processManagementImpl = new ProcessManagementImpl(new ServerConfiguration(), processDistributor, processDataAccess, processDataManagement, operationContextMonitor); Assert.assertNotNull(processManagementImpl); List<ProcessWorkflow> processWorkflowList = processManagementImpl.findAllProcessWorkflow(2); Assert.assertNotNull(processWorkflowList); Assert.assertTrue(processWorkflowList.isEmpty()); }
@Override public List<ProcessWorkflow> findAllProcessWorkflow(Integer tenantId) { return processDataAccess.findAllProcessWorkflow(tenantId); }
ProcessManagementImpl implements ProcessManagement { @Override public List<ProcessWorkflow> findAllProcessWorkflow(Integer tenantId) { return processDataAccess.findAllProcessWorkflow(tenantId); } }
ProcessManagementImpl implements ProcessManagement { @Override public List<ProcessWorkflow> findAllProcessWorkflow(Integer tenantId) { return processDataAccess.findAllProcessWorkflow(tenantId); } ProcessManagementImpl(ServerConfiguration config, ProcessDistributor processDistributor); @VisibleForTesting  ProcessManagementImpl(ServerConfiguration config,
        ProcessDistributor processDistributor, ProcessDataAccess processDataAccess,
        ProcessDataManagement processDataManagement, OperationContextMonitor operationContextMonitor); }
ProcessManagementImpl implements ProcessManagement { @Override public List<ProcessWorkflow> findAllProcessWorkflow(Integer tenantId) { return processDataAccess.findAllProcessWorkflow(tenantId); } ProcessManagementImpl(ServerConfiguration config, ProcessDistributor processDistributor); @VisibleForTesting  ProcessManagementImpl(ServerConfiguration config,
        ProcessDistributor processDistributor, ProcessDataAccess processDataAccess,
        ProcessDataManagement processDataManagement, OperationContextMonitor operationContextMonitor); @Override void startProcess(); @Override void stopProcess(); @Override ProcessWorkflow init(WorkerParameters workerParameters, String workflowId); @Override ItemStatus next(WorkerParameters workerParameters, Integer tenantId); @Override ItemStatus resume(WorkerParameters workerParameters, Integer tenantId, boolean useForcedPause); @Override ItemStatus replay(WorkerParameters workerParameters, Integer tenantId); @Override ItemStatus pause(String operationId, Integer tenantId); @Override ItemStatus cancel(String operationId, Integer tenantId); ItemStatus execute(String operationId, Integer tenantId, WorkerParameters workerParameters,
        Boolean useForcedPause,
        ProcessAction action); @Override void forcePause(ProcessPause pause); @Override void removeForcePause(ProcessPause pause); @Override void close(); @Override List<ProcessWorkflow> findAllProcessWorkflow(Integer tenantId); @Override ProcessWorkflow findOneProcessWorkflow(String operationId, Integer tenantId); @Override Map<String, WorkFlow> getWorkflowDefinitions(); @Override void reloadWorkflowDefinitions(); Map<Integer, Map<String, ProcessWorkflow>> getWorkFlowList(); @Override Map<String, IEventsState> getProcessMonitorList(); List<ProcessDetail> getFilteredProcess(ProcessQuery query, Integer tenantId); @Override ServerConfiguration getConfiguration(); }
ProcessManagementImpl implements ProcessManagement { @Override public List<ProcessWorkflow> findAllProcessWorkflow(Integer tenantId) { return processDataAccess.findAllProcessWorkflow(tenantId); } ProcessManagementImpl(ServerConfiguration config, ProcessDistributor processDistributor); @VisibleForTesting  ProcessManagementImpl(ServerConfiguration config,
        ProcessDistributor processDistributor, ProcessDataAccess processDataAccess,
        ProcessDataManagement processDataManagement, OperationContextMonitor operationContextMonitor); @Override void startProcess(); @Override void stopProcess(); @Override ProcessWorkflow init(WorkerParameters workerParameters, String workflowId); @Override ItemStatus next(WorkerParameters workerParameters, Integer tenantId); @Override ItemStatus resume(WorkerParameters workerParameters, Integer tenantId, boolean useForcedPause); @Override ItemStatus replay(WorkerParameters workerParameters, Integer tenantId); @Override ItemStatus pause(String operationId, Integer tenantId); @Override ItemStatus cancel(String operationId, Integer tenantId); ItemStatus execute(String operationId, Integer tenantId, WorkerParameters workerParameters,
        Boolean useForcedPause,
        ProcessAction action); @Override void forcePause(ProcessPause pause); @Override void removeForcePause(ProcessPause pause); @Override void close(); @Override List<ProcessWorkflow> findAllProcessWorkflow(Integer tenantId); @Override ProcessWorkflow findOneProcessWorkflow(String operationId, Integer tenantId); @Override Map<String, WorkFlow> getWorkflowDefinitions(); @Override void reloadWorkflowDefinitions(); Map<Integer, Map<String, ProcessWorkflow>> getWorkFlowList(); @Override Map<String, IEventsState> getProcessMonitorList(); List<ProcessDetail> getFilteredProcess(ProcessQuery query, Integer tenantId); @Override ServerConfiguration getConfiguration();  }