6 Replies Latest reply on Nov 9, 2005 11:01 AM by Ronald van Kuijk

    Handling Workflow Exceptions

    Henrique Fernandes Newbie

      Hi!

      I was reading the jBpm 3.0 userguide looking for the runtime process exception handling feature.

      But i've found the chapter 7.6 (Exception Handling) that tells that the graph execution on itself cannot result in problems.

      Is there any other way to change the normal flow during runtime in order to solve some possible process execution problems?

      Thank you.

        • 1. Re: Handling Workflow Exceptions
          Bernd Ruecker Master

          This means, that the exceptions only can occur in your actions. And this can be handled by the exception handlers from jbpm (sorry, if hhave no no example for this at the moment).

          In my opinion it is also a good design to catch business exceptions within your Actions and set some process variables, dependent on what exception is thrown.
          Then you can model a Decision in your process, which takes a special path of execution.

          And if you talk from RuntimeExceptions (technical issues), don't deal with these in the processes, business processes should be free of those technical issues.

          • 2. Re: Handling Workflow Exceptions
            Alejandro Guizar Master

            You can use exception handlers to affect the data context (e.g. set a flag variable). Alternatively, you can catch exceptions within your "normal" action handlers.

            Later on, you can query the context to take a different path of execution (e.g. a decision node checking the value of the flag).

            • 3. Re: Handling Workflow Exceptions
              Henrique Fernandes Newbie

              Okay... I got your point!

              But... supose that an administrator deploys a new process definition and someone starts a new execution. Then, the process really needs to be redefined for some very good reason during the execution. How can I handle this situation in jBpm?

              I know there are good practises for designing process definitions in order to reduce these situations. But, runtime process exceptions can happen anyway!

              • 4. Re: Handling Workflow Exceptions
                Bernd Ruecker Master

                I don't get your real problem.

                If a technical, unexpected runtime exception is thrown (and you are working inside a application server) the transaction is rolled back, so the user, triggering the process can get a "Service not available" exception or something like this. This technical exceptions should not be watched at in the business process.

                and business exceptions can be handled with the described soltuions

                • 5. Re: Handling Workflow Exceptions
                  Henrique Fernandes Newbie

                  Okay...

                  I'm not talking about those runtime exceptions (technical issues). I just wanna know how can the jBpm framework handle with process redefinitions. What happens to the running processes for the redefined definition? Is there any way to change a process definition and consequently affect the running processes?

                  I hope this explains better my point.

                  • 6. Re: Handling Workflow Exceptions
                    Ronald van Kuijk Master

                    it does, but it would be better if you start a new topic for this question and mention here that you did. This question has no relation with the original subject