Sud0x67 commented on issue #17686:
URL: 
https://github.com/apache/dolphinscheduler/issues/17686#issuecomment-3542792510

   Hi @ruanwenjun,
   
   I really appreciate your concern about the cost of understanding the 
code—that’s an important consideration.
   
   The goal of introducing `WorkflowTerminalStateAction` and 
`WorkflowPseudoStateAction` isn’t just to reduce duplication for its own sake, 
but to **embed clearer semantics directly into the class hierarchy**.
   
   With these abstract base classes:
   - Terminal states (e.g., success, failure) are explicitly required to handle 
`WorkflowFinalizeLifecycleEvent`—enforced by the base class.
   - Pseudo-states (e.g., submitted, serial-wait) clearly signal that they 
handle no events at all—again, evident from their type.
   
   This actually **reduces cognitive load**: instead of reading through eight 
nearly identical implementations to infer the pattern, developers can 
immediately grasp the expected behavior just by looking at the inheritance 
structure.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to