简体   繁体   English

如何在 jBPM 中的自定义工作项处理程序上使用在业务中心 ui 中创建的数据 Object?

[英]How to use a Data Object created in business central ui on a custom Work Item Handler in jBPM?

I am following the steps on the tutorial from jBPM documentation to create a business application.我正在按照jBPM 文档中的教程中的步骤来创建业务应用程序。

The project is made of the structure:该项目由以下结构组成:

  1. The KJAR where is the business assets KJAR 业务资产在哪里
  2. The service where the project will be running项目将运行的服务
  3. The model where data structures will be implemented将实现数据结构的 model

I have implemented a custom Work Item Handler in the service project, and a question came to my mind: What if I need to reference a Data Object created in business central (via UI) and use this class in the custom work item handler to process it and return to the next tasks?我已经在服务项目中实现了一个自定义工作项处理程序,我想到了一个问题:如果我需要引用在业务中心(通过 UI)中创建的数据 Object 并在自定义工作项处理程序中使用这个 class 来处理怎么办?它并返回下一个任务?

What I have tried was to add the dependency of the KJAR project on service project pom and it worked fine.我尝试的是在服务项目 pom 上添加 KJAR 项目的依赖关系,它运行良好。 But I haven't seen in the documentation nothing related to a solution using this approach.但是我没有在文档中看到与使用这种方法的解决方案相关的任何内容。

First, does it makes sense?首先,这有意义吗? Second how could I "link" assets created in KJAR project inside the service project?其次,我如何在服务项目中“链接”在 KJAR 项目中创建的资产?

I haven't been able to find the documentation either.我也找不到文档。

However the kjar seems to have many of the properties of a java jar.然而,kjar 似乎具有 java jar 的许多属性。 I've successfully managed to define objects in the business central UI, and after uploading them to nexus repository, it is possible to add a standard maven dependency on the jar.我已经成功地在业务中心 UI 中定义了对象,并且在将它们上传到 nexus 存储库之后,可以在 jar 上添加标准的 maven 依赖项。

This way, I was able to use the model defined using the business central UI like standard java objects (if you look inside the jar, you can see some familiar java objects as well as the rules definition). This way, I was able to use the model defined using the business central UI like standard java objects (if you look inside the jar, you can see some familiar java objects as well as the rules definition).

It seems like you were able to achieve the same thing so I am not sure what exactly you are asking:)似乎您能够实现相同的目标,所以我不确定您到底在问什么:)

If by "link" you mean import into the project then you can do it whatever way you import other dependencies - one way is to add them to the pom.xml - which you seem to have done already.如果通过“链接”您的意思是导入到项目中,那么您可以以任何方式导入其他依赖项 - 一种方法是将它们添加到 pom.xml - 您似乎已经这样做了。 You can get the package and name in the settings section of the business central ui.您可以在业务中心 ui 的设置部分获取 package 和名称。

If you have your own repository (nexus for example) you can manually upload it there using mvn deploy command.如果您有自己的存储库(例如 nexus),您可以使用 mvn deploy 命令手动将其上传到那里。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM