更改 Drools Flow 中的地图参数

发布于 2024-12-22 18:28:18 字数 73 浏览 1 评论 0原文

我是 drools flow 和 Jbpm 5 的初学者。我想在地图中传递一些参数,并且我需要某些脚本任务来更改该参数。我该怎么做?

Am a beginner in drools flow and Jbpm 5. I want to pass in some parameter in map and i need certain script tasks to alter that parameter. How do i do it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

琉璃梦幻 2024-12-29 18:28:18

在动作脚本中,您可以执行以下操作:
kcontext.setVariable("名称", 值);

例如,如果你有一个变量 i:
kcontext.setVariable("i", i + "更改");

请注意,您可能应该将变量定义为流程变量才能执行此操作。单击流程的背景,然后在“属性”视图中编辑“变量”属性以添加具有给定名称和类型的新流程属性。

更多文档请参见:
http://docs.jboss.org/jbpm/v5 .2/userguide/ch05.html#sec.data

克里斯

In an action script you can do something like:
kcontext.setVariable("name", value);

For example, if you have a variable i:
kcontext.setVariable("i", i + "Changed");

Note that you probably should define your variable as a process variable to be able to do this. Click on the background of your process and in the Properties view, edit the "variables" property to add a new process property with a given name and type.

For more documentation, see:
http://docs.jboss.org/jbpm/v5.2/userguide/ch05.html#sec.data

Kris

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文