更改 Drools Flow 中的地图参数
我是 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在动作脚本中,您可以执行以下操作:
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