4 Replies Latest reply on May 24, 2007 12:09 PM by Burr Sutter

    ESB re-routing

    mike peyvandi Newbie

      What is the best approach to exit the series of actions in a service pipeline, i.e. wait for some data to be available in another thread, and continue the actions later on where you were left off upon some conditions?

      Here is an example:
      serviceOne:
      action One: Add a test to message
      action Two: read some data from database and add it to message
      action Three: print the message

      Suppose in performing action Two, data is not available yet. I would like to put the message in a queue and wait till being notified of data availability. Upon notification I want to continue from action Two.

        • 1. Re: ESB re-routing
          Kurt Stam Master

          I think you do a lot with routing here. Don't use action pipelining, but if no data is available, route to a wait service (which would be custom) which waits till data comes available. Then forward to service three.

          --Kurt

          • 2. Re: ESB re-routing
            Mark Little Master

            Just seconding Kurt: the Action chaining is really within a single service, so a specific capability (or set). What you describe seems like 3 different components (clients or services) within the ESB.

            • 3. Re: ESB re-routing
              mike peyvandi Newbie

              Thanks for the reply, so quick!!
              So, I try to create 3 services. In ServiceOne I create a rule to forward the message to either ServiceTwo (if data is ready) or WaitService (if data is not ready).

              Two questions:
              1 - A new call to service One wil create a new thread, which is independent from the first call. Is that correct?
              2 - How can I define another service to notify the WaitService when the data is ready? i.e. using Notifier class !

              • 4. Re: ESB re-routing
                Burr Sutter Master

                How about the new BPM feature in 4.2 MR2?

                The docs are incomplete as are the examples but it should give you what you are looking for. Plus, it will survive server reboots.