Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » PropertyExtension(entending ResourceRole)
PropertyExtension [message #1753672] Wed, 08 February 2017 17:22 Go to next message
im hello world is currently offline im hello worldFriend
Messages: 44
Registered: February 2017
Member
Hi All,
I want to extend BPMN 2.0 Properties.
Specifically, I want to add a new type of ResourceRole (other than Performer), so i want to extend resourceRole.
So, Do i use PropertyExtension?
I started working on this, but firstly, i don't know the class to put in the "class" field - The class that implements the property extension adapter inteface org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter- i don't find the specific class to implement there: e.g:
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;

public class ResourceRoleExtension implements ......?   {}

Any help please Crying or Very Sad . thanks a lot
Re: PropertyExtension [message #1753675 is a reply to message #1753672] Wed, 08 February 2017 17:42 Go to previous messageGo to next message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 811
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

I'm not quite clear on what you're trying to accomplish. Are you saying you want to define a new subclass of ResourceRole (similar to Performer)? And for what purpose? This would require a change to the BPMN 2.0 model itself (not recommended)

If you only want to add new properties to your ResourceRole then take a look at the <modelExtension> elements in, for example, the jBPM plugin.xml. For example, this excerpt from jBPM plugin.xml:

		<modelExtension
			id="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.modelExtension.process"
			runtimeId="org.jboss.runtime.jbpm5"
			name="%modelExtension.name"
			type="Process">
			<property name="version" value="1"/>
			<property name="packageName" value="defaultPackage"/>
			<property name="adHoc" value="false" type="EBoolean"/>
			<property name="isExecutable" value="true" type="EBoolean"/>
		</modelExtension>


adds the new properties "version", "packageName", "adHoc" and "isExecutable" to a Process element. You then need to provide a <propertyTab> in your plugin.xml to properly render these new properties.

The ExtendedPropertiesAdapter extensions are only intended to allow UI customization for an element 's properties, or to handle referential integrity when making changes to a certain property. For example, take a look at the DataAssociationPropertiesAdapter - this is probably one of the more complex handlers for ensuring that other elements' properties get updated correctly when changing one of the DataAssociation's properties.
Re: PropertyExtension [message #1753789 is a reply to message #1753675] Fri, 10 February 2017 09:22 Go to previous messageGo to next message
im hello world is currently offline im hello worldFriend
Messages: 44
Registered: February 2017
Member
Thank you.
So i managed to add a property for the resourceRole, but it is displayed in the bottom (it's shown just under "Resource assignment expression " rubric)
i want to display it in the "Resource role details" rubric (after the "name " of the resource role).
How to do this please?

[Updated on: Fri, 10 February 2017 09:23]

Report message to a moderator

Re: PropertyExtension [message #1753842 is a reply to message #1753789] Fri, 10 February 2017 15:42 Go to previous messageGo to next message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 811
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

You then need to provide a <propertyTab> in your plugin.xml to properly render these new properties.
Re: PropertyExtension [message #1753865 is a reply to message #1753842] Fri, 10 February 2017 22:34 Go to previous messageGo to next message
im hello world is currently offline im hello worldFriend
Messages: 44
Registered: February 2017
Member
No Message Body

[Updated on: Sun, 12 February 2017 08:36]

Report message to a moderator

Re: PropertyExtension [message #1753965 is a reply to message #1753865] Mon, 13 February 2017 13:02 Go to previous message
im hello world is currently offline im hello worldFriend
Messages: 44
Registered: February 2017
Member
Thank you Robert.
So, as i understand, if i want to add in the existing property Tab "Task "(for the Task element) , under the existing section"the Resource Role Details" a new field called "type" for example, This would require a change to the BPMN 2.0 model itself (its ecore file and also its source code) ?
Thank you for your clarifications In advance
Previous Topic:Namespace prefix in definitions
Next Topic:new properties to existing BPMN elements
Goto Forum:
  


Current Time: Fri Apr 26 06:52:47 GMT 2024

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

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

Back to the top