3 Replies Latest reply on Jan 22, 2015 3:50 AM by . .

    Register CustomWorkItem in kmodule.xml

    Biswajit Sarkar Newbie

      I am using jbpm 6.1.

      I created a CustomWorkItemHandler for my process.

      But before deploy the process in jbpm I have to register that CustomWorkItemHandler.

       

      I know in jbpm 6.1 I can register my CustomWorkItemHandler through my project "kmodule.xml"

      But I don't find any example how can I register my "CustomWorkItemHandler" in "kmodule.xml".

       

      Anyone please guide me with a sample "kmodule.xml" to register my "CustomWorkItemHandler".

       

      thanks in advance.

        • 1. Re: Register CustomWorkItem in kmodule.xml
          . . Newbie

          Hi-

          Here is an option: -> this is for 6.0.GA BPM suite

           

          option 1

          ---------------

          1. Go and edit kmodule.xml

          2. example of one of my project is attached here:

              <ksession name="rolrlbpmsession" type="stateful" default="true" clockType="realtime">

                <workItemHandlers>

                  <workItemHandler type="new com.crl.rol.jbpm.workitemhandlers.TestSyncWorkItemHandler()" name="Email"/>

                </workItemHandlers>

          3. add workitemhandler project as dependency after uploading it on to maven repository of BPM suite;  it's possible other dependencies might have to be in compile mode (as earlier JBPM dependencies were in provided mode (maven) and it worked when using web-inf\lib of business central)

          4. save and compile

          5. end

             

           

           

          Regards,
          Sai

          • 2. Re: Register CustomWorkItem in kmodule.xml
            Biswajit Sarkar Newbie

            thanks sai for your reply.

            I dont understand your third point.

             

            3. add workitemhandler project as dependency after uploading it on to maven repository of BPM suite;  it's possible other dependencies might have to be in compile mode (as earlier JBPM dependencies were in provided mode (maven) and it worked when using web-inf\lib of business central)

            can you please elaborate?

            • 3. Re: Register CustomWorkItem in kmodule.xml
              . . Newbie

              what i meant is this?

               

              1. work handlers you mention it in kmodule.xml

              2. put it in web-inf\lib and restart the run-time (other option in 6.0.2.GA is to add to KIE repositiory instead of web-inf\lib; it seems to throw errors for me in 6.0.2GA at run-time and hence i've kept it in  web-inf\lib for now)

              3. also, undeploy and redeploy your kjar (project) so that it uses new work handlers

              1 of 1 people found this helpful