0

I am using the jBPM Business Central to create DMN rules for my project. In the DMN rule, I am invoking an external java function to perform certain actions. Once the DMN is modeled in Business central, I download it and include it to my project resources and execute the DMN with the drools DMN engine.

Here is decision that invokes the java functionenter image description here

And the Business central validation errorenter image description here

Is there any way to include the dependency for the java function in Business central? Because of this build error, I couldn't create tests for the DMN in business central. Can someone help me?

tarilabs
  • 2,178
  • 2
  • 15
  • 23
Gnanavel
  • 21
  • 3

1 Answers1

0

You can use your project's Settings page to add the maven dependency:

project Settings dependency

Make sure you have the dependency installed first in Business Central maven repository.

For instance you can navigate to Admin (upper right clog icon) > Artifacts to upload manually your dependency:

enter image description here

If your project worked anyway using Drools DMN engine APIs managing correctly the dependency in the Maven pom.xml of your local project, and you were only looking to have the error cleared while modelling on Business Central, this should solve your issue. However in this case you might want to consider using the Kogito DMN editor, if the actual project is not meant to be built/run with Business Central.

tarilabs
  • 2,178
  • 2
  • 15
  • 23
  • Still I am seeing the same error in business-central. I download it as maven project from business-central and tried to build the project in my machine. I received the same error during maven build. I also noticed an INFO log which states **Artifact not fetched from maven: org.example:actions:0.0.2-SNAPSHOT. To enable the KieScanner you need kie-ci on the classpath**. I also considered using Kogito DMN editor but there is no support for included models yet :( – Gnanavel May 30 '20 at 05:42
  • @Gnanavel thank you for reporting; that helped us identify a bug (DROOLS-5391) which will be fixed in the next release. The problem is when the static java function has a parameter type coming from a dependency. In the meantime, you can try to workaround by having a project-local class instead of `..model.Batch` or a project-local static function which proxy the real call but doesn't have as a parameter type a class coming from a dependency. The other considerations in the answer holds anyway; don't hesitate to contact us on the drools-usage forum and accept this answer if it clarifies. Thanks – tarilabs May 31 '20 at 10:27