1 2 Previous Next 17 Replies Latest reply on Mar 13, 2011 7:28 AM by odelyaholiday Go to original post
      • 15. Re: only the first human task is being saved in db!
        odelyaholiday

        Thanks (it's sort of infrastructure and I don't the developers to forget the call so I define it for all) it's a must.

         

        Can you please refer me for documentation or how to register my ProcessEventListener  in process?

         

        I didn't find any explicit example in the documentation http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-flow/html_single/index.html

        • 16. Re: only the first human task is being saved in db!
          salaboy21

          yes, sure.. it's simple.

           

          ksession.addEventListener(myListener);

           

          myListener is an instance of a class that implements the org.drools.event.process.ProcessEventListener interface. You should add the  listener before starting your processes.

          Greetings.

          • 17. Re: only the first human task is being saved in db!
            odelyaholiday

            Well I tried to add it like this but it didn't work:

             

            @Override

                      public void afterNodeTriggered(ProcessNodeTriggeredEvent event) {

                                Node node = event.getNodeInstance().getNode();

                                if (node instanceof HumanTaskNode) {

              BlockingGetTaskResponseHandler handler = new BlockingGetTaskResponseHandler();

              taskClient.getTasksAssignedAsPotentialOwner(userName, "en-UK", handler);

            ..

            //send web services

            }

             

            The new task was not added to the database at this point!

             

            When can I add this piece of code that will send web service about the new task with the task id?

             

            BTW, in order to workaround it - I am sending to the web service the workitemid which I have it. I still don't understand what is the workitemid for.

            1 2 Previous Next