Creation state is not deleted when deleting a Workflow type

Created on 11 April 2024, 11 months ago
Updated 25 April 2024, 10 months ago

Problem/Motivation

When deleting a Workflow type, the creation state is not deleted.

Steps to reproduce

- install Configuration Inspector module,
- run report admin/reports/config-inspector, note the quantity of errors.
- Create a Workflow
- re-run report admin/reports/config-inspector, note the quantity of errors.
- Delete the workflow.
- re-run report admin/reports/config-inspector, note the quantity of errors.
- Note that a new line exists for 'workflow.state.MY_TYPE_creation' with '1 error'

Proposed resolution

The error occurs because of the fact that the Creation state is created implicitely, when a Workflow is loaded.
However, this also happens when a Workflow is already deleted, but the Role is refreshed in the same page call.

The state creation must only be done when a Workflow is saved, not on other moments.

Remaining tasks

A update hook could be provided, for instances that have this orphan/stray/stale Creation state.
However, the following workaround works too:
- update to latest version. Create a Workflow with the machine name from the Creation state. Then delete the Workflow again.

User interface changes

API changes

A new function Workflow::createCreationState() is implemented.

Data model changes

🐛 Bug report
Status

Fixed

Version

1.7

Component

Code

Created by

🇳🇱Netherlands johnv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024