Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » Own Extensions for the metamodel & modeler
Own Extensions for the metamodel & modeler [message #870602] Tue, 08 May 2012 22:45 Go to next message
Dominik Thalmann is currently offline 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 12:03 Go to previous messageGo to next message
Robert Brodt is currently offline Robert Brodt
Messages: 613
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Hi Dominik, welcome to the forum Smile

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 #870968 is a reply to message #870704] Thu, 10 May 2012 11:58 Go to previous messageGo to next message
Dominik Thalmann is currently offline Dominik Thalmann
Messages: 11
Registered: May 2012
Junior Member
Hi Robert,

thanks for the quick answer. Smile

I didnt look up the jbpm target runtime extension plugin yet. I am relatively new to the eclipse environment, worked with the .NET languages some years and now have to do these extensions. I am currently working through some eclipse tutorials about plugins and commands. The point is, that I dont know where to start if you tell me to look up the jbpm target runtime extension plugin. I dont know if I have to extend the mentioned plugin or if I have to build my own plugin and have the jbpm as dependency...

Could you maybe help me again and give me a rough overview to what I have to do? A hint for a tutorial or some little example would be awesome too. The same goes for the custom tasks. That really sounds exactly like what I need but I dont know how or where to start.

I hope you guys can help me one more time with it.

Cheers
Dominik
Re: Own Extensions for the metamodel & modeler [message #871556 is a reply to message #870968] Mon, 14 May 2012 12:03 Go to previous messageGo to next message
Dominik Thalmann is currently offline 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. Smile


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 13:19]

Report message to a moderator

Re: Own Extensions for the metamodel & modeler [message #871725 is a reply to message #871556] Mon, 14 May 2012 18:46 Go to previous messageGo to next message
Robert Brodt is currently offline Robert Brodt
Messages: 613
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Hi Dominik,

I realize that this is a lot to bite off if you haven't done much plugin development, so I created a minimal runtime extension plugin in the "develop" branch of the eclipse git repository here:

https://git.eclipse.org/c/bpmn2-modeler/org.eclipse.bpmn2-modeler.git?h=develop

The plugin is in org.eclipse.bpmn2.modeler.runtime.example. Let me know if this isn't enough to get you started.
Re: Own Extensions for the metamodel & modeler [message #873061 is a reply to message #871725] Thu, 17 May 2012 12:36 Go to previous messageGo to next message
Dominik Thalmann is currently offline Dominik Thalmann
Messages: 11
Registered: May 2012
Junior Member
Wow,

thank you very much for the effort Robert! You are a great help to me. I just checked out the example and will look into it now.

Greetings and many thanks

Dominik
Re: Own Extensions for the metamodel & modeler [message #873113 is a reply to message #873061] Thu, 17 May 2012 14:08 Go to previous messageGo to next message
Robert Brodt is currently offline Robert Brodt
Messages: 613
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

You betcha! Smile
Re: Own Extensions for the metamodel & modeler [message #899514 is a reply to message #873113] Wed, 01 August 2012 09:13 Go to previous messageGo to next message
Dominik Thalmann is currently offline 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
icon5.gif  Re: Own Extensions for the metamodel & modeler [message #904422 is a reply to message #899514] Tue, 28 August 2012 12:02 Go to previous messageGo to next message
Pascal Stich is currently offline Pascal Stich
Messages: 2
Registered: August 2012
Junior Member
Hi,
i just found this thread when i was looking if it is possible to create CustomTasks with the BPMN 2.0 Modeler Plugin. So, if i understood it right, then i can create a CustomTask and add it to the palette?

Thanks to Robert for the posted Example-Project. I looked into the project and started it in DevelopingMode of Eclipse. But in the BPMN-Modeler there was no CustomTask added to the palette when I created a little diagram. So, wherefor the 'SampleCustomTaskFeatureContainer' is?

If i want to create CustomTasks, do i have to create them in an own Plugin-Project? And how is this plugin connected to the BPMN Modeler-Plugin? Because there my CustomTasks should be shown in the palette...

(I just worked with the Activiti-Designer and there the CustomTasks got deposited in a jar-File in the UserLibrary. It worked, but the Activiti-Designer doesn´t support all the features I need to do with my CustomTasks) Now I hope the BPMN-Modeler is better to handle in that case...

Thanks for your help,
Pascal
Re: Own Extensions for the metamodel & modeler [message #904629 is a reply to message #904422] Tue, 28 August 2012 21:11 Go to previous messageGo to next message
Robert Brodt is currently offline Robert Brodt
Messages: 613
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Hi Pascal,

Are you sure you selected the "Sample Business Process Engine" for the Target Runtime in the project properties? Something like this:

http://content.screencast.com/users/rbrodt/folders/Jing/media/06ca9a20-41f7-47f5-95bc-88bce472e289/2012-08-28_1509.png

Once you have configured your project to use this Target Runtime, create a new Process using the New BPMN2 File wizard. You should then see two custom tasks in the palette:

http://content.screencast.com/users/rbrodt/folders/Jing/media/0b277c67-9c35-483d-9d7b-b94f639a5693/2012-08-28_1513.png

Also, have a look at the plugin.xml in the runtime.example plugin - this should give you a starting point for writing your own custom tasks.

Cheers!
Bob

[Updated on: Tue, 28 August 2012 21:14]

Report message to a moderator

Re: Own Extensions for the metamodel & modeler [message #1007139 is a reply to message #904629] Mon, 04 February 2013 15:28 Go to previous messageGo to next message
Frederic Lionello is currently offline Frederic Lionello
Messages: 3
Registered: September 2012
Junior Member
Hello (sorry for bumping up an old thread),

is there a way to add a custom task programmatically ?
We have tasks described in property files and ideally I'd like to be able to just drop a new property file and have the code register the custom task automatically.
Is that feasible ?

Thanks,
Regards,
Re: Own Extensions for the metamodel & modeler [message #1007308 is a reply to message #1007139] Tue, 05 February 2013 13:29 Go to previous message
Robert Brodt is currently offline Robert Brodt
Messages: 613
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

The jbpm5 target runtime plugin does exactly that - it reads *.wid files from the current project and adds them as custom tasks when the editor is started up. Was this not what you were looking for?
Previous Topic:Sequence Flows connection Bug
Next Topic:Remove shelf from pallette
Goto Forum:
  


Current Time: Thu Oct 30 19:19:55 GMT 2014

Powered by FUDForum. Page generated in 0.02083 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software