2 Replies Latest reply on Mar 21, 2011 8:49 PM by harjotnarula09

    Task Service - large number of generic listeners

    harjotnarula09

      I have been playing around with user tasks in jBPM using the default implementation of user tasks. When I close the task, it seems that task service looks for all listeners on that task and sends some messages ..... Now this is what is happening, if I have 2 completed tasks in my DB and I am closing the 3rd task, I see 3 statements on task service console which suggest that possibly the listener on tasks which are closed is still hanging around and listening to task closure events. This thing becomes very annoying when you have a large number of tasks, basically you see a number of statements on console and it seems like it takes more time to complete the task. Has someone else also faced a similar issue?

       

           [java] [2011:03:80 16:03:379:debug] Message receieved on server : Operation

      Request

           [java] [2011:03:80 16:03:380:debug] Arguments : [Complete, 4, krisv, null,

      null]

           [java] [2011:03:80 16:03:380:debug] Command receieved on server was operati

      on of type: Complete

           [java] MessagingTaskEventListener.taskCompleted 4

           [java] Found generic listeners: 4

           [java] [2011:03:80 16:03:393:debug] Message receieved on server : QueryTask

      sAssignedAsPotentialOwner

           [java] [2011:03:80 16:03:393:debug] Arguments : [krisv, en-UK]

           [java] [2011:03:80 16:03:397:debug] Message receieved on server : GetTaskRe

      quest

           [java] [2011:03:80 16:03:397:debug] Arguments : [4]

           [java] [2011:03:80 16:03:403:debug] Message receieved on server : GetTaskRe

      quest

           [java] [2011:03:80 16:03:404:debug] Arguments : [4]

           [java] [2011:03:80 16:03:412:debug] Message receieved on server : GetTaskRe

      quest

           [java] [2011:03:80 16:03:413:debug] Arguments : [4]

           [java] [2011:03:80 16:03:418:debug] Message receieved on server : GetTaskRe

      quest

           [java] [2011:03:80 16:03:418:debug] Arguments : [4]

        • 1. Task Service - large number of generic listeners
          salaboy21

          there are two different things there.

          1) is completing the task in the task server

          2) completing the work item in the process that lives in the ksession to be able to continue the process to the next node.

          Basically you need to analyze both logs.. and probably the session one is the one that most interest you.

          Is that what you are looking for? I'm not sure to understand the problem here..

          Greetings.

          • 2. Task Service - large number of generic listeners
            harjotnarula09

            I am talking about the logs in the task server (the ones pasted above). I got all these logs when I closed the task number 4 from Human Task Viewer in eclipse. Now can you answer the following questions

             

            1) why do I see a statement which says  Found generic listeners: 4? Why 4 listeners when the previous 3 tasks have been already closed?

             

            2) I see the below statement 4 times - not sure why, can you explain?

            [java] [2011:03:80 16:03:397:debug] Arguments : [4]

                 [java] [2011:03:80 16:03:403:debug] Message receieved on server : GetTaskRe

            quest

             

            3) It seems that task closure is an event. Can you tell me who is listening to this event and when do they stop listening? I guess the tasks which have closed need to stop listening to task closure event.

             

            Thanks

            Harjot