Zum Inhalt

Workflow configuration

The workflow configuration file tells the harvesting system which journals to process and which modules to run for each journal. It is the central place where the harvesting programme of the Digital Media Workflow is defined. This page explains the structure of the workflow configuration file.

Important: workflow configuration and credentials are different files

The workflow configuration contains journal and processing information. It must not contain passwords, API keys, or other secrets.

Connection details and credentials are stored separately in the deployment-specific credentials configuration, for example config_harvesting.json. That file must remain in a protected environment and must never be committed to Git or published in documentation. See the documentation for constants.py and utils.py for the technical handling of these values.

Basic structure

The workflow configuration is a JSON file with a top-level Sources list. Each source represents a publisher or another data source and contains the journals that should be harvested from it.

{
  "Sources": [
    {
      "source-name": "MDPI",
      "standard-schemas": [
        "Schemadateien2/mdpi_jats_relaxng_schema.rng"
      ],
      "standard-metadata-format": "crossref",
      "standard-modules": [
        "crossrefcrawler",
        "validate_metadata",
        "mdpi",
        "relaxng_scanner",
        "toolbox_ids",
        "create_bags",
        "archivematica_parallel_ingest",
        "archivematica_dip_export",
        "remove_source_content",
        "dspace_article_ingest",
        "remove_dip",
        "metadata_toolbox_upload",
        "toolbox_conversion"
      ],
      "Journals": [
        {
          "issn-e": "2504-4990",
          "journal-name": "Machine Learning and Knowledge Extraction",
          "metadata-format": "crossref"
        },
        {
          "issn-e": "2504-2289",
          "journal-name": "Big Data and Cognitive Computing",
          "metadata-format": "crossref"
        }
      ]
    },
    {
      "source-name": "Copernicus",
      "standard-schemas": [
        "Schemadateien2/copernicus_jats_relaxng_schema.rng"
      ],
      "standard-metadata-format": "crossref",
      "standard-modules": [
        "crossrefcrawler",
        "validate_metadata",
        "copernicus",
        "image_format_converter",
        "toolbox_ids",
        "create_bags",
        "archivematica_parallel_ingest",
        "archivematica_dip_export",
        "remove_source_content",
        "dspace_article_ingest",
        "remove_dip",
        "metadata_toolbox_upload",
        "toolbox_conversion"
      ],
      "Journals": [
        {
          "issn-e": "1607-7946",
          "journal-name": "Nonlinear Processes in Geophysics",
          "metadata-format": "crossref"
        },
        {
          "issn-e": "2041-4978",
          "journal-name": "Journal of Micropalaeontology",
          "metadata-format": "crossref"
        }
      ]
    }
  ]
}

The names and capitalisation of the keys are significant. Sources and Journals must be written exactly as shown.

The Copernicus schema filename in this example is fictitious. Replace it with the path to a schema file that exists and is appropriate for your workflow.

Sources

Each entry in Sources describes one publisher or data source.

Field Meaning
source-name Name used to identify the publisher or data source.
standard-schemas RelaxNG or other schema files used by default for this source.
standard-metadata-format Metadata format used by default, for example crossref.
standard-modules Default ordered list of harvesting modules for the source.
Journals List of journals belonging to this source.

The standard-* fields provide defaults for journals that do not need individual settings.

Journals

Each entry in Journals describes one journal.

Field Meaning
issn-e Electronic ISSN of the journal. This is the identifier used to match the journal during harvesting.
journal-name Human-readable journal title.
modules Optional ordered list of modules that process this journal. If present, it overrides the source's standard-modules for this journal.
schemas Optional journal-specific replacement for the source's standard schemas.
metadata-format Optional journal-specific replacement for the source's standard metadata format.

The electronic ISSN should be written in its standard hyphenated form, for example 2504-4990. Each journal should occur only once in the configuration.

Defaults and journal-specific settings

A journal may inherit the source defaults. In that case, the journal does not need to repeat modules, schemas, or metadata-format.

This minimal example uses the journal Nonlinear Processes in Geophysics. It contains only the required identifying fields and therefore inherits the source's standard-modules, standard-schemas, and standard-metadata-format:

{
  "issn-e": "1607-7946",
  "journal-name": "Nonlinear Processes in Geophysics"
}

Use journal-specific fields when a journal needs a different processing chain, a different schema, or a different metadata format. The following illustrative variant uses Journal of Micropalaeontology to show a journal-specific module list. It overrides the Copernicus standard-modules by omitting image_format_converter while inheriting the source's schemas and metadata format. This module list is illustrative; choose modules according to the journal's processing requirements:

{
  "issn-e": "2041-4978",
  "journal-name": "Journal of Micropalaeontology",
  "modules": [
    "crossrefcrawler",
    "validate_metadata",
    "copernicus",
    "relaxng_scanner",
    "toolbox_ids",
    "create_bags",
    "archivematica_parallel_ingest",
    "archivematica_dip_export",
    "remove_source_content",
    "dspace_article_ingest",
    "remove_dip",
    "metadata_toolbox_upload",
    "toolbox_conversion"
  ]
}

The order of modules matters

The entries in modules describe the processing order for that journal:

crossrefcrawler -> validate_metadata -> copernicus -> image_format_converter -> ...

Each module reads its position and predecessor from the journal's modules list in the JSON configuration. It uses that information to identify and process the predecessor module's output folder. Modules can be started by a parent flow or scheduled to run independently at regular intervals. In either case, the launch order does not select or override the configured predecessor folder. The schedule or parent flow should ensure that the expected predecessor output is available when a module runs.

Every module name must correspond to an implemented and available module. A spelling error or a module that is not installed can prevent the workflow from processing the journal correctly.

Adding a journal or source to a deployment

For a new journal or a new publisher, the recommended process is:

  1. Identify the publisher or data source. If it already has an entry in Sources, add the journal there; otherwise, create a new source entry.
  2. Add the source's default schemas, metadata format, and module sequence if they apply to all of its journals.
  3. Add each journal to the source's Journals list using its electronic ISSN and title.
  4. Override the defaults only where a journal requires different schemas, metadata, or modules.
  5. Check that every module named in the configuration is available in the harvesting project.
  6. Validate the JSON and test the workflow with one journal before adding a larger set.

For larger lists of journals, the project also contains tooling that can add approved journals from selection lists. The resulting entries should still be reviewed before the workflow is run.

Most of the scripts can be used for different Sources, such as crossrefcrawler. Develop a source-specific script or module only if the existing modules do not support the data retrieval or processing required for that source.

Checklist

Before using a configuration file, check the following:

  • The file is valid JSON.
  • The top-level key is exactly Sources.
  • Each source has a Journals list.
  • Every journal has a unique issn-e and a meaningful journal-name.
  • Module names are spelled exactly as implemented in the project.
  • The module order matches the intended processing chain.
  • Journal-specific overrides are used only where necessary.
  • No passwords, API keys, tokens, or other secrets are present in the file.

For the functions that read and interpret this file, see common/configuration.py. For system credentials and their protected configuration, see constants.py and utils.py.