Using a Process as a Service Provider and as a Service Consumer

A process is not limited to acting just as a service provider or service consumer. You can combine any of these operations within a process to achieve whatever results you need from the process logic. Thus, a process may be at one point a service consumer, at the next a service provider, and at a third may be both supplier and consumer.

A Process Providing and Consuming Web Services shows an example in which a process provides a loan application service to an external application, and makes use of an external web service to obtain the decision on the application.

A Process Providing and Consuming Web Services

The process does the following:

  • receives the request from the external application ().
  • initiates a user task to perform some initial processing of the application.
  • calls an external loan application processing web service to obtain a decision on whether the loan is approved or refused ().
  • initiates a user task to perform some processing of the response.
  • sends the response back to the external application ().

Note that:

  • Because the user tasks between points and are arbitrary length tasks, the process uses separate one-way operations to provide the service to the external application.
  • As part of the conversation formed by the one-way operations, the process uses a request-response operation to obtain the decision on the application from the loan application processing web service.
  • The process acts as:
    1. a service provider when it receives the request from the external application,
    2. a service consumer when it obtains the decision from the loan application processing web service.
    3. a service consumer when it returns the response to the external application.

      In each case, it is the service provider who provides the WSDL document that defines the messages that are exchanged in each operation.