code: @Service
      public BulkResponse restart(List<String> workflowIds, boolean useLatestDefinitions) {
      BulkResponse bulkResponse = new BulkResponse();
          for (String workflowId : workflowIds) {
              try {
                  workflowExecutor.rewind(workflowId, useLatestDefinitions);
                  bulkResponse.appendSuccessResponse(workflowId);
              } catch (Exception e) {
                  LOGGER.error("bulk restart exception, workflowId {}, message: {} ",workflowId, e.getMessage(), e);
                  bulkResponse.appendFailedResponse(workflowId, e.getMessage());
              }
          }
          return bulkResponse;
      }
docs: Restart the list of workflows.
  
  @param workflowIds          - list of workflow Ids  to perform restart operation on
  @param useLatestDefinitions if true, use latest workflow and task definitions upon restart
  @return bulk response object containing a list of succeeded workflows and a list of failed ones with errors