Bug 1033104 - Data Modeler annotations not on classpath when roundtripping to Eclipse
Data Modeler annotations not on classpath when roundtripping to Eclipse
Status: CLOSED CURRENTRELEASE
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: Eclipse Tooling (Show other bugs)
6.0.0
x86_64 Linux
medium Severity medium
: ---
: 6.0.2
Assigned To: Kris Verlaenen
Tomas Schlosser
:
Depends On: 1028904
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-21 09:47 EST by Matt Depue
Modified: 2014-10-26 16:39 EDT (History)
7 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Matt Depue 2013-11-21 09:47:10 EST
Description of problem:
When the user creates the initial data model in the modeler (web-ui), the cloned project in Eclipse does not have the libraries containing the org.kie.workbench.common.services.datamodeller annotations.


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


Steps to Reproduce:
1.  Create new project in business-central
2.  Add new object via data modeler
3.  Save
4.  Clone repository to be consumed by Eclipse/JBDS
5.  Import Project

Actual results:
Compiler Errors exist on classes created by the data model as the pom has no reference to the libraries containing the data modeller annotations.


Expected results:
Project should be available without compiler errors.


Additional info:
Entered as high as PM said he wanted to take a look.
Comment 2 Walter Medvedeo 2013-11-22 04:52:26 EST
With reference to the project dependencies, I believe that if the user wants to manage/compile/run/etc the project outside the kie-wb/drools-wb (using eclipse, IntellJIdea, etc) it's up to the user to adjust the needed dependencies.

Because depending of what he wants do, he will need different dependencies. E.g. If he clones the project and wants to run a "TestScenario" created with the UI, probably he will need a set of dependencies, if he wants to run a process probably a different set of dependencies will be needed, etc.

To set "by default" dependencies in the pom.xml (when the project is created in kie-wb/drools-wb) implies to modify how the project is created.
Also, in case we add such by default dependencies it needs to be resolved how to know the correct version number (snaphsot/final ?) to use for the by default dependencies.

If this feature is needed please ask Mark Proctor or Edson Tirelli.

Then we need to provide a list of all the GAVs that should be set as default dependencies when the project is created, and a criteria to establish the version number for these GAVs.
Comment 3 Walter Medvedeo 2013-11-22 04:59:50 EST
One last comment, in order to have all model related annotations in the same package, the Label, and Description annotations were re factored to the package "org.kie.api.definition.type". There we have all drools annotations managed by the data modeller i.e @Role, @Event and @Postion, and data modeller specific annotations i.e. @Description/@Label.

The GAV for the maven artefact is:

<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)

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 Edson Tirelli 2013-11-22 10:30:13 EST
Walter, I will check with Mark, but I think it would be good to add the dependency to kie-api into the kjar pom if the datamodeler is used to create classes.

One of the design goals of kjars is that they should be self contained, so seems correct to have any dependencies we introduce listed in the pom file.
Comment 5 Mark Proctor 2013-11-22 11:29:09 EST
If annotations are used, from a jar, we should probably detect and inform user the need to addd the dep (possibly offering to do it for them). I don't think we should invisibly inject it. The other option is to not add annotations, if they are not needed. So if no labels etc are specific, don't add the annotation. That would require a radio button (thus more configuration) for the rules annotations, such as @Position.
Comment 6 Kris Verlaenen 2013-11-26 10:23:35 EST
As discussed on PM call, the risk of introducing this now seems too large, so postponing this until later.
Comment 7 Kris Verlaenen 2013-12-09 07:08:18 EST
Lowering priority based on devel_ack-
Comment 9 Tomas Schlosser 2014-06-23 02:23:50 EDT
This issue has been resolved by annotation refactoring. It works in current release (BRMS/BPMS 6.0.2).
Comment 10 Trilokee Gupta 2014-06-30 14:49:57 EDT
I am facing same issue while building the BPM Project outside as part of the CI process, when will the release 6.0.2 be out for GA and production usage? 

Currently I am on 6.0.1.

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