2 Replies Latest reply on Dec 4, 2006 8:56 AM by cpob

    Never ending processes

    jpuro

      I am tasked with creating a business process that starts up, checks if a file is ready for parsing, and then if it is, parses the file. If no file is available for parsing, it should keep checking for the file. So essentially there are 5 nodes here:

      1) Start Node

      2) Check for File Node

      3) Decision Node (transition to parse node if file exists, transition to check for file node if file does not exist)

      4) Parse File Node

      5) End Node

      The question that I have is, in a process like this, which keeps looping back to "Check for File" if there is no file available, should it ever end? My question is a general one, should a business process ever be non ending? That is, should "Parse File Node" return to "Check for File Node" even after it is finished doing its work. Should the end node never be called in a business process like this?

      Or should a business process always startup and eventually end. So instead of the "Decision Node" transitioning back to "Check for File Node" when a file is not found, should it transition to the "End Node" and thus require an outside system to re-instantiate a new process instance every X frequency.

      Regards,

      Jeff

        • 1. Re: Never ending processes
          kukeltje

          Personally, although I like jBPM a lot, would do this with an esb or other solution.

          • 2. Re: Never ending processes
            cpob

            I think it is honestly how *you* want it to work.

            Both scenarios you mention (never-ending or ending to be later restarted) are easily supported, and just depends with what code you want to put in place in front of jBPM.

            Even if you support your 2nd scenario, anyone designing a flow could always put endless loops into it.