1 Reply Latest reply on Jun 4, 2011 8:26 PM by alexis_lalas

    jbpm5 - When Register WorkItemHandler for a procces that run into jbpm-console

    alexis_lalas

      Hello,

      I have a process which has  a two human tasks and one service task.

      The process starts from the jbpm-console and human tasks too.

      I want to know when, how and when I must register the WorkItemHandler

      to ensure that run the "task FindATrickFromWS" from process.

       

       

      Where should I add the class "FindATrickFromWSWorkItemHandler"?

      Where should I add the following code to register the WorkItemHandler?

       

      FindATrickFromWSWorkItemHandler handler = new FindATrickFromWSWorkItemHandler();

      ksession.getWorkItemManager().registerWorkItemHandler("FindATrickFromWS", handler);

       

       

      Thank  a lot for every.-

      Greetings .-

      alexis_lalas

        • 1. Re: jbpm5 - When Register WorkItemHandler for a procces that run into jbpm-console
          alexis_lalas

          Hello everyone!!

          I found my own solution, but I don't know if that is the best solution.

           

          First you have to add your class at /jbpm-5.0.0-installer-full/jboss-5.1.0.GA/server/default/deploy/jbpm-gwt-console-server.war/WEB-INF/classes,

          In my case,


          /jbpm-5.0.0-installer-full/jboss-5.1.0.GA/server/default/deploy/jbpm-gwt-console-server.war/WEB-INF/classes/com/aquiros/jbpm/workItemHandler/FindATrickFromWSWorkItemHandler.class

           

          Then you have to modify the following file /jbpm-5.0.0-installer-full/jboss-5.1.0.GA/server/default/deploy/jbpm-gwt-console-server.war/WEB-INF/classes/META-INF/CustomWorkItemHandlers.conf, just add your class,

           

          In my case, I added "FindATrickFromWS": new  com.aquiros.jbpm.workItemHandler.FindATrickFromWSWorkItemHandler(),

           

          [

            "Log": new org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler(),

            "FindATrickFromWS": new  com.aquiros.jbpm.workItemHandler.FindATrickFromWSWorkItemHandler(),

          ]

           

           

           

           

          My bpmn file is:

           

          <task id="_5" name="Vehicle Tracking (GPS+)" tns:taskName="FindATrickFromWS" >

          </task>           

          Somebody know if there are any other solution? other more pretty ?

           

           

          Greetings.-

          alexis_lalas