How to Call a BPM Runtime Service from a Process

This tutorial shows you how to call a service provided by the BPM runtime from a BPM process.

The tutorial demonstrates:

  • how to identify and obtain the WSDL for the BPM service that you want to call.
  • how to call a particular operation provided by a BPM service.
  • how to identify and prepare the data to be sent to the BPM service.
  • how to process data returned by the BPM service.
  • how to ensure that the call satisfies the authentication and authorization requirements needed to access a BPM service.

Prerequisites

You should be familiar with the topics:

  • calling secured web services over SOAP/HTTP
  • the services and operations provided by the BPM API
  • creating shared resources using the Administrator interface in the BPM runtime.

See the following references for more information:

  • How to Call an External Web Service From a Process
  • How to Call a Secured External Web Service From a Process
  • BPM Developer’s Guide

Before You Start

Import the callLookupUser project into your workspace from the location where you installed TIBCO Business Studio. (This is an archived project, for example, STUDIO_HOME\studio\3.n\samples\callLookupUser.zip).

The callLookupUser project contains the following process.

This is a business service which can be used to find and display a user’s Global Unique IDentifier (GUID).

Note: Error markers are displayed on some steps in the process. As you perform the tutorial tasks these error markers will disappear.

When you start the business service, it:

  • displays a form in which you should enter a user’s login name.
  • initializes the data required by the lookupUser request message.
  • calls the lookupUser operation, provided by the EntityResolverService in the BPM runtime.
  • extracts the user’s GUID from the lookupUser response message.
  • displays another form showing the user’s name and GUID.
Note: This is a deliberately simplistic scenario and displaying a user’s GUID is not intended to be, of itself, particularly useful. However:
  • It demonstrates the essential requirements of making a call to any BPM service.
  • A user’s GUID is required as an input parameter to many other operations provided by the BPM runtime - for example, if you use the getWorkListItems operation to get a user’s work list. You may want to call lookupUser as part of a sequence of calls to achieve a particular business result.