|
Re: Extending the BPMN Metamodel [message #1111221 is a reply to message #1110967] |
Wed, 18 September 2013 00:23 |
|
Hi Markus,
I think I've had this conversation before but here we go again ...
First: why do you need to extend the BPMN2 metamodel itself? Does your particular usecase not allow for extension elements as defined in the BPMN 2.0 specification?
Second: the BPMN2 metamodel project is available on eclipse git, here: http://git.eclipse.org/c/bpmn2/
You will want to use the "master" branch, which is compatible with the BPMN2 Modeler.
Bob
|
|
|
|
|
Re: Extending the BPMN Metamodel [message #1112373 is a reply to message #1112203] |
Thu, 19 September 2013 14:03 |
|
Yes, "master" is the correct branch for Kepler development, "juno" is for, well, Juno...
I was using a "develop" branch at one point, but since I'm the only one doing any work on this project I decided to skip the extra step.
I'm assuming you found the tutorial screencast and you're trying to follow with the video. Please let me know if you are you having problems with this.
You said "everything has errors in it" - can you be a bit more specific? What kinds of errors and which "everything" are you talking about?
Bob
|
|
|
|
Re: Extending the BPMN Metamodel [message #1228221 is a reply to message #1227986] |
Mon, 06 January 2014 17:53 |
|
Hi Markus,
All you really need are the bpmn2 model plugins (org.eclipse.bpmn2, org.eclipse.bpmn2.edit and org.eclipse.bpmn2.editor) and the modeler Core and UI plugins (org.eclipse.bpmn2.modeler.core and org.eclipse.bpmn2.modeler.ui)
By "I want to test the Editor" I assume you mean you want to be able to debug the code? Everything is available from eclipse Git, just clone the bpmn2-modeler repository like this:
git clone http://git.eclipse.org/gitroot/www.eclipse.org/bpmn2-modeler.git
then, assuming you already have EGit installed in your eclipse workbench, add the local repository to your EGit Repositories view and Import them. I think this is covered in the first part of the video tutorial.
Let me know if you still have questions.
Cheers,
Bob
|
|
|
|
|
Re: Extending the BPMN Metamodel [message #1228250 is a reply to message #1228243] |
Mon, 06 January 2014 19:31 |
|
Hi Markus,
No worries - there's plenty of help available for getting started with debugging eclipse plugins
I assume you have all of the plugins imported into your workspace. If not, open the Git Repositories view in your workbench, right-click the "Working Directory" node and then "Import Projects..." This will open the import wizard - just accept all of the defaults and finish the wizard.
Next open the Debug perspective (main menu Window -> Open Perspective -> Debug) and create a new Debug Configuration (main menu Run -> Debug Configurations...) and give it a name (like "BPMN2 Modeler" or something) then make sure you have the following VM arguments set (in the "(x)= Arguments" tab):
-Xms40m -Xmx512m -XX:MaxPermSize=512m
Then just set a breakpoint somewhere in the code (BPMN2Editor.setInput() is a good place to start, depending on what you want to do) and let 'er rip!
It would help if I had a better idea of what, exactly, you're trying to do or test or build...
Bob
|
|
|
|
Re: Extending the BPMN Metamodel [message #1228263 is a reply to message #1228254] |
Mon, 06 January 2014 20:11 |
|
Hmm, I think I asked this once before, but: is there a reason why you need to modify the bpmn2 metamodel classes? Is it possible to do what you want by simply extending the model (either by defining your own namespace, or by using the <extensionElements> mechanism of BPMN2)? In other words, if you wanted to add a new attribute called "required_attribute" to a Task for instance, your XML could look something like this:
<bpmn2:task ns1:required_attribute="some stuff" id="Task_1" name="my task"/>
if you simply defined "required_attribute" within the namespace "ns1". Alternatively it could look like this:
<bpmn2:task id="Task_1" name="my task">
<bpmn2:extensionElements>
<ns1:required_attribute value="some stuff"/>
</bpmn2:extensionElements>
</bpmn2:task>
if you wanted to use the BPMN2 extension mechanism.
Assuming you can't do either of these, it should be enough to just import the bpmn2 metamodel project into your workspace, hack it up as needed, and then add it to your debug configuration (if you used the default configuration, all workspace plugins should already be enabled for debugging).
|
|
|
|
Re: Extending the BPMN Metamodel [message #1228325 is a reply to message #1228266] |
Tue, 07 January 2014 00:28 |
|
I usually build the project from the command-line (a git bash will do fine) like this:
mvn clean install -P platform-luna
You can also use the "platform-kepler" target, but the generated artifacts will be the same because there are no differences in the two versions of eclipse as far as the BPMN2 Modeler is concerned.
You will have to modify the pom.xml to grab your bpmn2 metamodel jars instead of the ones from the bpmn2 update site. The bpmn2 metamodel is built simply with:
mvn clean install
|
|
|
Re: Extending the BPMN Metamodel [message #1228601 is a reply to message #1110967] |
Tue, 07 January 2014 15:38 |
Markus Kuhn Messages: 11 Registered: September 2013 |
Junior Member |
|
|
Hi Bob,
in the last 8 hours i've been trying to do the mvn clean install on the bpmn2 metamodel. I want to get the jar. I've tried mvn clean install, mvn package and some other combinations. I also tried to edit the pom. I updated the pluginRepository but nothing seems to work. Maybe you can help me. This is the Error:
[ERROR] Failed to execute goal org.eclipse.cbi.maven.plugins:eclipse-jarsigner-plugin:1.0.1:sign (sign) on project org.eclipse.bpmn2: Could not sign artifact org.eclipse.bpmn2:org.eclipse.bpmn2:eclipse-plugin:0.7.0-SNAPSHOT: Connection to http://build.eclipse.org:31338 refused: Connection timed out: connect -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :org.eclipse.bpmn2
Another question popped up. You said i only need these 5 packages for the modeler. I think the others are for the process engine and so forth. Do i have to delete the other ones out of the workspace and the pom or is that a problem?
[Updated on: Tue, 07 January 2014 17:12] Report message to a moderator
|
|
|
Re: Extending the BPMN Metamodel [message #1228657 is a reply to message #1228601] |
Tue, 07 January 2014 18:28 |
|
Hi Markus,
From the error message, it looks like maven is trying to "sign" the plugins. This can only be done on an eclipse machine because they own the certificates. To get around this, simply remove all of the crap that has to do with signing from the root pom.xml. So, that means this stuff:
...
<pluginRepositories>
<pluginRepository>
<!-- need maven-findbugs-2.3.2-SNAPSHOT, see http://jira.codehaus.org/browse/MFINDBUGS-122
remove this when this version is released -->
<id>codehaus.snapshots</id>
<url>http://snapshots.repository.codehaus.org/</url>
</pluginRepository>
<!-- get rid of this -->
<pluginRepository>
<!-- needed for plugin signing -->
<id>m2e-cbi</id>
<url>http://download.eclipse.org/technology/m2e/maven/</url>
</pluginRepository>
<!-- to here -->
</pluginRepositories>
...
<!-- and get rid of this plugin -->
<plugin>
<groupId>org.eclipse.cbi.maven.plugins</groupId>
<artifactId>eclipse-jarsigner-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>sign</id>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
That should do it.
As far as the additional plugins are concerned, you could delete them, but then you'd have to fix up all of the feature.xml files and possibly other stuff to get it to build. I would just leave them in there - it certainly doesn't hurt.
Bob
|
|
|
|
Re: Extending the BPMN Metamodel [message #1228993 is a reply to message #1228885] |
Wed, 08 January 2014 13:51 |
|
Hmm, never saw that one before
Make sure your Debug Configuration has "all workspace and enabled target plug-ins" selected in the "Plug-ins" tab.
Also make sure your installed JRE is at least Java 1.6 or higher.
Maybe this discussion on Stack Overflow will help.
Also, try a google search for "org.osgi.framework.BundleException: The activator x for bundle y is invalid"
Just an afterthought: you do know that you don't have to build the plugins (with maven) each time you make a change to your sources, right? Just launch from your debug workbench...
[Updated on: Wed, 08 January 2014 14:00] Report message to a moderator
|
|
|
|
Re: Extending the BPMN Metamodel [message #1232371 is a reply to message #1231866] |
Thu, 16 January 2014 19:47 |
|
Hey Markus,
Graphiti is a lot to try to understand in a couple of hours. Basically, everything is done with "Features" which are invoked by the Graphiti framework in response to some user action. These Features are contained in "Feature Containers", which are provided by the editor's "Feature Provider" when the framework asks for them. The BPMN2 editor's Feature Provider class is called BPMNFeatureProvider, and that's probably a good place to start in trying to understand how the Features are selected.
Here's a brief explanation of the types of Features and their functions:
CreateFeature - creates a "Business Object" that represents the Model piece of the MVC pattern. In the case of the BPMN2 Modeler, this would be one of the BPMN2 model objects. The CreateFeature is responsible for creating the correct Model object, initializing it, hooking it in to the rest of the BPMN2 document, etc. and then adding the graphical representation (if applicable) for the Model. This brings us to...
AddFeature - creates Graphiti visual container objects known as "PictogramElements" (the subclasses Shape, ContainerShape, Connection, Anchor, etc.) and their graphical representations, or "GraphicsAlgorithm" (Rectangles, Ellipses, PolyLines, etc.) PictogramElements (or PE's for short) are also responsible for maintaining the linking information to one or more Business Objects. PE's are tree nodes and may themselves have child PE's allowing for a visual containment hierarchy (boxes within boxes within...etc.)
MoveFeature - responsible for moving the GraphicsAlgorithms (GA's for short) and updating the model to reflect the new coordinates.
ResizeFeature - responsible for changing the size of the GA, and updating the model.
CreateConnectionFeature - same as CreateFeature, but for Connections.
and a whole bunch of other features...
A good place to start in the BPMN2 editor are the following base classes, most of these are abstract so use "F4" (Show Class Hierarchy) liberally in your development workbench
AbstractBpmn2CreateFeature
AbstractBpmn2CreateConnectionFeature
AbstractBpmn2AddFeature
and so on. I've found that the easiest way for me to find stuff is to use the Java Type Browser and then use wildcard searches, for example *Add*Feature or *Feature*Container. In the Java Perspective main menu, click Navigate -> Open Type, or use the keyboard shortcut CTL+T to open the Type Browser.
HTH,
Bob
|
|
|
Powered by
FUDForum. Page generated in 0.03907 seconds