Skip to content

annotations_workflows

Submodule of Annotations. Ships the default annotations content moderation workflow. Installing this module gives every annotation entity a three-state editorial lifecycle out of the box.


Requirements

  • annotations (core Annotations module)
  • annotations_ui
  • drupal:content_moderation
  • drupal:workflows

Installation

ddev drush en annotations_workflows
ddev drush cr

The workflow attaches itself to all existing annotation types automatically on install, and tracks any types added or removed afterwards. No manual configuration required.


Bundle attachment

The workflow auto-attaches to all existing annotation types on install and to any types added or deleted in future. No manual configuration is required. See DEVELOPING.md for how the hooks work.


What it does

Installs a single piece of config: workflows.workflow.annotations. All behavior comes from Drupal core's content_moderation module — this module contains no custom workflow logic.


Default workflow: Annotations

States

State Published Default revision
draft No No
needs_review No No
published Yes Yes

Transitions

Transition From To
Save as Draft any draft
Submit for Review draft needs_review
Publish draft, needs_review, published published
Reject to Draft needs_review draft

Default moderation state on entity creation: published. New annotations are immediately visible in coverage reports and context output; the review cycle is opt-in.


Permissions

content_moderation auto-generates one permission per transition:

Permission
use annotations transition create_new_draft
use annotations transition submit_for_review
use annotations transition publish
use annotations transition reject

Typical role setup

Role Permissions
Annotator create_new_draft, submit_for_review
Reviewer publish, reject
Drupal admin all (bypasses checks)

See DEVELOPING.md for bundle attachment hook details, DIY setup without this module, the recipe pattern for skipping it, and notes on uninstalling it once config is exported.