How to Call a Virtualized Service from a Process
A virtualized service is a web service provided by an application that is hosted in the BPM runtime. (For information on calling a web service that is not hosted in the BPM runtime, see the tutorial How to Call an External Web Service from a Process.)
The application being called to provide the service can itself be another BPM process that is exposing one or more service operations, or can be an SOA application. In this tutorial, the service provider is a BPM process.
This tutorial example is a simple request and response service. The consumer project requests data—in this simple example, a forename and a surname—from the user and passes it to the service provider. The provider processes that data (in this case, concatenates the two data strings into a name) and returns it to the consumer process.
You should work through each section in turn to complete the tutorial.
A business process (acting as a service consumer) can invoke services provided by other BPM processes or SOA applications (service providers).
An abstract WSDL document that defines the service is provided by the service provider.
Prerequisites
You should be familiar with the basics of designing, implementing and deploying process-based applications using TIBCO Business Studio. If you are not familiar with these things, you should run through the following tutorials before attempting this one:
- Importing the Organization Model
A participant in the service consumer project in this tutorial references an organization model. The organization model must be available in your TIBCO Business Studio workspace, and later must be deployed to your BPM runtime. - Creating the Service Provider Project
First create the project that will provide the virtual service. This can be a BPM or an SOA project. This tutorial uses a BPM project. - Creating the Business Objects in the Provider Project
The business model for the service provider project contains business objects that represent the request and response passed by the service. - Defining the Business Process in the Provider Project
Rename and configure the business process. - Defining the Provider Project Parameters
You need to define the parameters used by the service provider project. - Defining the Task Script
A script defines how the data entered by the user is processed. - Creating the Service Consumer Project
Create the second BPM project that will consume the virtual service. - Defining the Consumer Business Process
Defining the business process in the service consumer project consists of a number of subtasks. - Checking the System Participant
When you assign an abstract WSDL to a service task TIBCO Business Studio automatically creates a system participant and assigns it to the service task. - Mapping the Parameters in the Consumer Process
You must define mappings between the input and output parameters. - Deploying the Projects
You must deploy the provider project before the consumer project. - Testing the Application
You can now test the application by running an instance of it in Workspace or Openspace. The ServiceConsumer application will call the service from the ServiceProvider. - Installing the Tutorial Solution
The solution to the tutorial is provided in the TIBCO Business Studio installation. You can import it into TIBCO Business Studio.