6 Replies Latest reply on Aug 28, 2014 7:45 AM by Laura delli Paoli

    Import icon for serviceTaskNode

    Laura delli Paoli Master

      Hello everybody,

      I created a jar file containing my workItyemHandelrs implementations for some serviceTaskNodes.

      Now I'd like to configure a custom icon for these services.

       

      How can I achieve this. Can I add icons to jar and reference them from jbpm web console?

       

      Laura

        • 1. Re: Import icon for serviceTaskNode
          Maciej Swiderski Master

          as far as I know icons should be stored next to wid file in git repository of your project. Handler is more runtime related component while icon (and wid in general) is design time.

           

          P.S.

          wid - work item definition

           

          HTH

          1 of 1 people found this helpful
          • 2. Re: Import icon for serviceTaskNode
            Laura delli Paoli Master

            Thanks for your answer, Maciej.

             

            How can I do this in jbpm-console?

             

            Laura

            • 3. Re: Import icon for serviceTaskNode
              Maciej Swiderski Master

              I believe you would need to use git tool for that to first clone the repository add your icon into the project(s) and then push your changes back so they will be reflected in jbpm console.

               

              HTH

              • 4. Re: Import icon for serviceTaskNode
                Laura delli Paoli Master

                Hi,

                I was thinking about putting my incons into jbpm-console.war\org.kie.workbench.KIEWebapp\defaults folder, but i can't see my icon in the console.

                 

                Is this way totally wrong?

                 

                Laura

                • 5. Re: Import icon for serviceTaskNode
                  rob3c Newbie

                  Hi Laura,

                   

                  I've been trying to use custom icons for custom work items in jbpm-console, too, and there seems to be a bug in the jbpm-designer code that prevents using icons uploaded through the web interface or in external jars.

                   

                  If you step through the source code during the process designer load, you'll find that the JbpmPreprocessingUnit class assumes that all icon files exist in a project's "/global" folder, and it prepends the global folder path to any icon paths in wid files if they doesn't already start with it. Also, you can't upload to the global folder through the web interface because it forces all uploaded files to be placed a project's "/src/main/resources" folder.

                   

                  You might think you could working around this limitation by setting a relative path from the global folder like "../src/main/resources/myIcon.png", but that fails, too. That's because the VFSRepository code doesn't resolve relative paths in the assetExists() method when creating a uniqueId to use for the lookup.

                   

                  Unfortunately, until this limitation is addressed, you can only reference icons in a project's global folder. I'd upload a fix, but it's not clear what the dev team intends as the proper behavior.

                   

                  Cheers,

                  Robert

                   

                  p.s. It should be noted that none of these problems exist in the eclipse designer where custom icons work perfectly.

                   

                  UPDATE: Since my limited rep prevented me from replying again to your message about the KIEWEBapp defaults, I'm adding it to this one:

                   

                  Dropping your icons in the KIEWEBapp's defaults folder a good try since that's where the only icons that actually work are: the default email, log and service node icons. Unfortunately, the KIEWEBapp source code hard-codes knowledge of only those three, so nothing else you drop in there will be picked up!

                   

                  UPDATE 2: Ok, I just created an issue for this:

                  [JBPM-4407] custom work item icons not displaying in jbpm-console process designer - JBoss Issue Tracker

                  1 of 1 people found this helpful
                  • 6. Re: Import icon for serviceTaskNode
                    Laura delli Paoli Master

                    Thanks for your answer Robert.

                     

                    Can you suggest any workaround for customizing icons in the web console?

                     

                    Laura