在 jBPM 6 docker 图像中获取自定义工作项处理程序

Getting custom workitem handlers into jBPM 6 docker images

我最近开始使用 jBPM 6,并设法通过本地安装 运行 很好地获得了东西。

然后我尝试使用 Docker 带来相同的东西来实现我的演示的可移植性,成功了,除了一个区域。

当安装本地版本的 jBPM 6.2.0.Final 时,4 个自定义工作项处理程序会自动添加到 workbench。我在我的流程中使用的日志、WebService、Rest 和服务任务。

安装 jbpm-workbench:6.2.0.Final 或 jbpm-workbench-showcase:6.2.0.Final 时,这些自定义工作项现在会出现,我无法确定在图像扩展 Docker 文件中复制 CustomWorkItemHandlers.conf 和 drools.session.conf 的位置,以便 git 将它们拾取(或者如果这就足够了,或者是否还需要 .wid 文件,或者什么。

我还应该说,我正在做 Workbench 中的所有事情,到目前为止我根本不需要编写或更改任何 Java 代码,所以我会想让 Docker 版本以完全相同的方式工作。

如果有人有任何见解,我将不胜感激。谢谢!

显然我是愚蠢的,并且忘记了沿线的某个地方,我实际上已经编辑了我通过 workbench 使用的存储库的 WorkDefinitions.wid 文件,并添加了行来制作它喜欢以下内容:

import org.drools.core.process.core.datatype.impl.type.StringDataType;
import org.drools.core.process.core.datatype.impl.type.ObjectDataType;

[
  [
    "name" : "Email",
    "parameters" : [
      "From" : new StringDataType(),
      "To" : new StringDataType(),
      "Subject" : new StringDataType(),
      "Body" : new StringDataType()
    ],
    "displayName" : "Email",
    "icon" : "defaultemailicon.gif"
  ],

  [
    "name" : "Log",
    "parameters" : [
      "Message" : new StringDataType()
    ],
    "displayName" : "Log",
    "icon" : "defaultlogicon.gif"
  ],

  [
    "name" : "WebService",
    "parameters" : [
        "Url" : new StringDataType(),
         "Namespace" : new StringDataType(),
         "Interface" : new StringDataType(),
         "Operation" : new StringDataType(),
         "Parameter" : new StringDataType(),
         "Endpoint" : new StringDataType(),
         "Mode" : new StringDataType()
    ],
    "results" : [
        "Result" : new ObjectDataType(),
    ],
    "displayName" : "WS",
    "icon" : "defaultservicenodeicon.png"
  ],

  [
    "name" : "Rest",
    "parameters" : [
        "Url" : new StringDataType(),
        "Method" : new StringDataType(),
        "ConnectTimeout" : new StringDataType(),
        "ReadTimeout" : new StringDataType(),
        "Username" : new StringDataType(),
        "Password" : new StringDataType()
    ],
    "results" : [
        "Result" : new ObjectDataType(),
    ],
    "displayName" : "REST",
    "icon" : "defaultservicenodeicon.png"
  ]

]

我再做一次,就没问题了。很明显,对于 Docker 图像,它可以预先添加到存储库或之后添加,可能是通过自动化。