Page 224 -
P. 224
7 The Architecture 217
listeners). A further exception type, the external exception, is triggered not via Inter-
face X, but by the environment (e.g., via an administrator interacting with a web
form). The Worklet Service is described in more detail in Chap. 11.
7.3.5 Web Service Invoker Service
As mentioned earlier, automated work items need to be routed to software appli-
cations. It is common nowadays to expose software applications as SOAP web
services. The interface and binding information of such web services is normally
captured using the Web Service Description Language (WSDL). The Web Service
(WS) Invoker Service provides a mediation layer between the Engine and external
SOAP web services. In this way, a task can be associated with an operation of a
SOAP web service at design-time, and at runtime work items associated to this task
are routed to the corresponding SOAP web service through the WS-Invoker. With-
out this layer, a Custom Service would have to be developed between each SOAP
web service and the Engine.
Architecturally, the WS-Invoker Service is quite straightforward. It listens for
EnabledWorkItemEvent notifications on Interface B, which occur for tasks that have
been linked with the WS-Invoker Service at design time. Upon receiving such an
event, the Invoker checks out the work item and uses its data to call the specified web
service. When a reply is received from the service, the work item’s output data is
populated and the work item is checked back into the Engine. All of the interactions
between the Invoker Service and the Engine are thus through Interface B.
For a task to be registered with the Invoker Service, its data inputs require that
values for three attributes be defined at design-time:
YawlWSInvokerWSDLLocation: specifies the URI of the WSDL file describing
the web service to invoked
YawlWSInvokerPortName: specifies the port binding that the web service listens
on for interaction with external clients and protocols
YawlWSInvokerOperationName: specifies the name of the operation to be exe-
cuted within the web service
In addition, any parameters that are required for the web service’s operation
must also be specified within the task definition; these are passed to the web ser-
vice on invocation. The Invoker Service returns a mapping of resultant data to the
work item’s output data parameters. Note that when a task is registered with the
Invoker Service at design time, the Editor automatically populates the task’s input
parameters with the required data attributes above.
At present, the WS-Invoker Service supports only SOAP over HTTP and request-
response and one-way interactions (out-in and out-only message exchange patterns).
It is expected that future versions of the WS-Invoker will support other protocols and
possibly other message exchange patterns.