Java Reference
In-Depth Information
Invoking a Partner Service from a BPEL Process
Problem
The whole point of defining a service orchestration is to invoke the web services that do the
actual work during the execution of the process. So, you now want to invoke a service from
within your BPEL.
Solution
Use the <invoke> activity.
Discussion
You can think of the <invoke> activity as being roughly analogous to calling a method on
another object from within a Java class. You have determined a flow that represents an over-
arching business process, such as Provision New Employee. You might have a web service
that sends a message to facilities to get the employee's physical workspace set up, and anoth-
er service that initiates some scripts within your IT infrastructure department to provision a
new workstation and create an LDAP account for her. Both of these services would be defined
as partner links in the process, and then invoked at the appropriate point using the <invoke>
activity.
NOTE
You can perform partner invocations either synchronously or asynchronously.
Here is the basic construct of an invoke, and how you might often see it used:
<invoke name="InvokeNewHire"
partnerLink="hr"
portType="employeePT"
operation="provisionNewHire"
inputVariable="newHire"
outputVariable="employee"
</invoke>
Let's break this up a bit:
Search WWH ::




Custom Search