Bug 1267510 - Not able to execute rules from guided decision table if we build kjar through mvn command.
Not able to execute rules from guided decision table if we build kjar through...
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Build and Assembly (Show other bugs)
Unspecified Unspecified
high Severity medium
: ER5
: 6.2.0
Assigned To: Petr Široký
Jiri Petrlik
Depends On:
  Show dependency treegraph
Reported: 2015-09-30 04:46 EDT by Abhijit humbe
Modified: 2016-02-25 07:00 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
reproducer (22.77 KB, application/zip)
2015-09-30 04:46 EDT, Abhijit humbe
no flags Details

  None (edit)
Description Abhijit humbe 2015-09-30 04:46:18 EDT
Created attachment 1078565 [details]

Description of problem:
if we build kjar through business central console and try to execute rule through standalone code, it works fine. If we build same kjar through maven command then rule is not executed through same standalone code.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create a new project in Business Central, in this project create guided decision table, and build kjar from console.
2.Execute the rules using the kjar generated by the workbench.(Verify all rules executed)
3.Checkout the project from the Business Central Git Repository and build using maven command.
4. Execute the rule using the KJAR generated by maven.Notice that the Guided rules do not execute.

Actual results:
Rules from guided decision table are not executed if we build kjar through mvn command.

Expected results:
Rules from guided decision table should be executed if we build kjar through mvn command.

Additional info:
Reproducer is attached.
Comment 2 Mario Fusco 2015-10-01 12:47:20 EDT
This is related with (if not a duplicate of) https://bugzilla.redhat.com/show_bug.cgi?id=1209949 so I'm reassigning this to Michael.
Comment 3 Petr Široký 2015-10-08 07:58:01 EDT
As discussed with Mario and Mike, there are missing Drools converter jars in the kie-maven-plugin. I will add those to make the guided dtables (and other similar assets) compile successfully.

There is one more related issue. In some cases we also need to add some dependencies directly to the kjar's pom.xml in case they are needed during Java compile phase (done by maven-compiler-plugin). Few example (there are likely more):

  - when using KIE annotations like @Position or @KBase, the project needs direct dependency on kie-api.

The best way to do this seems to be  to add the deps into the pom, but only with <provided> scope so that we don't leak those dependencies to other projects depending on kjars. Kjars are then used by other kjars or applications which will responsible to provide correct set of dependencies itself.
Comment 4 Petr Široký 2015-10-26 14:13:43 EDT
Finally fixed and merged into master and 6.3.x.

The root cause was hidden in drools-compiler, as some resources (like .gdst) were not treated as regular KIE resources. That would lead to the case where the .gdst wasn't compiled at all. The fix introduces two new KIE resources -- GDST (guided dtable) and SCGD (guided score card). kie-maven-plugin now supports these as well.


Comment 5 Jiri Petrlik 2016-02-25 07:00:33 EST
Verified using BxMS 6.2.1.

Note: It is necessary to add dependency on "drools-workbench-models-guided-dtable" to "pom.xml" in reproducer.

Note You need to log in before you can comment on or make changes to this bug.