Page 307 -
P. 307
11 The Worklet Service 303
Fig. 11.5 The worklet-enabled Order Fulfillment Payment subnet
Shipment Invoice task is worklet-enabled, it will be substituted at runtime with the
appropriate worklet based on the order data collected earlier in the process.
In this example, only the Issue Shipment Invoice task is worklet-enabled; the
other tasks will be handled directly by the YAWL environment.So, when an instance
of the Order Fulfillment process is executed, the Engine will notify the Worklet Ser-
vice when the Issue Shipment Invoice task becomes enabled. The Worklet Service
will then examine the data of the task and use it to determine which worklet to
execute as a substitute for the task.
As a worklet specification is a standard YAWL process specification, it is created
in the Editor in the usual manner. Figure 11.6 shows the trivial worklet to be substi-
tuted for the Issue Shipment Invoice top-level task when an order has been prepaid,
while Fig. 11.7 shows the only slightly more elaborate worklet that will be chosen
when the order has payment outstanding.
In themselves, there is nothing special about these worklets. Even though each
is considered by the Worklet Service as a member of the worklet repertoire for
the Issue Shipment Invoice task and may thus be considered a “worklet,” each also
remains a standard YAWL specification and as such may be executed directly by the
Engine without any reference to the Worklet Service, if desired.