5 Replies Latest reply on Mar 14, 2014 7:49 AM by salaboy21

    Catch java exceptions with a boundary error event

    jocelyn.duc

      Hello,

       

      I am trying to do some error handling. I have attached a boundary error event on a service task. In my service task I volountarily throw a new ValidationException. Doing this, the flow goes through the boundary error event. But how to recover the exception message in the next task?

       

      By reading the documentation, I found some stuffs about throwing error with FaultName. but nothing about getting messages from a java exception. How to do it?

       

      My goal is to check if a user task form inputs are coherent with some external data in the service task and, in case of error, redirecting the user to the form with an error message.

       

      error.png

        • 1. Re: Catch java exceptions with a boundary error event
          swiderski.maciej

          this has been recently added and should be already available in 6.1.0.Beta one in maven repository. Take a look at this example on how to define it as variable in your process.

           

          HTH

          • 2. Re: Catch java exceptions with a boundary error event
            jocelyn.duc

            I will try this!

             

            A question. What is the best way to keep jBPM up-to-date? I started with a demo installation of the version 6.0. In my eclipse projects I can change the version in pom.xml. But how to deal with the workbench and my jBPM repositories? Cloning the master and compiling it? I have tried to install a newer version, but I don't know how to access my old repositories... Is there a official migration guide or something like that?

            • 3. Re: Catch java exceptions with a boundary error event
              salaboy21

              Hi Jocelyn,

              Yeah, cloning the sources from github and compiling locally is one of the best ways to keep your environment updated and work with the latest source code, which is always recommended for developing applications which you want to run with a future release and to identify bugs in the early stages.

               

              to access your old repositories you can clone them inside the new version, for example what I did for creating the jbpm-playground repository (in github.com) is to create some projects locally, then clone the internal repo and push all the assets to github. In that way you can then clone the same repo in any other installation.

               

              HTH

              • 4. Re: Catch java exceptions with a boundary error event
                jocelyn.duc

                Thank you Mauricio.

                 

                So,

                1. I've git cloned the jbpm master, ok!
                2. mvn -DskipTests install, which has created jars in target folders, ok!
                3. I can ant start.j2 & jboss which are giving me access to the jbpm-console, ok!
                4. Now, I have got uf-playground and jbom-playground, ok!

                 

                I don't know where to put my old 6.0 repos in the new 6.1 installation. I have seen there is a "repositories" folder in jbpm-installer. But nothing happens if I put them in there.

                • 5. Re: Catch java exceptions with a boundary error event
                  salaboy21

                  look for the .niogit directory inside the old installations. That directory contains the bare repositories that you can clone into a separate directories.

                  After that you can push them to a public repo in github that you can clone inside the new installation.