4 Replies Latest reply on May 15, 2014 4:13 PM by Alfred Gillette

    JBPM workItemHandlers

    Alfred Gillette Newbie

      I am trying to create a custom workItemHandler and have been reading posts for the better part of a week. I have

      the workItemHandler showing up in my KIE interface but every time I deploy and run my process, JBPM reports that

      it can't find my custom workItemHandler.

       

      I added the session.template file in my /standalone/configuration/ directory but the file does not seem to be being read.

      I proved this to myself by adding the word "blart" to the start of the definition and there were no errors in the server.log

       

      I found another post that talked about exploding the jbpm.console war and I have tried that as well... I moved my jar containing my customer workItemHandler to

      the "../standalone/deployments/jbpm-gwt-console-sver.war/WEB-INF/classes/META-INF/" directory and still no joy.

       

      Question1: Is there something else that has to be done to have jbpm read the session.template file?

       

      I have read Chapter12 in the documentation several times and I don't see the answer.

       

      Question2: Is there some other source of information that provides a step by step example for custom workItemHandlers?

       

      I checked my boot.log and all of the directories seem to be set properly.

        • 1. Re: JBPM workItemHandlers
          Mauricio Salatino Master

          Hi there, which version of jBPM are you using?

          Maybe this post will help you with the configurations: http://salaboy.com/2013/10/22/kie-wb-jbpm-console-ng-configurations/

          • 2. Re: JBPM workItemHandlers
            Alfred Gillette Newbie

            Thanks for the reply Mauricio,

             

            I am using JBPM6. I read the article/link but I think my problem is more basic. I found a post last night where the author created a process with a custom service and an associated WorkItemHandler and

            everything was contained in the Eclipse project. I downloaded his code and the project worked for me. That would imply that I don't need to explode the console WAR and place my jar files

            in the lib directory.

             

            I suspect that I need a basic tutorial on how to create a custom service with an associated WorkItemHandler that can be deployed to JBOSS. The example that I found last night

            worked in Eclipse, but I could not figure out what needed to be done to deploy it so that it works from inside KIE.

             

            I have managed to checkout projects that I create in KIE using GIT, but when I make changes and try to submit them back the GIT repo is not updated. That's probably a topic for

            another thread.

             

            THE BOTTOM LINE: I am looking for a tutorial on how to create and deploy a custom service with an associated WorkItemHandler for use inside KIE.

            • 3. Re: JBPM workItemHandlers
              Maciej Swiderski Master

              for 6.0 and 6.0.1 you still need to place your handler class/jar inside jbpm-console.war/WEB-INF/lib so it can be registered properly. Then the definition of the handler name and class name should be either specified in kmodule.xml or CustomWorkItemHandlers.conf. See docs of RuntimeManager configuration on various options to define handlers. This applies only to version 6 as in 5 it was different mechanism for that.

               

              HTH

              1 of 1 people found this helpful
              • 4. Re: JBPM workItemHandlers
                Alfred Gillette Newbie

                ANSWER: The problem turned out to be related to the copious amounts of misleading documentation on the Internet. In the end the solution was to edit the WEB-INF/classes/META-INF/CustomWorkHandlers.conf file and add my tags and the associated classes. I tried adding definitions to the kmodule.xml file, session.template files and nothing worked. I'm not sure why this was so hard to find (8 days total), but all is working now.