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.
- Importing the WSDL that Defines the Required BPM Service
See the BPM Developer’s Guide for detailed information about the services and operations provided by the BPM runtime, and the WSDLs and XSDs needed to access them. - Configuring the Web Service Call
You must use a web service task to call a BPM service. - Configuring Input Parameters
You must create and/or initialize suitable data fields and map them to the appropriate input parameters. - Processing Output Data
You must create and/or initialize suitable data fields and map them to the appropriate output parameters. - Configuring Shared Resources to Call the BPM Service
You must create an HTTP Client resource instance that the process can use to call the BPM service. - Configuring Shared Resources to Identify the Calling User
The diagram shows the shared resources that you need to configure to identify the calling user to the BPM runtime for authentication (by inserting the appropriate web security token in the SOAP header of the outgoing message). - Deploying and Testing the callLookupUser Application
You should be able to deploy and successfully run the callLookupUser application.
Copyright © Cloud Software Group, Inc. All rights reserved.