Page 148 -
P. 148

4  Dynamic Workflow                                              137
                           flexibility and exception handling management needs for a number of disparate
                           enactment engines that conform to the interface.
                              The interface requires a number of events and methods, some originating from
                           the service side and others from the engine side. Some require a response, while
                           others do not require any acknowledgment (such as event notifications that do not
                           necessarily require action).
                              This section describes the selection interface requirements. The event notifica-
                           tions that must be provided to the service by the engine are the following:
                             A work item is enabled event, where the engine notifies the service that a work
                              item is ready to be executed. The Worklet Service will use this event as a trigger
                              to query the rule set to discover if the enabled work item has a worklet reper-
                              toire and, if so, if one is appropriate to act as a substitute for the work item. If
                              an appropriate worklet is found, this event becomes the catalyst for a service
                              selection procedure. If an appropriate worklet is not found, the event is simply
                              ignored, allowing the work item to be executed in the default manner for the
                              engine. Since it is only necessary for an engine to notify the service if there may
                              be available worklets for a work item, the service-aware YAWL Engine would
                              allow tasks to be flagged as “service-enabled” and thus would operate more effi-
                              ciently than an engine that sent events for every enabled work item, although this
                              is not a necessary requirement of the enactment engine in general.
                             A work item is canceled event, which is necessary to accommodate the situation
                              where the service has substituted a worklet for a work item and the work item
                              is canceled (e.g., if it is a member of a cancelation region of the parent process
                              or if the parent process is canceled). In such cases, the service will need to take
                              appropriate action. Again, a service-aware engine would only generate this event
                              if the service has already substituted the work item with a worklet, but it is not a
                              necessary requirement of an enactment engine.
                             A process instance has completed event, which is required by the service so that
                              it is aware when a worklet instance completes to enable the finalization of the
                              substitution procedure and allow the parent process to continue to the next task.
                              Each of the events above do not require acknowledgments from the service back
                           to the originating engine – they are simply notifications from the engine that may or
                           may not be acted on.
                              In addition to the three events, a small number of interface methods are required
                           to be made available to the interface to enable the service to communicate with the
                           engine and take the appropriate action. The required methods are generic in their
                           nature and so would typically be available in most workflow enactment engines.
                           They are the following:
                             Connect to engine: A connection would typically be required through the inter-
                              face to enable messaging to pass between the engine and the Worklet Service.
                             Load specification: The service requires the ability to load a worklet speci-
                              fication into the enactment engine. Since a worklet may be represented as a
   143   144   145   146   147   148   149   150   151   152   153