cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Service Task icon not displayed in palette

jdf1963
Champ in-the-making
Champ in-the-making
I have created a custom service task based on AbstractCustomServiceTask.  I followed the example for money task in the user guide.

When I open a diagram the folder for my task is in the palette but not the icon for the task itself.  However, I can click where I expect the task icon to be in the palette and drag it onto the canvas and it appears on the canvas (with the icon).  The properties I defined in my class also appear in the properties pane with help, etc.  So I know the designer is loading my class properly.

Does anyone know of a common reason with the icon for the custom service task would not appear in the palette?

Thanks so much in advance,
Don
5 REPLIES 5

jdf1963
Champ in-the-making
Champ in-the-making
Could the bit depth of the icon have something to do with it?  The one I am using is 32 bit depth.

frederikherema1
Star Contributor
Star Contributor
Not sure if the depth is related. Does it work when you use an icon that works in eclipse (you can steal one from an existing bundle). If not, something else is wrong (eg. path of file, …)

Hi Frederik,

I still have not been able to make the custom service task icon appear in the palette.  I am using the coin.png icon from the money example.  Again the odd thing is if I hover the mouse over the palette where I expect the task to be I get tool tips.  Then if I drag into the canvas the task appears with the coins.png icon.  So I know I have the path right because all the get icon methods call my method below:

@Override
public String getSmallIconPath() {
  return "coins.png";
}

Thanks so much for your help.  Can you think of anything else to try?

Thanks,
Don

frederikherema1
Star Contributor
Star Contributor
try:

/*
   * (non-Javadoc)
   *
   * @see
   * org.activiti.designer.integration.servicetask.AbstractCustomServiceTask
   * #getSmallIconPath()
   */
  @Override
  public String getSmallIconPath() {
    return "icons/coins.png";
  }

Hi Frederik,

Thanks for you feedback.  It turns out it was really something basic and stupid.

When you right click in the Eclipses palette there is an option to "Use Large Icons".  When I disable this option everything works perfectly.

I am curious though why it does not work with that option disabled.  I reviewed the Activiti source and by default getLargeIconPath calls getSmallIconPath.  So it seems like it would work.  But….I'm not worried about it.

Thanks again for your feedback.
Don