Exposing a Process as a Service
This tutorial shows you how to create a business process that is exposed as a service in the BPM runtime. The process:
- Accepts a user’s name as an input message from a client application.
- Runs a script to generate a welcome greeting that contains the user’s name.
- Returns the greeting in an output message to the client application.
You should work through each section in turn to complete the tutorial.
A process (acting as a service supplier) can expose service operations that can be invoked by other processes or applications (service consumers).
The process in this tutorial exposes a request-response operation to receive a message from, then return a response to, a calling application or process.
The WSDL document that defines the request-response operation is provided by the process:
- The abstract WSDL is automatically generated by TIBCO Business Studio.
- You can generate the concrete WSDL from the Administrator interface in the BPM runtime then provide it to client application developers.
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:
- Creating a WelcomeUsersService Project
Use the New BPM Developer Project wizard to create a WelcomeUsersService project. - Configuring the Start Event to Receive a Message From a Client
When a process is exposing a request-response operation, the start event defines the request (Input) message which, when received from a client, will start the process. The start event must be configured as a message trigger type. - Configuring the End Event to Return a Message to the Client
When a process is exposing a request-response operation, the end event defines the response (Output) message which will be returned to the client when the process ends. - Defining the Data Inputs to and Outputs from the Process
Formal Parameters must be used to define the inputs to and outputs from the process. - Creating a Script to Generate the Welcome Greeting
The WelcomeUsersService process does not do anything complex between its start and end events. It simply runs a script that: - Deploying the Application
This step assumes that you have created the XYZ Work Server1 Deployment Server, as described in the How to Implement and Deploy the WelcomeUsers Application tutorial; and that the server is connected. - Generating the WSDL
Developers of client applications who want to use the WelcomeUsers service will need a concrete WSDL to be able to access the application. You can generate this WSDL from the Administrator interface in the BPM runtime. - Testing the Application
The WelcomeUsers service can now be invoked (using the WelcomeUsersService.wsdl file) from another process or SOA application running in the BPM runtime, or from an external application.