0 Replies Latest reply on Jul 22, 2013 11:38 AM by moraleslos

    Camel or regular bean (best practice question)

    moraleslos

      I've been developing an integration that, in one service method, invokes 2 or more external services and aggregates the returned data which gets sent back to the client.  All of this is done through the bean using java.  For example, I have a service that is invoked by a client whose bean implementation looks something like this:

       

      public AggregateData retrieveAggregateData(ItemInfo item) {
           Data1 data1 = callExternalRestService1(item.getStock());
           Data2 data2 = callExternalRestService2(item.getQuantity());
      
         // process datum and aggregate
          return new AggregateData(data1, data2);
      }
      

       

      I was wondering if there was another way-- maybe a better or recommended way-- to do this in SY?  I looked over Camel but am not sure if this fits my requirement. I don't know if BPEL is even useful in this scenario.  Just curious.  TIA.