You can use an external implementation service when you
want a step in your process to be handled by an application outside
of IBM® Business
Process Manager.
For example, you created your own user interface for your users that
you would prefer to use instead of IBM Process
Portal.
So you create an external implementation service to call your own
interface.
About this task
When a step in a business process is implemented with
an external implementation service, the business process halts and
waits for input from the external application. The process resumes
execution when the task is finished by the external implementation
that uses a web or REST service. To create an external implementation
with Web APIs, see Using the web service API in IBM BPM.
To create an external implementation with REST APIs, these articles
are helpful: Using the REST APIs in IBM Business Process Manager and Integrating a business process application with an
external system using the REST API. Also, see REST API programming for BPDs and BPEL processes.
An external implementation
service is created; it cannot be discovered.
You can start
creating an external implementation in these ways:
- Beside Services in the library navigation,
click + and select External Service.
- In the Process editor, select a User
Task or System Task activity. In
the Implementation tab for the user task or
system task, select New.
Then, continue to develop you external implementation with these
steps:
Procedure
- In the New External Service wizard,
enter a name for your service, and click Finish.
- A basic external implementation service is created with
no operations. You should create at least one operation. If your external
implementation provides an interface in which a manager can either
approve or reject an expense report, you might further revise the
operation. You might include input parameters for the expense report
data and output parameters for the decision that the manager makes
and the justification for the decision. The input and output parameters
define the dynamic data for the operation. These parameters would
be different for each process instance or environment. You cannot
add faults.
In the Details section,
the name is shown and you can add a description.
- If you select Binding for an operation,
you see that your service has an External implementation binding
type. If you select an operation, you see sections for the properties
used in creating an external implementation of an operation. The sections
are as follows:
- URL Template (Required for Process Portal):
Add the URL to the external implementation you want to use. When a
user opens a task in Process Portal, the
URL template is used to call the appropriate external implementation.
To include runtime information, such as the task local and environment
context, use replacement variables that are surrounded by curly brackets
in the URL Template text. Process Portal automatically
appends the REST URL to the restUrlPrefix parameter
to indicate where task related operations can be performed.
Tip: To ensure that the external implementation can identify
the current task, it is a good idea to include the task ID in the
URL template. For example,
/MyExternalApp/ExternalImpl.jsp?taskId={tw.system.task_id}&lastName={tw.local.lastName}
- Ajax Services: Select the check box Authorize
Ajax services and select the services in IBM BPM that
you want to allow the external implementation to use. Clearing the
check box disables the runtime authorization check, which means any
Ajax service in IBM BPM can be
used by the external implementation.
- Custom Properties: Add the properties in
name-value pairs to identify and run the external implementation.
These properties are static configuration values to be queried by
the external implementation. For example, you might add the external
application name or system ID to find the implementation. You can
add properties with special meaning. For example, the name url might
be used with a value for the actual URL such as http://mysite.com
....
- Implement all the operations for your service.
- Click Save or Finish
Editing.
Results
After your service is created, you can select it as an
implementation of a system task in a process. Select the operation
that you want to use from the operation drop-down list. See Creating a process.