dolphinscheduler
dolphinscheduler copied to clipboard
[Discuss][Master] Refractor the WorkflowExecuteRunnable
Search before asking
- [X] I had searched in the issues and found no similar feature requirement.
Description
Right now, we use WorkflowExecuteRunnable to handle the workflow event and task event, this make this class be huge if we need to add a new event, we need to modify this class, it will be hard to add new event.
I have an idea, we can split the workflow event and task event into different event queue, and use different event handler to deal with different event, when we handle a target event, we may need to generate new workflow/task event.

The advantage is that, we can split the event handle logic, and when we need to add a new event type, we only need to add a new event handler.
There is some problem need to deal, the task/workflow's events may need to have order, we may still need to create event queue for each workflow, or use state machine to implement the order.
This is just an open discussion, welcome to discuss.
Use case
No response
Related issues
No response
Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
- In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
- If you haven't received a reply for a long time, you can join our slack and send your question to channel
#troubleshooting
We can use a single WorkflowEventQueue, and for each TaskInstance we can create a TaskEventQueue, all state changed are at the event handler. we can control the event handle at event handler.
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.
No stale
I think we also need to redesign the state machine for task instance and workflow instance. Otherwise the logic will be confusing and easy to result in bugs when state handlers process those events.
I think we also need to redesign the state machine for task instance and workflow instance. Otherwise the logic will be confusing and easy to result in bugs when state handlers process those events.
Yes, I will give a poc design, and poc code, if I am free.
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.