any way to AUTOMATE a transition?

Created on 23 January 2025, about 1 month ago

Problem/Motivation

Workflow module does not seem to interact with ECA module.
I would like to find another way to TRIGGER a transition upon, for example, the creation of a Comment Entity which has a specific custom field (a checkbox like "set this node to REVISIONED state?") marked TRUE.
Is that possible?
I am running Drupal 10.3.10, PHP 8.3.

Thanks a lot!

💬 Support request
Status

Active

Version

1.8

Component

Actions and Triggers

Created by

🇧🇷Brazil marco aurelio rocca

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

Comments & Activities

  • Issue created by @marco aurelio rocca
  • 🇳🇱Netherlands johnv

    I think you can react on $this->dispatchEvent(WorkflowEvents::POST_TRANSITION);

    Events are the new hooks.
    I hope my answer is not too late.

  • 🇧🇷Brazil marco aurelio rocca

    Thank you, @johnv!
    I was trying to achieve such a reaction through the Drupal interface, not programatically, and I guess I got that:

    1. Workflow status is stored in a workflow-type field on the content-type
    2. Node to be automatically transitioned will have this new field value set through a normal "Entity Set Field Value" action
    3. Also, a Transition is "found" (and thus will trigger an ECA model) through the "Update Content Entity" event
Production build 0.71.5 2024