2 Replies Latest reply on Mar 11, 2013 2:49 AM by thomas.setiabudi

    Can Jbpm5 Catch Event out of sequence exception handling?

    navisdrools

      Hi,

      I am implementing jbpm 5.2 using catch events, script tasks and work items. We use catch event to wait for the next task. Is there a way to prevent the later events from catching because the eariler events haven't been catch yet? If thers is no out of box solution, is there a good work around?

      Thanks.

        • 1. Re: Can Jbpm5 Catch Event out of sequence exception handling?
          navisdrools

          testWorkflow.png

          I hope this picture can explain what I need to do better. There is business logic happening between events. We need to know when the second event is caught, the first event must be caught earlier. If not we need to throw an exception to preserve the workflow state. Is there any way to get any feedback, exception, status, checking to know the first event on the workflow engine level. I guess I can have a state object on my business logic,, but I am trying to use anything out of the box.

          Thanks.

          • 2. Re: Can Jbpm5 Catch Event out of sequence exception handling?
            thomas.setiabudi

            Hi Navisdrools,

             

            A possible workaround will be:

             

            1. After first event is caught, put a script task node that will set value to a variable "firstEventFired" to true

            2. After second event is caught, put a script task node that will check the value of variable "firstEventFired", if the variable value is true then proceed, else throw exception.

             

             

            Regards,

            Thomas Setiabudi