Bug 1028904

Summary: Classes generated from Data modeler won't compile outside business-central
Product: [Retired] JBoss BRMS Platform 6 Reporter: Anthony Patricio <apatrici>
Component: ConfigurationAssignee: Walter Medvedeo <wmedvede>
Status: CLOSED NOTABUG QA Contact: Marek Baluch <mbaluch>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0.0CC: althomas, etirelli, jbride, kverlaen, lpetrovi, pzapataf, rrajasek, stauil, wmedvede
Target Milestone: ER5   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-11 15:23:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1033104    

Description Anthony Patricio 2013-11-11 07:59:34 UTC
Description of problem:
Generated classes can't be used outside business-central because of incomplete pom.

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


How reproducible:
Always

Steps to Reproduce:
1- create an object using data modeler
2- use git pull to get it in eclipse or whatever IDE
3- compilation will fail because of
@org.kie.workbench.common.services.datamodeller.annotations.Label(value = "XXX")
@org.kie.api.definition.type.Position(value = 0)

Should the project pom declare org.kie dependencies?

Actual results:


Expected results:


Additional info:

Comment 3 Walter Medvedeo 2013-11-11 09:34:30 UTC
As described above, data modeller generated .java files references some annotations that belongs to the kie world.

If you want to compile the generated .java files outside the business central you need to add a dependency to the following maven artifact: kie-api-6.1.0-SNAPSHOT.jar:

<groupId>org.kie</groupId>
<artifactId>kie-api</artifactId>
<version>6.1.0-SNAPSHOT</version>

note: the version number is orientative. (users that use the GA release in the future, probably should use  6.0.0.Final)

One last comment, in order to have all model annotations in the same package, the Label, and Description annotations were re factored to the package "org.kie.api.definition.type".

So take into account that previous generated testing models should be re factored.

from:
@org.kie.workbench.common.services.datamodeller.annotations.Label
@org.kie.workbench.common.services.datamodeller.annotations.Description

to:
@org.kie.api.definition.type.Label
@org.kie.api.definition.type.Description

Comment 4 Marek Baluch 2013-12-09 17:17:20 UTC
Hi Walter,

I can confirm that adding the dependency helps but it's also required to add the repository from which it can be downloaded.

Would you mind explaining why isn't the dependency already defined in the pom.xml file? At least we will need to document the steps required to do the compilation.

Thanks!

Regards
Marek

Comment 5 Edson Tirelli 2013-12-10 19:07:40 UTC
Marek,

We discussed adding the dependency automatically into the POM, but we don't know at this point the impact this will cause in deployments inside containers, as well as the risk of causing dependency clashes.

For 6.0.0, our suggestion is to keep as is and document the need of the kie-api dependency (developers will probably have this in their development environment anyway). For 6.1, we will have the proper time to understand the impact of automatically adding this dependency.

So yes, it requires documentation.

Comment 6 Lukáš Petrovický 2013-12-11 07:59:58 UTC
I am leaving this as ASSIGNED, to be resolved in future versions.

Comment 7 Kris Verlaenen 2013-12-11 09:13:00 UTC
It is documented how to add the jBPM library in Eclipse to a project you imported from workbench (to add all required dependencies) here:
http://docs.jboss.org/jbpm/v6.0/userguide/jBPMEclipseJBPM.html#d0e12778

A similar approach could be used in other IDEs.

Comment 8 Samuel Tauil 2014-02-18 23:15:48 UTC
I had same issue using GA version.

And what if we use <scope>compile</scope> of this specific dependency into pom.xml ?

Comment 9 Walter Medvedeo 2014-11-11 15:23:48 UTC
It was defined that when a user is about to work with a project that uses references to workbench classes, those dependencies should be set according to the documentation. See comments above.