Design Help

Hello Experts

How can I call 3 web services simultaneously(concurrent thread) in webMethods. The requirement is also to gather the web service response and insert the same to DB.

How to achieve this.

Kind Regards
Sasa

Hi Sasanka,

one option I think of is the following:

  • publish 3 doc types to Messaging
  • for each of them have a trigger for flow service which in turn calls the web service and publish a doc type at the end
  • have a trigger subscribing to the 3 response doc types using AND join which starts a flow service for the db insert.

Is this what you were looking for?

Which version of wM are you using?

Regards,
Holger

The client is mostly using Mule for scatter-gather integration pattern for scenarios like this. They want to replicate the same design pattern in webMethods.

We are in 9.9 version.

Regards
Sasa

While there is no built-in mechanism - we have solved scatter gather couple of times using publishAndwait with async.
i

The IS API com.wm.app.b2b.server.Service.doThreadInvoke() may be another possible option for you to explore.

In the YMMV category, check to see if this approach is really worthwhile. More often than not, making things async slows down processing rather than speeds it up. For background processes, where no user is waiting, the time saved is usually a “don’t care” item. The bottom line is to confirm that the added complexity is offset by added value (e.g. reduced processing time that matters in some way).

1 Like