1 Reply Latest reply on Dec 9, 2010 5:34 AM by Koen Aers

    Global Handler For All Processes

    prasad basutkar Newbie

      Hi All

              Requirement : i want to create global EventHandler for all the process for events 1) "InitializeVariable"(When Process Started) , 2) "InitializeTaskVariable(When Task Started)" ,  3)"CompleteTask"(When Task Completed).

              Description : i am using jbpm 3.2.6 i have the requirement where i dont want to specify event handler  as a part of Process-Definition , they should be independent of all the processes. Whenever my process started event(common for all processes) should get called , whenever my task started event(common for all processes) should get called and whenever my task completes event(common for all the processes) should get called.Now for every process and task we have to specify EventHandlers , so to avoid this repetation i want global handler for all this events.

        • 1. Re: Global Handler For All Processes
          Koen Aers Master

          Hi Prasad,


          The way how you should tackle this in jBPM 3 is to define a generic process that contains a generic subprocess node which will be bound to your actual process at runtime. You can then attach the generic event listeners to the generic subprocess node.

          Of course starting your actual process would need to go through the indirection of starting your generic process with the name of your actual process and probably other variables as parameters.


          I hope this helps,