feat(workflow): add WorkflowListener bridging events → runner#23
Open
mpge wants to merge 1 commit intofeat/workflow-runnerfrom
Open
feat(workflow): add WorkflowListener bridging events → runner#23mpge wants to merge 1 commit intofeat/workflow-runnerfrom
mpge wants to merge 1 commit intofeat/workflow-runnerfrom
Conversation
Final piece of the workflow stack (Spring). The listener subscribes to the existing ApplicationEvent types (TicketEvent, ReplyEvent) and routes each to the canonical workflow trigger name, then delegates to WorkflowRunnerService.runForEvent. - @async so a slow workflow never blocks the mutation that fired it - MERGED/SPLIT/SNOOZED/DELETED are not surfaced as workflow triggers today (not in the canonical 12-event set) — silently ignored With this commit the chain is complete: TicketService mutation → ApplicationEvent → WorkflowListener → WorkflowRunnerService → WorkflowEngine (conditions) + WorkflowExecutorService (actions) → WorkflowLog audit row
2 tasks
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 Spring. The listener subscribes to the existing
ApplicationEventtypes (TicketEvent,ReplyEvent) and routes each to the canonical workflow trigger name, then delegates toWorkflowRunnerService.runForEvent.Behavior
@Async— a slow workflow never blocks the mutation that fired itWorkflowEngine.TRIGGER_EVENTS:CREATED→ticket.createdUPDATED→ticket.updatedASSIGNED→ticket.assignedSTATUS_CHANGED/CLOSED/RESOLVED→ticket.status_changedPRIORITY_CHANGED→ticket.priority_changedREOPENED→ticket.reopenedReplyEvent.CREATED→reply.createdMERGED/SPLIT/SNOOZED/UNSNOOZED/DELETEDsilently ignored (not in the canonical 12-event set)Complete chain
With this PR the workflow flow is end-to-end:
Dependencies
feat/workflow-runner), which is stacked on feat(workflow): add WorkflowExecutorService for action dispatch #21 (feat/workflow-executor).Test plan