0

我正在开发一个 Drools 项目,该项目需要暂停规则流(写入数据库)并恢复规则流(从数据库中读取)。我知道 Drools 提供了开箱即用的 JPA/事务样式持久性,一个我无法让它运行,第二个它以序列化形式持续存在,对我的用例不是很有用。

我想出的是让我的系统记住规则流暂停的节点(可以完成),将节点ID和工作事实保存在数据库中(可以完成)。然后在恢复规则流时检索这些持久数据,将它们注入知识会话(可以完成)并从暂停的节点继续规则流(无法完成)。但我还没有找到从特定节点开始处理的方法。

请帮忙,谢谢。

4

1 回答 1

0

I'm having a similar issue (if I understood your question), as far as I know, drools allows only 1 start node per ruleflow, so the only chance I see to start a ruleflow at an arbitrary node is to start right into a gateway (diverge) node, the gateway node should be connected to every node in the ruleflow (or as much as you neeed), the rules defined for it should allow you to start the workflow at any node. Sure this work arround is not pretty but might be enough.

By the way, If you find a better solution please let me know.

Fuanka

于 2011-01-31T15:49:46.730 回答