Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [bpmn2-modeler-dev] Adding custom tasks

Hi,
now the bug is fixed so everything works fine. 
i would like to know if there is a possibility to change the image accoridngly to the properties of the task.
Basically: every task has different fields reachable from the "properties" tab of eclipse. how can i access to that values from the class? is it possible? 

On Fri, Jul 15, 2011 at 16:38, Bob Brodt <bbrodt@xxxxxxxxxx> wrote:
Hmm, this looks like a bug. I'm investigating this now...
see: https://issues.jboss.org/browse/JBPM-3295

Thanks for finding this!


_______________________________________
Robert ("Bob") Brodt
Senior Software Engineer, JBoss Riftsaw
JBoss by Red Hat


(Actually I've to forward the mail because the ML bounced my message back. anyway i'm still having problems to make this piece of code working. i'm not able to overlay the icon to the task rectangle.)

Yes, is what i did but doesn't work.

myTask extends the TaskFeatureContainer which extends the AbstractTaskFeatureContainer.

if i override the method inside myTask (so as extension of taskFetatureContainer) it is not called, this because the method called is the one inside TaskFeatureContainer (which is the extension of the AbstractTaskFeatureContainer). 
i tried to make myTask as extension of AbstractTaskFeatureContainer but in this way it disappears from the palette. (i don't know why)



On Wed, Jul 13, 2011 at 16:48, Bob Brodt <bbrodt@xxxxxxxxxx> wrote:
Yeah, funny thing about eclipse.org mailing lists - I saw the same problem earlier. Not sure if there's a cache somewhere in eclipse.org that takes some time to get refreshed...

Take a look at ManualTaskFeatureContainer. Your custom task feature container just has to override the getAddFeature() method and return an IAddFeature class that implements decorateActivityRectangle() - easy peasy :)

The cool thing about Graphiti is that it provides a LOT of default functionality that usually makes sense (most of the time) - the hard part is trying to figure out which bits of Graphiti to override.


_______________________________________
Robert ("Bob") Brodt
Senior Software Engineer, JBoss Riftsaw
JBoss by Red Hat


i didn't know about this part: 


On Wed, Jul 13, 2011 at 16:17, Bob Brodt <bbrodt@xxxxxxxxxx> wrote:

   <extension
         point="org.eclipse.bpmn2.modeler.custom_task">
      <task
            createFeature="org.eclipse.bpmn2.modeler.extras.EmailTaskFeatureContainer"
            name="Email Task"
            taskName="send">
      </task>
      <task
            createFeature="org.eclipse.bpmn2.modeler.extras.LogTaskFeatureContainer"
            name="Log Task"
            taskName="log">
      </task>
      <task
            createFeature="org.eclipse.bpmn2.modeler.extras.MyCustomTaskFeatureContainer"
            name="MyCustom Task"
            taskName="mycustom">
      </task>
   </extension>



now it works.

PS: i tried to send the message to the mailing list but it bounced back with an error. is it me or the ML is not working yet? 
PPS: how can i overlay the icon in the top left of the task? (like for the human-task)
--
Stefano




--
Stefano



--
Stefano

_______________________________________________
bpmn2-modeler-dev mailing list http://dev.eclipse.org/mailman/listinfo/bpmn2-modeler-dev




--
Stefano

Back to the top