4 Replies Latest reply on Dec 6, 2005 8:06 AM by ralfoeldi

    If my workflow blows up?

    pedrosacosta

      I've a question about bpm, but i don't know if this question is placed in the right forum.

      Suppose that I've a application who use a workflow that is running. For any reason, the machine shuts down. When I restart my workflow, the workflow starts from the last safe state that was left? Or, restarts from the beginning?

      If it's starts from the last safe state, this responsability belongs to the Jboss AS, Hibernate or to jBPM?

      Thanks

        • 1. Re: If my workflow blows up?
          ralfoeldi

          Hi Pedro(?)

          your workflow state will be in the state of the last successful commit(s).

          What gets lost are the active threads at the point of the crash, i.e. if some outside event triggered the execution you will have to make sure that these get picked up again.

          Two examples:

          User Interface: The user will see the 'old' tasks and have to trigger them again.
          JMS Messages: put the acceptance of the Message in the same transaction as the changes to the workflow state and the message will get redelivered.

          Does that answer your question?

          Greetings

          Rainer

          • 2. Re: If my workflow blows up?
            aguizar

            The jBPM programming model indicates signaling tokens within a transaction. If you do so, your workflow will move from a saved wait state to a new wait state.

            If the machine stops, ongoing transactions will not have a chance to commit, and your workflow will remain in the saved state. The application must, however, signal tokens to resume execution.

            • 3. Re: If my workflow blows up?
              pedrosacosta

               


              JMS Messages: put the acceptance of the Message in the same transaction as the changes to the workflow state and the message will get redelivered.


              I don't understand this example, could you explain in detail.

              Thanks

              • 4. Re: If my workflow blows up?
                ralfoeldi

                Hi Pedro,

                have a look at JMS Tutorial "Creating Robust JMS Applications" http://java.sun.com/products/jms/tutorial/1_3_1-fcs/doc/advanced.html.

                JMS Messages are one way of triggering transitions. Timers and user interaction are other common triggers.

                Rainer

                P.S.: There is no "built-in" JMS capability in jBPM at the moment. I think they're working on something in that direction. Search for asych in this forum.