问题标签 [drools-flow]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
842 浏览

jms - 当我收到 JMS 消息时,如何继续 Drools Flow 流程?

我有一个非常简单的流程,一个 JMS 消息启动一个接收对象列表的进程。foreach 遍历此列表并将 JMS 消息发送到组件以处理列表中的对象。该组件需要将完成通知发送回流程,以便它可以继续。有谁知道如何实现这一目标?

谢谢。

0 投票
1 回答
3897 浏览

web-applications - 在 Web 应用程序中使用 Drools Expert/Flow 的最佳实践

我目前正在自学 Drools Expert/Flow 以及 GWT。我想使用 Drools Flow 作为事件/命令总线和业务规则引擎来实现应用程序不同部分之间的松散耦合。

到目前为止,我已经从我的测试用例中获得了 Expert 和 Flow 的工作,但我很难弄清楚如何在 Web 容器中最好地实现 Flows。

我是否应该将所有脚手架放入无状态会话 EJB 中,让每个请求从头开始设置所有内容,然后运行流程/规则?这对我来说似乎是一种资源浪费。我可以改为存储单个知识会话并在 Web 请求之间共享该会话,同时访问它,该场景是否可以扩展并且它是线程安全的(我的猜测是否定的)?汇集知识会议是个好主意吗?

我要问的基本上是上述是否有任何最佳实践?文档和示例虽然在其他方面非常好,但在这些特定点上并不清楚。

我确实读过一些关于 Drools Grid 的东西,不确定这是否能解决我的问题,而且这似乎正在开发中。如果我的问题不清楚,请直说。

BR马格努斯

0 投票
5 回答
18172 浏览

junit - 使用junit进行流口水测试

用junit测试drools规则的最佳实践是什么?

到目前为止,我们使用 junit 和 dbunit 来测试规则。我们有放入 hsqldb 的样本数据。我们有几个规则包,到项目结束时,很难做出好的测试输入来测试某些规则而不触发其他规则。

所以确切的问题是,我如何将 junit 中的测试限制为一个或多个特定的测试规则?

0 投票
1 回答
525 浏览

java - JBPM 到 Drools 流程 - 是否有文档化的迁移路径?

我目前正在使用一个相当旧版本的 JBPM 进行工作流处理,作为一个更大项目的一部分。我正在研究迁移到 Drools Flow 库以替代 JBPM 的可能性。

我找到了很多关于从 OSWorkflow 迁移到 Drools 的文档,但是找不到从 JBPM 迁移到 Drools Flow 的任何内容。是否有任何类似的自动工具用于从 JBPM 迁移?如果没有,是否有任何文档描述手动迁移所涉及的步骤?

0 投票
1 回答
439 浏览

drools - Drools Flow 上的 Qn:如何指定从特定节点开始的规则流?

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

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

请帮忙,谢谢。

0 投票
3 回答
13807 浏览

java - Decision trees and rule engines (Drools)

In the application that I'm working on right now, I need to periodically check eligibility of tens of thousands of objects for some kind of a service. The decision diagram itself is in the following form, just way larger: Decision diagram

In each of the end nodes (circles), I need to run an action (change an object's field, log information etc). I tried using Drool Expert framework, but in that case I'd need to write a long rule for every path in the diagram leading to an end node. Drools Flow doesn't seem to be built for such a use case either - I take an object and then, depending on the decisions along the way, I end up in one of the end nodes; and then again for another object. Or is it? Could you give me some examples/links to such solutions?

UPDATE:

Drools Flow calls might look like this:

That is: I'd take an Application object, start a new process for it, when the process is finished (the final, action node would modify the application somehow), I'd remove the object from working memory and repeat the process for a new App object. What do you think about this solution?

SOLUTION:
I've ended up using Drools Flow and it has been working quite fine. My decision process isn't as straightforward as Drools Expert asks for and depending on where in the decision tree the process is it needs to load lists of objects from the database, transform them, make decisions, log everything etc. I use a Process object that is passed to the process as a parameter and stores all my global variables (for the process) and some convenience methods that are repeated at different points in the tree (as writing Java code in the Script Task nodes isn't very convenient itself). I also ended up using Java to make decisions (and not mvel or rules) - it's faster and I'd say easier to control. All objects that I work with are passed as parameters and used as normal Java variables in the code.

0 投票
2 回答
2144 浏览

drools - Drools决策表规则不使用更新值

我正在使用 Drools 规则服务器作为服务。我们正在使用决策表

我在 Drools 决策表中有 2 条简单的规则。第一条规则检查一个值 ( movie=="Ghostbusters"),然后设置该对象的调用setActor("Bill Murray")

第二条规则检查 Actor 是什么。我在第二条规则中有 2 行。 if Actor == "Bill Murray"它调用 的动作setRating(10)。而如果actor == "unknown" setRating(8)

第一条规则按预期触发,我可以 printLngetActor显示它是“Bill Murray”,但在第二条规则中,actor == "unknown"动作总是触发。即使在我打印的那一行中,getActor它也会打印“Bill Murray”,但它使用的是“未知”规则。

当对象从规则中返回时,它在规则中Actor = Bill Murray设置的所有值都是“正确的”,但是在评估规则时,规则似乎总是使用我在规则之外创建的原始对象。

有什么我必须添加到决策表或调用drools 规则服务器来“更新”规则表之间的对象吗?

0 投票
1 回答
1273 浏览

java - 如何将 Drools 流程和规则与我的 Web 应用程序集成

对不起我的语言,我的问题是如何将 Drools 技术集成到我的网络应用程序中,请一步一步告诉我,因为我是一名学习者,所以请告诉我。我已经阅读了这个文档(http://downloads.jboss.com /drools/docs/5.1.1.34858.FINAL/drools-flow/html/ch14)但我需要更清晰,这意味着完整的架构,或者请将您的任何带有 Drools 技术的示例网络应用程序作为 ZIP 文件或战争文件发送给我。我将解压缩然后复制到我的 Eclipse 工作区。请我明天向我的项目负责人报告任何带有流口水的示例网络应用程序。

谢谢,阿比。

0 投票
1 回答
3616 浏览

drools-flow - 如何通过我的 Web 应用程序部署 Drools Flow 和规则

我刚刚开始了我的新项目。我的项目经理说 Drools 是新技术,我们将包括 drools 流程和规则,并将我们的 Web 应用程序与之集成。

如何将 Drools 流程和规则集成到 Web 应用程序中?

0 投票
1 回答
275 浏览

drools - 定时学习 Drools

我正在写一篇关于 Drools 的论文。但是我对学习 Drools 的工作负载一无所知。有人可以在 Expert、Flow、Fusion 和 Guvnor 上给出一个从 1 到 10 的数字吗?我只需要在一个简单的 Java 示例上测试该技术。谢谢,埃尔斯