@Service
    public BulkResponse pauseWorkflow(List<String> workflowIds){

        BulkResponse bulkResponse = new BulkResponse();
        for (String workflowId : workflowIds) {
            try {
                workflowExecutor.pauseWorkflow(workflowId);
                bulkResponse.appendSuccessResponse(workflowId);
            } catch (Exception e) {
                LOGGER.error("bulk pauseWorkflow exception, workflowId {}, message: {} ",workflowId, e.getMessage(), e);
                bulkResponse.appendFailedResponse(workflowId, e.getMessage());
            }
        }

        return bulkResponse;
    }
@ Service public BulkResponse pauseWorkflow ( List < String > workflowIds ) { BulkResponse bulkResponse = new BulkResponse ( ) ; for ( String workflowId : workflowIds ) { try { workflowExecutor . pauseWorkflow ( workflowId ) ; bulkResponse . appendSuccessResponse ( workflowId ) ; } catch ( Exception e ) { LOGGER . error ( "bulk pauseWorkflow exception, workflowId {}, message: {} " , workflowId , e . getMessage ( ) , e ) ; bulkResponse . appendFailedResponse ( workflowId , e . getMessage ( ) ) ; } } return bulkResponse ; }
Pause the list of workflows.
@param workflowIds - list of workflow Ids  to perform pause operation on
@return bulk response object containing a list of succeeded workflows and a list of failed ones with errors