Hello!
My goal is to extend the BPMN Modeler Metamodel to introduce new elements. Ive tried to use the GMF Files from the SVN Project to generate the Diagram code. But (there are already threads in this forum about it) it didnt work.
My question: Is there some other way to apply my modifications?
Basically I need to introduce subclasses of some existing classes and of course their entries in the palette etc..
I decided to use extension points to add the new entry for a Subclass of "SubProcess" to my palette. So far so good, I also managed to assign it to a CreationTool but thats where my problems come in:
I don't seem to be able to create anything when Im using my own elementType. Maybe I missed to specify something?
My own PaletteFactory contains this:
...
return new CreationTool(BpmnElementTypes.MyOwnSubprocess);
...
So what I did was basically: I tried to define an "IElementType" in BpmnElementTypes and add the elementType to plugin.xml
However, there are a few things Im not sure about: The semantic Hint for example. Also is it necessary to create new viewProvider and EditPartProvider classes ?(I saw that in some other tutorial) I was hoping I could simply use the existing Helper class since it doesnt explicitly mention the type "Subprocess" anywhere.
As some of you might suspect I am by no means an expert in GMF
Anyways: when I want to draw my own Object it just doesnt let me (there is this little "not allowed" sign on my pointer)
Has anyone ever done something similar?
ANY help is greatly appreciated!
On 12/7/09 4:59 AM, Christian Kuhl wrote:
> Hey it's me again.
> Antoine, thanks for the links!
>
> I decided to use extension points to add the new entry for a Subclass of
> "SubProcess" to my palette. So far so good, I also managed to assign it
> to a CreationTool but thats where my problems come in:
> I don't seem to be able to create anything when Im using my own
> elementType. Maybe I missed to specify something?
>
> My own PaletteFactory contains this:
>
> ..
> return new CreationTool(BpmnElementTypes.MyOwnSubprocess);
> ..
>
> So what I did was basically: I tried to define an "IElementType" in
> BpmnElementTypes and add the elementType to plugin.xml
>
> <metamodel nsURI="http://stp.eclipse.org/bpmn">
> <metamodelType
> id="org.eclipse.stp.bpmn.diagram.MyOwnSubProcess"
> name="%sub_process_label"
> kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
> eclass="MyOwnSubprocess"
> edithelper=" org.eclipse.stp.bpmn.diagram.edit.helpers.SubProcessEditHelp er ">
>
> <param name="semanticHint" value="2002"/>
> </metamodelType>
> </metamodel>
>
>
>
>
> However, there are a few things Im not sure about: The semantic Hint for
> example. Also is it necessary to create new viewProvider and
> EditPartProvider classes ?(I saw that in some other tutorial) I was
> hoping I could simply use the existing Helper class since it doesnt
> explicitly mention the type "Subprocess" anywhere.
> As some of you might suspect I am by no means an expert in GMF :blush:
> Anyways: when I want to draw my own Object it just doesnt let me (there
> is this little "not allowed" sign on my pointer)
> Has anyone ever done something similar?
> ANY help is greatly appreciated! :)
As a rule of thumb, don't touch element types as they are defined in the
model of the diagram. You can use annotations to customize your items.
g.marquez.o Messages: 4 Registered: September 2010
Junior Member
Hello I hope I can help me. I want to extend the BPMN Modeler. I saw the "STP BPMN Presentation Hands on tutorial" ---> "Extending the modeler: defining a custom property"
In the section called "Extending the modeler: defining a custom property" discusses the extension of the BPMN Modeler. But in this part "... Create a class in org.eclipse.stp.samples.eclipsecon2007.participant.properties as ParticipantPropertySection..." Where is "org.eclipse.stp.samples.eclipsecon2007.participant.properties" in Eclipse? From what I see is a package of the conference in 2007, but which package is equivalent in the BPMN modeler? Where I create the ParticipantPropertySection class?