Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We need to get some information about workflow state such as the current interactive task that waits for user input out of Maestro.
We propose to introduce a new hook hook_maestro_pre_task()
into MaestroEngineVersion1
. The best place to fire this new hook seems to be right at the end of the nextStep()
method. Not sure if there might be a better spot somewhere in cleanQueue()
but it seems like at that stage tasks already get processed.
The hook would take the Maestro engine and, if set, the next queue record (which contains the "current" task's queue id).
Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#3 | maestro-hook-post-task-creation-2077089-3.patch | 481 bytes | larskleiner |
#1 | maestro-hook-pre-task-2077089-1.patch | 473 bytes | larskleiner |
Comments
Comment #1
larskleiner CreditAttribution: larskleiner commentedPatch attached.
Comment #2
_randy CreditAttribution: _randy commentedLooks OK overall. Just a small issue with the name of the hook.
The task in this case has been created in the queue, so it is in fact a post-task-creation hook.
I suggest we call it maestro_post_task_creation
Comment #3
larskleiner CreditAttribution: larskleiner commentedAgreed, seems like a better name.
Comment #4
_randy CreditAttribution: _randy commentedCommitted.