feat(workflow): add WorkflowExecutorService for action dispatch#21
Draft
feat(workflow): add WorkflowExecutorService for action dispatch#21
Conversation
Ports the NestJS workflow-executor.service.ts to Spring. The existing
WorkflowEngine only evaluates conditions; this service parses the JSON
action array on Workflow.actions and dispatches each entry against the
relevant repository.
Action catalog: change_priority, change_status, assign_agent,
set_department, add_tag, remove_tag, add_note, insert_canned_reply.
{{field}} placeholders in canned replies are interpolated via
WorkflowEngine.interpolateVariables.
One failing action does not halt the others — mirrors the NestJS
reference. Unknown action types warn-log and skip.
Follow-up PR will add the WorkflowRunner (loads matching workflows,
evaluates, writes WorkflowLog) and the event listener that bridges
TicketEvent into processEvent.
This was referenced Apr 24, 2026
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
Ports the NestJS
workflow-executor.service.tsto Spring. The existingWorkflowEngineonly evaluates conditions — this service parses the JSON action array onWorkflow.actionsand dispatches each entry against the relevant repository.Action catalog:
change_priority,change_status,assign_agent,set_department,add_tag,remove_tag,add_note,insert_canned_reply.{{field}}placeholders in canned replies are interpolated viaWorkflowEngine.interpolateVariablesScope
This PR is executor only. Follow-up PRs:
WorkflowRunner(loads matching workflows for a trigger event, evaluates conditions, writesWorkflowLog)TicketEventintoprocessEventSplitting keeps the diff reviewable and lets each piece land independently.
Test plan