Bug 1033104 - Data Modeler annotations not on classpath when roundtripping to Eclipse
Summary: Data Modeler annotations not on classpath when roundtripping to Eclipse
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Eclipse Tooling
Version: 6.0.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: 6.0.2
Assignee: Kris Verlaenen
QA Contact: Tomas Schlosser
URL:
Whiteboard:
Depends On: 1028904
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-21 14:47 UTC by Matt Depue
Modified: 2014-10-26 20:39 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-23 06:23:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Matt Depue 2013-11-21 14:47:10 UTC
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 09:52:26 UTC
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 09:59:50 UTC
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 15:30:13 UTC
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 16:29:09 UTC
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 15:23:35 UTC
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 12:08:18 UTC
Lowering priority based on devel_ack-

Comment 9 Tomas Schlosser 2014-06-23 06:23:50 UTC
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 18:49:57 UTC
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.