Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
作为主题,类和委托表达有什么区别?哪个更好用?
服务任务的类属性是实现的类的 FQN JavaDelegate。当使用它时,Flowable 将实例化该类。
JavaDelegate
委托表达式是解析实现的 bean 的表达式JavaDelegate。这意味着您可以在其中定义您的任何 bean,并且您可以控制它的实例化。
在我看来,最好使用委托表达式。原因是使用委托表达式可以更改不同版本之间的实现,而无需更改 BPMN 模型。
更详细的解释可以在 Flowable 文档的Java 服务任务部分找到。