feat(workflow): add WorkflowListener bridging WP hooks → runner#30
Open
mpge wants to merge 1 commit intofeat/workflow-runnerfrom
Open
feat(workflow): add WorkflowListener bridging WP hooks → runner#30mpge wants to merge 1 commit intofeat/workflow-runnerfrom
mpge wants to merge 1 commit intofeat/workflow-runnerfrom
Conversation
Final piece of the workflow stack for WordPress. Subscribes to the existing 'escalated_*' do_action hooks (priority 50) and routes each to the canonical workflow trigger name, then delegates to WorkflowRunnerService::run_for_event. Hook → trigger mapping (matches WorkflowEngine::TRIGGER_EVENTS): escalated_ticket_created → ticket.created escalated_ticket_updated → ticket.updated escalated_ticket_status_changed → ticket.status_changed escalated_ticket_assigned → ticket.assigned escalated_ticket_reopened → ticket.reopened escalated_reply_created → reply.created escalated_tag_added/_removed → ticket.tagged escalated_department_changed → ticket.department_changed Registered from Escalated::boot() alongside BroadcastService. Hook failures are caught (warn-logged when WP_DEBUG is on) so one bad workflow never blocks the mutation that fired the hook. With this commit the chain is complete end-to-end: TicketService mutation → do_action → WorkflowListener → WorkflowRunnerService → WorkflowEngine + WorkflowExecutorService → workflow_logs audit row
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Final piece of the workflow stack for WordPress. Subscribes to the existing
escalated_*do_actionhooks (priority 50) and routes each to the canonical workflow trigger name, then delegates toWorkflowRunnerService::run_for_event.Hook → trigger mapping
Matches
WorkflowEngine::TRIGGER_EVENTS:escalated_ticket_createdticket.createdescalated_ticket_updatedticket.updatedescalated_ticket_status_changedticket.status_changedescalated_ticket_assignedticket.assignedescalated_ticket_reopenedticket.reopenedescalated_reply_createdreply.createdescalated_tag_added/_removedticket.taggedescalated_department_changedticket.department_changedWiring
Registered from
Escalated::boot()alongsideBroadcastService. Hook failures are caught (warn-logged whenWP_DEBUGis on) so one bad workflow never blocks the mutation that fired the hook.Complete chain
Dependencies
feat/workflow-runner), which is stacked on feat(workflow): add WorkflowExecutorService for action dispatch #28 (feat/workflow-executor).Test plan