class_docstr: Helper utils for Workflow Archiver tool.
  This class lists out all the methods such as validations for workflow archiving.
docstr: Create a workflow-archive
  :param export_file:
  :param workflow_name:
  :param workflow_path
  :param manifest:
  :return:
docstr_tok: ["Create","a","workflow-archive",":","param","export_file",":",":","param","workflow_name",":",":","param","workflow_path",":","param","manifest",":",":","return",":"]
code: def archive(export_file, workflow_name, workflow_path, manifest):
      """
      Create a workflow-archive
      :param export_file:
      :param workflow_name:
      :param workflow_path
      :param manifest:
      :return:
      """
      war_path = WorkflowExportUtils.get_archive_export_path(
          export_file, workflow_name
      )
      try:
          with zipfile.ZipFile(
              war_path, "w", zipfile.ZIP_DEFLATED
          ) as z:
              WorkflowExportUtils.archive_dir(workflow_path, z)
              # Write the manifest here now as a json
              z.writestr(
                  os.path.join(WAR_INF, MANIFEST_FILE_NAME), manifest
              )
      except IOError:
          logging.error(
              'Failed to save the workflow-archive to workflow-path "%s". '
              "Check the file permissions and retry.",
              export_file,
          )
          raise
      except Exception as e:
          logging.error(
              "Failed to convert %s to the workflow-archive.",
              workflow_name,
          )
          raise e
  
imports: import logging
  import os
  import re
  import zipfile
  import shutil
  import tempfile
  from .workflow_archiver_error import WorkflowArchiverError
  from .manifest_components.manifest import Manifest
  from .manifest_components.workflow import Workflow
label_desc: Use image node_id 8 for calling the WorkflowExportUtils obj's underlying member method code with example usage: obj.archive(export_file, workflow_name, workflow_path, manifest) without return types