Page 173 -
P. 173

5  Exception Handling                                           163
                             Check constraints events, which notify the service at the launch and comple-
                              tion of each process instance, and at the enabling and completion of each work
                              item – thus, four unique constraint type events are required. The service uses
                              these events to check whether constraint rules have been violated, using avail-
                              able contextual data, and if so, launch the corresponding exlet for that constraint
                              type. Therefore, the constraint event types do not notify of exception per se,but
                              are checkpoints that allow the service to determine if a constraint violation has
                              occurred.
                             A time-out event, which would notify the service when a deadline has been
                              reached, allowing the service to take the appropriate action, if necessary.
                             Unavailable resource, item abort,and constraint violation during execution
                              events. For these event types, the enactment engine must determine if and when
                              these exceptions occur, as opposed to those above where the determination rests
                              with the Worklet Service.
                             Case canceled event, required so that the service can take the appropriate action if
                              a worklet instance, or a parent instance for which a worklet is currently executing
                              as a compensation, is canceled. Note that a case canceled event is different from
                              a case completed event described in Chap. 4.
                              The following methods are specifically required to be available to the interface
                           for the exception handling service (existing methods of other interfaces are also
                           used):
                             Suspend work item: To pause or prevent the execution of a work item, until
                              such time as it is continued (unsuspended). Through this method, entire process
                              instances may also be suspended, by suspending each “active” work item of the
                              process instance as a list.
                             Continue work item: To unsuspend a previously suspended work item, or unsus-
                              pend each suspended work item for a previously suspended process instance.
                             Update work item data: For those situations where a worklet has been run as
                              a compensation process for a work item that has generated an exception, this
                              method would enable any data gathered during the compensation execution to be
                              passed back to the original work item.
                             Update case data: As above, but for case-level exceptions as opposed to work
                              item-level exceptions.
                             Restart, cancel, force-complete, fail work item: To perform an action as specified
                              in an exlet definition.

                              Figure 5.8 shows the interface requirements for the exception handling proce-
                           dures of the Worklet Service (see also Fig. 4.4).




                           5.4.3 Exception Handling Types and Primitives

                           To recap, there are several different types of exception that may occur during the
                           life of a YAWL process instance. At various points, constraints may be checked
   168   169   170   171   172   173   174   175   176   177   178