dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[Discuss][Master] Refractor the WorkflowExecuteRunnable

Open ruanwenjun opened this issue 3 years ago • 9 comments

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. image

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

ruanwenjun avatar Jun 16 '22 04:06 ruanwenjun

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

github-actions[bot] avatar Jun 16 '22 04:06 github-actions[bot]

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.

ruanwenjun avatar Jul 10 '22 15:07 ruanwenjun

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.

github-actions[bot] avatar Aug 10 '22 00:08 github-actions[bot]

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.

github-actions[bot] avatar Dec 07 '23 00:12 github-actions[bot]

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.

github-actions[bot] avatar Dec 27 '23 00:12 github-actions[bot]

No stale

EricGao888 avatar Dec 27 '23 02:12 EricGao888

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.

EricGao888 avatar Dec 27 '23 02:12 EricGao888

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.

ruanwenjun avatar Dec 27 '23 02:12 ruanwenjun

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.

github-actions[bot] avatar Feb 14 '24 00:02 github-actions[bot]

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.

github-actions[bot] avatar Mar 16 '24 00:03 github-actions[bot]

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.

github-actions[bot] avatar Mar 24 '24 00:03 github-actions[bot]