org.yawlfoundation.yawl.engine
Interface ObserverGateway

All Known Implementing Classes:
InterfaceB_EngineBasedClient

public interface ObserverGateway

Interface to be implemented by 'shim' classes which register with the engine to receive callbacks when tasks are posted and cancelled.

Author:
Andrew Hastie Creation Date: 23-Aug-2005

Method Summary
 void announceCancelledWorkItem(YAnnouncement announcement)
          Called by the engine when a previously posted workitem has been cancelled.
 void announceCaseCancellation(Set<YAWLServiceReference> services, YIdentifier id)
          Called by the engine to announce a case has been cancelled.
 void announceCaseCompletion(Set<YAWLServiceReference> services, YIdentifier caseID, org.jdom.Document caseData)
          Called by engine to announce when a case is complete and a completion observer was not specified at case launch.
 void announceCaseCompletion(YAWLServiceReference yawlService, YIdentifier caseID, org.jdom.Document caseData)
          Called by engine when a case is complete and a completion observer was specified at case launch.
 void announceCaseResumption(Set<YAWLServiceReference> services, YIdentifier caseID)
          Called by the engine to announce when a case resumes from a previous 'suspending' or 'suspended' state.
 void announceCaseStarted(Set<YAWLServiceReference> services, YSpecificationID specID, YIdentifier caseID, String launchingService, boolean delayed)
          Called by engine to announce when a case has commenced.
 void announceCaseSuspended(Set<YAWLServiceReference> services, YIdentifier caseID)
          Called by the engine to announce when a case suspends (i.e.
 void announceCaseSuspending(Set<YAWLServiceReference> services, YIdentifier caseID)
          Called by the engine to announce when a case starts to suspends (i.e.
 void announceEngineInitialised(Set<YAWLServiceReference> services, int maxWaitSeconds)
          Called by the engine to notify that it has completed initialisation and is running.
 void announceFiredWorkItem(YAnnouncement announcement)
          Called by the engine when a new workitem gets enabled.
 void announceTimerExpiry(YAnnouncement announcement)
          Called by the engine when a timer for a workitem expires.
 void announceWorkItemStatusChange(Set<YAWLServiceReference> services, YWorkItem workItem, YWorkItemStatus oldStatus, YWorkItemStatus newStatus)
          Called by the engine to notify of a change of status for a work item.
 String getScheme()
          Gets the scheme part of the url of an implementing gateway.
 void shutdown()
          Called when the Engine is shutdown (servlet destroyed); the observer gateway should to do its own finalisation processing.
 

Method Detail

getScheme

String getScheme()
Gets the scheme part of the url of an implementing gateway.

Returns:
the scheme of the gateway

announceFiredWorkItem

void announceFiredWorkItem(YAnnouncement announcement)
Called by the engine when a new workitem gets enabled.

Parameters:
announcement - the work item descriptors

announceCancelledWorkItem

void announceCancelledWorkItem(YAnnouncement announcement)
Called by the engine when a previously posted workitem has been cancelled.

Parameters:
announcement - the work item descriptors

announceTimerExpiry

void announceTimerExpiry(YAnnouncement announcement)
Called by the engine when a timer for a workitem expires.

Parameters:
announcement - the work item descriptors

announceCaseCompletion

void announceCaseCompletion(YAWLServiceReference yawlService,
                            YIdentifier caseID,
                            org.jdom.Document caseData)
Called by engine when a case is complete and a completion observer was specified at case launch.

Parameters:
yawlService - the yawl service nominated as the completion observer
caseID - the case that completed
caseData - the output data of the case

announceCaseStarted

void announceCaseStarted(Set<YAWLServiceReference> services,
                         YSpecificationID specID,
                         YIdentifier caseID,
                         String launchingService,
                         boolean delayed)
Called by engine to announce when a case has commenced.

Parameters:
services - the set of registered custom services
specID - the specification id of the started case
caseID - the case that has started
launchingService - the service that started the case
delayed - true if this is a delayed case launch, false if immediate

announceCaseCompletion

void announceCaseCompletion(Set<YAWLServiceReference> services,
                            YIdentifier caseID,
                            org.jdom.Document caseData)
Called by engine to announce when a case is complete and a completion observer was not specified at case launch. This announcement is sent to all services on all registered gateways.

Parameters:
services - the set of services currently registered with the engine
caseID - the case that completed
caseData - the output data of the case

announceCaseSuspended

void announceCaseSuspended(Set<YAWLServiceReference> services,
                           YIdentifier caseID)
Called by the engine to announce when a case suspends (i.e. becomes fully suspended as opposed to entering the 'suspending' state).

Parameters:
services - the set of services currently registered with the engine
caseID - the identifier of the suspended case

announceCaseSuspending

void announceCaseSuspending(Set<YAWLServiceReference> services,
                            YIdentifier caseID)
Called by the engine to announce when a case starts to suspends (i.e. enters the suspending state as opposed to entering the fully 'suspended' state).

Parameters:
services - the set of services currently registered with the engine
caseID - the identifier of the suspending case

announceCaseResumption

void announceCaseResumption(Set<YAWLServiceReference> services,
                            YIdentifier caseID)
Called by the engine to announce when a case resumes from a previous 'suspending' or 'suspended' state.

Parameters:
services - the set of services currently registered with the engine
caseID - the identifier of the suspended case

announceWorkItemStatusChange

void announceWorkItemStatusChange(Set<YAWLServiceReference> services,
                                  YWorkItem workItem,
                                  YWorkItemStatus oldStatus,
                                  YWorkItemStatus newStatus)
Called by the engine to notify of a change of status for a work item.

Parameters:
services - the set of services currently registered with the engine
workItem - that has changed
oldStatus - previous status
newStatus - new status

announceEngineInitialised

void announceEngineInitialised(Set<YAWLServiceReference> services,
                               int maxWaitSeconds)
Called by the engine to notify that it has completed initialisation and is running.

Parameters:
services - the set of services currently registered with the engine
maxWaitSeconds - the maximum amount of time to wait attempting to contact the services managed by the gateway before giving up

announceCaseCancellation

void announceCaseCancellation(Set<YAWLServiceReference> services,
                              YIdentifier id)
Called by the engine to announce a case has been cancelled.

Parameters:
services - the set of services currently registered with the engine
id - the identifier of the cancelled case

shutdown

void shutdown()
Called when the Engine is shutdown (servlet destroyed); the observer gateway should to do its own finalisation processing.



Copyright © 2004-2012 The YAWL Foundation.