| Own Extensions for the metamodel & modeler [message #870602] |
Tue, 08 May 2012 18:45  |
Dominik Thalmann Messages: 11 Registered: May 2012 |
Junior Member |
|
|
Hi everyone,
I am currently looking for a way to extend the BPMN 2.0 metamodel. In the OMG specification it says that you can extend the metamodel with XML Scheme-definitions. So I can for example a new task-type that is derived from the task-type.
Is there a way to register the new XML-scheme definition to the bpmn 2.0 modeler to have a new entry in the palette for my new extended task type?
If thats possible, could someone give me some tips on how to do that or has anyone a link to a tutorial? I read a bit on the forums but everything seems to be for the older STP-version when no XML-scheme extension was available? I downloaded the source code for the metamodel and the bpmn 2.0 modeler but am a bit lost now.
Greetings
Dominik
|
|
|
| Re: Own Extensions for the metamodel & modeler [message #870704 is a reply to message #870602] |
Wed, 09 May 2012 08:03   |
|
Hi Dominik, welcome to the forum 
Have you looked at the jbpm target runtime extension plugin? This uses an extension model to augment the bpmn2 model. There are also "Custom Tasks" which can be added to the palette (search for "wid" configuration file handling).
I'm not sure if this is what you're looking for, but it might be a good start.
Cheers!
Bob
|
|
|
|
| Re: Own Extensions for the metamodel & modeler [message #871556 is a reply to message #870968] |
Mon, 14 May 2012 08:03   |
Dominik Thalmann Messages: 11 Registered: May 2012 |
Junior Member |
|
|
Hi,
I have looked up the extension-point mechanism now. I am confident that I can add all the functionality I want for the modeler with the given extension point.
So as I understand it I can use the extension point to add my own Custom Task that will also appear in the palette. Can I also add some functionality like how my custom task will be drawn and how the arrows from and to my custom task will look like?
Another question is how the augmentation of the BPMN 2.0 metamodel works. Can I also do that via the extension point? If so could someone tell me shortly how to do that and how I can combine the new metamodel entity and my custom task?
I am looking forward to some tips and hints. 
I created a plugin for my custom task addition. Here is what the plugin.xml looks like so far:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.bpmn2.modeler.runtime">
<customTask
description="This task represents a risk that can occur in the connected Elements."
featureContainer="bpmn2.modeler.extension.risk.augmentation.CustomTaskFeatureContainer"
id="bpmn2.modeler.extension.risk.augmentation.riskTask"
name="Risk Task"
runtimeId="bpmn2.modeler.extension.risk.augmentation.riskTask"
type="org.eclipse.bpmn2.Task">
</customTask>
</extension>
</plugin>
The CustomTaskFeatureContainer extends from "org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomTaskFeatureContainer"
but is still empty. If I load the plugin the risk Task wont be displayed in the palette. I think I have to implement some Graphity methods now, is that correct? Could someone tell me which functions I would need to implement or is there a resource where I can lookup the neccessary methods? Or is something wrong with my plugin and it actually should display my custom task in the palette yet?
Greetings Dominik
[Updated on: Mon, 14 May 2012 09:19] Report message to a moderator
|
|
|
|
|
|
| Re: Own Extensions for the metamodel & modeler [message #899514 is a reply to message #873113] |
Wed, 01 August 2012 05:13   |
Dominik Thalmann Messages: 11 Registered: May 2012 |
Junior Member |
|
|
Hi,
I didnt have much time in the past but want to continue with my project now. Robert got me started with his help, thanks again for that! I looked up the jbpm target runtime extension. Now there are some things I dont understand yet. I loaded the source code of that extension and it seems as if it has its own metamodel. But it uses the WID-Files to load just some attributes. I am a bit confused if the new custom tasks (email, twitter etc.) are new classes in their own metamodel or if these are just bpmn-conform tasks with additional attributes.
The next thing I would like to know is how the attributes of these custom tasks are set in the BPMN Modeler. In the graphical user interface there is a small button "Configure Work Item" with which you can modify the Attributes. Could someone tell me how this works, if I need to write a Graphiti-Feature for it or if it comes with the modeler and I just have to activate it.
If thats possible I would like to extend BPMN Tasks just with additional Attributes, so that everything is still BPMN conform. Later on I have to write a program, that loads a BPMN diagram and does some checks. Here I need to know if the Task is a specific "Custom Task", so there should be some kind of identification I can use. I hope someone can give me some tips and if the jbpmn extension is maybe exactly what I want (besides the WID-files, I dont need to customize the attributes of the new tasks, I know them already and dont need more in the future).
Thanks in advance,
Dominik
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06982 seconds