Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » Extend Annotation(Extend Annotations Element)
Extend Annotation [message #1018749] Thu, 14 March 2013 12:06 Go to next message
Mauro P. is currently offline Mauro P.Friend
Messages: 24
Registered: April 2011
Junior Member
Hi all,
I'm new to the bpmn modeler, and i've got some question.
I need to extend the bpmn modeler to support custom "Annotation".
I've followed the tutorial videos provided by the docuemntation page of the bpmn2.0 modeler site. The video explain how is possible to add custom task.
I tryed to replicate it adpating to my needs, but unfortunately i couldn't get it work.
The extension point "org.eclipse.bpmn2.modeleler.runtime" has a specific "customTask" subnode, and i couldn't add my custom "Annotation".
I've also looked at the modeler.runtime.example plugin but it hasn't help me much more.

How I can achieve my objective? Can someone help me?

Tanks in advance
Mauro.

Re: Extend Annotation [message #1018989 is a reply to message #1018749] Thu, 14 March 2013 21:20 Go to previous messageGo to next message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 618
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Hi Mauro,

The <customTask> extension is somewhat of a misnomer, because you can actually use it to extend any BPMN2 model element that subclasses BaseElement. All you need to do is change the "type" attribute to something like type="TextAnnotation". I have a working example that does exactly this and even changes the Text Annotation graphic from its default "[" to something that looks like a Task with custom image decorators. I will try to add this to the examples branch in the Git repository, when I get back from vacation next week.

Cheers!
Bob
Re: Extend Annotation [message #1019032 is a reply to message #1018989] Thu, 14 March 2013 23:06 Go to previous messageGo to next message
Mauro P. is currently offline Mauro P.Friend
Messages: 24
Registered: April 2011
Junior Member
Really thanks bob!
I'll wait for your example!
Can you notify me when you've uploaded the example?

Tanks again!
Mauro.
Re: Extend Annotation [message #1019719 is a reply to message #1019032] Sat, 16 March 2013 13:03 Go to previous messageGo to next message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 618
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Hi Mauro,

Just realized the example I was thinking of is already available in the org.eclipse.bpmn2.modeler.runtime.example plugin. Have a look at the plugin.xml in that project - you'll see that the <customTask> extension does specify type="TextAnnotation".

Let me know if you need help!
Bob
Re: Extend Annotation [message #1022686 is a reply to message #1019719] Fri, 22 March 2013 10:58 Go to previous messageGo to next message
Mauro P. is currently offline Mauro P.Friend
Messages: 24
Registered: April 2011
Junior Member
Hi bob, sorry for the late reply.
I've looked the example you pointed me.
After some try i've finally extended the TexeAnnotaton, also with a custom model and custom property.
Now, i've got some other questions for you Smile.
* The extension "property tab" of the "org.eclipse.bpmn2.modeler.runtime" ep permit to substitute an existent tab.
My qestion is how I remove a default tab (without substituting) (e.g. the "Text Annotation" tab)?
I've also tried to fill the "propertyTabs" field of the "Custom Task" with the tabs id, but nothing change.
* Another thing: Is possible to extend the Association link with the "custom task" extension (As the text Annotation)
and have a new tool in the palette with a custom "createFeature"?

* I don't know if this is a bug or not, but i can see my "CustomTextAnnotation" (element and palette tool) only on
process diagram. if i try to open a collaboration diagram or a coreography, my tool are not created. There is something to configure?
* Last question: there is a way to set a "modelEnablemnet" as default profile, without the need to go in the preference and ovveride the default profile?

Sorry again for all this questions...

Really Tanks in advance!

Mauro P.
Re: Extend Annotation [message #1043288 is a reply to message #1022686] Wed, 17 April 2013 14:07 Go to previous message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 618
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Wow, almost a month and I haven't replied to your question yet - shame on me! Wink
In general, to disable a property tab, the Property Section's appliesTo(IWorkbenchPart,ISelection) method should return "false". You can do this by overriding the default property section and providing your own appliesTo().

HTH,
Bob
Previous Topic:Sequence Flow
Next Topic:BPMN2 Modeler project status updates
Goto Forum:
  


Current Time: Thu Nov 27 08:45:06 GMT 2014

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

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