cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Icons in Custom Tasks only appear in Eclipse

jjfutt
Champ in-the-making
Champ in-the-making
Hello:

I have followed the User Guide to create custom tasks with their own icons and this works very well (I have experience with JBPM5 and Activiti has a much more polished and better solution!)

However, the custom icons in the diagram only appear within Eclipse, and if we look at the diagram in other places (Activiti Explorer, or in custom app by calling Activiti APIs), the diagrams do not have custom icons, even through the designer extension jars are on the classpath.

Am I trying to make a feature work that doesn't exist, or is there a way to make this work?

Thanks.
2 REPLIES 2

frederikherema1
Star Contributor
Star Contributor
This is correct. The extension-icons only work for the designer. The engine itself (and explorer) uses another mechanism to render the diagrams
than the eclipse designer.

Look into org.activiti.engine.impl.bpmn.diagram.ProcessDiagramGenerator and org.activiti.engine.impl.bpmn.diagram.ProcessDiagramCanvas, the icon types are defined here statically. Currently, there is no way of plugging custom icons based on certain values in the XML. However, you can always adapt the DiagramGenerator and try to suggest and implement a "generic" approach for this, we're always happy to accept contributions.

jjfutt
Champ in-the-making
Champ in-the-making
Frederik:

Thanks a lot for your prompt response; I will indeed look into this customization and suggest updates. I have already updated the Diagram Generator to show a check mark, progress bar, or failed icon for activiti states, and I will share that too.

thanks,