代码之家  ›  专栏  ›  技术社区  ›  Nich Overend

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

  •  0
  • Nich Overend  · 技术社区  · 9 年前

    我最近在jBPM 6上迈出了第一步,并通过本地安装成功地完成了任务。

    然后,我尝试使用Docker为我的演示带来相同的东西,除了在一个领域之外,都获得了成功。

    安装jBPM 6.2.0.Final的本地版本时,4个自定义工作项处理程序将自动添加到工作台。日志、WebService、Rest和Service Task,这些都是我在流程中使用过的。

    安装jbpm工作台:6.2.0.Final或jbpm工作台中的showcase:6.2.0.Final时,这些自定义工作项现在会出现,我无法确定将CustomWorkItemHandlers复制到何处。conf和drools.session。conf,以便获取它们(或者如果这足够,或者如果需要.wid文件,等等)。

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

    如果有人有任何见解,我将非常感激。谢谢

    1 回复  |  直到 9 年前
        1
  •  1
  •   Nich Overend    9 年前

    显然,我很愚蠢,并且忘记了在这条路上的某个地方,我实际上编辑了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图像,它可以预先添加到存储库中,也可以在之后添加,这可能是通过自动化实现的。