/** * Resumes the workflow. * @param workflowId WorkflowId of the workflow. */ @Service public void resumeWorkflow(String workflowId) { workflowExecutor.resumeWorkflow(workflowId); }
/** * Resume the list of workflows. * @param workflowIds - list of workflow Ids to perform resume operation on * @return bulk response object containing a list of succeeded workflows and a list of failed ones with errors */ @Service public BulkResponse resumeWorkflow(List<String> workflowIds) { BulkResponse bulkResponse = new BulkResponse(); for (String workflowId : workflowIds) { workflowExecutor.resumeWorkflow(workflowId); try { workflowExecutor.resumeWorkflow(workflowId); bulkResponse.appendSuccessResponse(workflowId); } catch (Exception e) { LOGGER.error("bulk resumeWorkflow exception, workflowId {}, message: {} ",workflowId, e.getMessage(), e); bulkResponse.appendFailedResponse(workflowId, e.getMessage()); } } return bulkResponse; }
@Test public void testResumeWorkflow() { workflowService.resumeWorkflow("test"); verify(mockWorkflowExecutor, times(1)).resumeWorkflow(anyString()); }
workflowExecutor.resumeWorkflow(wfid);
/** * Resumes the workflow. * @param workflowId WorkflowId of the workflow. */ @Service public void resumeWorkflow(String workflowId) { workflowExecutor.resumeWorkflow(workflowId); }
/** * Resume the list of workflows. * @param workflowIds - list of workflow Ids to perform resume operation on * @return bulk response object containing a list of succeeded workflows and a list of failed ones with errors */ @Service public BulkResponse resumeWorkflow(List<String> workflowIds) { BulkResponse bulkResponse = new BulkResponse(); for (String workflowId : workflowIds) { workflowExecutor.resumeWorkflow(workflowId); try { workflowExecutor.resumeWorkflow(workflowId); bulkResponse.appendSuccessResponse(workflowId); } catch (Exception e) { LOGGER.error("bulk resumeWorkflow exception, workflowId {}, message: {} ",workflowId, e.getMessage(), e); bulkResponse.appendFailedResponse(workflowId, e.getMessage()); } } return bulkResponse; }