Skip to main content



      Home
Home » Eclipse Projects » BPMN 2.0 Modeler » Custom Task creation name
Custom Task creation name [message #1228630] Tue, 07 January 2014 11:59 Go to next message
Eclipse UserFriend
Hi,

I declared a custom task "MyTask" based on the standard BPMN2 ScriptTask. I managed to modify its appearance by implementing some methods in my feature container, but I am not able to change its name at creation time. In my case, I would like to name it "MyTask 1" instead of "Script Task 1".

Is it possible to customize the name of the newly created custom task ?

Thanks
Re: Custom Task creation name [message #1228652 is a reply to message #1228630] Tue, 07 January 2014 13:09 Go to previous messageGo to next message
Eclipse UserFriend
If you are using the <customTask> extension in your plugin.xml, you can simply initialize the name there:

         <property
               name="name"
               value="My Task 1">
         </property>


Be aware, however, that the trailing sequence number will not be automatically incremented each time you add a new task.

If that doesn't work, you can try changing the name in your AddFeature.

HTH,
Bob
Re: Custom Task creation name [message #1229326 is a reply to message #1228652] Thu, 09 January 2014 02:54 Go to previous messageGo to next message
Eclipse UserFriend
Hi Bob,

finally I override the add() method of my AddFeature to modify the name generated during the creation of the business object. In the create() method of my CreateFeature, I put a property in the context before calling AbstractCreateFlowElementFeature.create(). Then I retrieve this property in the add() method of my AddFeature to know if the object is being created or simply added. I don't know if there is a better solution but it seems to work.

Thanks for your help !
Re: Custom Task creation name [message #1229435 is a reply to message #1229326] Thu, 09 January 2014 07:46 Go to previous message
Eclipse UserFriend
Hi Cédric,

I'm glad it worked. Graphiti Context properties seems to be the best way to communicate state information between the different Features, so your approach is the right one Smile

Cheers,
Bob
Previous Topic:extension points
Next Topic:org.eclipse.bpmn2.modeler.examples.modelreader project
Goto Forum:
  


Current Time: Sun Jul 13 21:02:15 EDT 2025

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

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

Back to the top