4 Replies Latest reply on Jan 26, 2015 4:39 AM by sanjay05222

    how to register custom workitem handler?

    missedone

      hi, folks

       

      i developed a custome workitem handler, and i have successfully deploy the new hanlder into jbpm-console:

      1. define drools.session.conf CustomWorkItemHandlers.conf and copy them into jbpm-gwt-console-server.war

      2. copy custom workitem handler jar into the jbpm-gwt-console-server.war

       

      this make things work

       

      now, my question is, is there any approch that can make the new workitem handler recognized by jbpm-console without hacking the jbpm-gwt-console-server.war?

       

      i tried to put the custom workitem hanlder jar under, jboss common lib directory, but not work

       

      any suggestion? thanks

       

      --

      Nick

        • 1. Re: how to register custom workitem handler?
          missedone

          further question, any class is responsiable for initialize the custom workitem handler, that parse the file "META-INF\drools.session.conf"?

          • 2. Re: how to register custom workitem handler?
            eaa

            Not sure about how to avoid hacking jbpm-gwt-console-server.war, but the classes responsible of parse the .conf file are SessionConfiguration (in drools-core) and ChainedProperties (in knowledge-api). SessionConfiguration uses ChainedProperties to parse the content of the file and AbstractWorkingMemory uses SessionConfiguration to get the defined work item handlers and register them into the session.

            1 of 1 people found this helpful
            • 3. Re: how to register custom workitem handler?
              pavan496

              Hi Nick,

               

              Did you get a solution to this?

               

              Thanks,
              Pavan

              • 4. Re: how to register custom workitem handler?
                sanjay05222

                Version used JBPM 6.1.0.final and wildfly 8.1.0.Final .

                I am not sure friends which version of JBPM you guys are using , I think in all our discussion if we make sure of that information the discussion becomes very very valuable. thought.

                I think there are two ways.

                 

                1. kconsole.xml and kjar with the dependency declared , and work item handler declared out there.  ( This steps i wasn't successful that much ) I have to still try this

                2. (a) Create a separate jar for the work item  put that in jbpm-console.war\web-ing\lib , (b) search for *.conf in the war and you will get <confirm about exact name of tile >customworkitem.conf and enter the configuration like other work Items. (3) in side your project enter the details in workitem.wid file. ( I was successful doing this. )

                 

                more details can be found Custom WorkItems

                hope this helps . - Sanjay