org.yawlfoundation.yawl.engine.interfce.interfaceB
Class InterfaceB_EngineBasedClient

java.lang.Object
  extended by org.yawlfoundation.yawl.engine.interfce.Interface_Client
      extended by org.yawlfoundation.yawl.engine.interfce.interfaceB.InterfaceB_EngineBasedClient
All Implemented Interfaces:
ObserverGateway

public class InterfaceB_EngineBasedClient
extends Interface_Client
implements ObserverGateway

This interface announces specific Engine events to listening custom services

Author:
Lachlan Aldred Date: 22/01/2004 Time: 17:19:12, Michael Adams (refactored for v2.0, 06/2008 - 12/2008)

Field Summary
protected static org.apache.log4j.Logger _logger
           
 
Constructor Summary
InterfaceB_EngineBasedClient()
           
 
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 the cancellation of a case
 void announceCaseCompletion(Set<YAWLServiceReference> services, YIdentifier caseID, org.jdom.Document caseData)
          Called by engine to announce when a case is complete.
 void announceCaseCompletion(YAWLServiceReference yawlService, YIdentifier caseID, org.jdom.Document caseData)
          Called by engine to announce when a case is complete.
 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 when it has completed initialisation and is running
 void announceFiredWorkItem(YAnnouncement announcement)
          PRE: The work item is enabled.
 void announceTimerExpiry(YAnnouncement announcement)
          Announces a workitem timer expiry
 void announceWorkItemStatusChange(Set<YAWLServiceReference> services, YWorkItem workItem, YWorkItemStatus oldStatus, YWorkItemStatus newStatus)
          Notify of a change of status for a work item.
 void cancelWorkItem(YAWLServiceReference yawlService, YWorkItem workItem)
          Announces work item cancellation to the YAWL Service.
 YParameter[] getRequiredParamsForService(YAWLServiceReference yawlService)
          Returns an array of YParameter objects that describe the YAWL service being referenced.
 String getScheme()
          Indicates which protocol this shim services.
 void shutdown()
          Called by the engine to announce shutdown of the engine's servlet container
 
Methods inherited from class org.yawlfoundation.yawl.engine.interfce.Interface_Client
executeGet, executePost, prepareParamMap, setReadTimeout, stripOuterElement, successful
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_logger

protected static final org.apache.log4j.Logger _logger
Constructor Detail

InterfaceB_EngineBasedClient

public InterfaceB_EngineBasedClient()
Method Detail

getScheme

public String getScheme()
Indicates which protocol this shim services.

Specified by:
getScheme in interface ObserverGateway
Returns:
the scheme

announceFiredWorkItem

public void announceFiredWorkItem(YAnnouncement announcement)
PRE: The work item is enabled. announces a work item to a YAWL Service.

Specified by:
announceFiredWorkItem in interface ObserverGateway
Parameters:
announcement -

announceCancelledWorkItem

public void announceCancelledWorkItem(YAnnouncement announcement)
Description copied from interface: ObserverGateway
Called by the engine when a previously posted workitem has been cancelled.

Specified by:
announceCancelledWorkItem in interface ObserverGateway
Parameters:
announcement - the work item descriptors

cancelWorkItem

public void cancelWorkItem(YAWLServiceReference yawlService,
                           YWorkItem workItem)
Announces work item cancellation to the YAWL Service.

Parameters:
yawlService - the YAWL service reference.
workItem - the work item to cancel.

announceTimerExpiry

public void announceTimerExpiry(YAnnouncement announcement)
Announces a workitem timer expiry

Specified by:
announceTimerExpiry in interface ObserverGateway
Parameters:
announcement - the yawl service reference.

announceCaseSuspended

public 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.

Specified by:
announceCaseSuspended in interface ObserverGateway
Parameters:
services - the set of services currently registered with the engine
caseID - the identifier of the suspended case

announceCaseSuspending

public 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.

Specified by:
announceCaseSuspending in interface ObserverGateway
Parameters:
services - the set of services currently registered with the engine
caseID - the identifier of the suspending case

announceCaseResumption

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

Specified by:
announceCaseResumption in interface ObserverGateway
Parameters:
services - the set of services currently registered with the engine
caseID - the identifier of the suspended case

announceWorkItemStatusChange

public void announceWorkItemStatusChange(Set<YAWLServiceReference> services,
                                         YWorkItem workItem,
                                         YWorkItemStatus oldStatus,
                                         YWorkItemStatus newStatus)
Notify of a change of status for a work item.

Specified by:
announceWorkItemStatusChange in interface ObserverGateway
Parameters:
workItem - that has changed
oldStatus - previous status
newStatus - new status
services - the set of services currently registered with the engine

announceCaseStarted

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

Specified by:
announceCaseStarted in interface ObserverGateway
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

public void announceCaseCompletion(Set<YAWLServiceReference> services,
                                   YIdentifier caseID,
                                   org.jdom.Document caseData)
Called by engine to announce when a case is complete.

Specified by:
announceCaseCompletion in interface ObserverGateway
Parameters:
caseID - the case that completed
caseData - the output data of the case
services - the set of services currently registered with the engine

announceCaseCompletion

public void announceCaseCompletion(YAWLServiceReference yawlService,
                                   YIdentifier caseID,
                                   org.jdom.Document caseData)
Called by engine to announce when a case is complete.

Specified by:
announceCaseCompletion in interface ObserverGateway
Parameters:
yawlService - the yawl service
caseID - the case that completed
caseData - the output data of the case

announceEngineInitialised

public void announceEngineInitialised(Set<YAWLServiceReference> services,
                                      int maxWaitSeconds)
Called by the engine when it has completed initialisation and is running

Specified by:
announceEngineInitialised in interface ObserverGateway
Parameters:
services - a set of custom services to receive the announcement
maxWaitSeconds - the maximum seconds to wait for services to be contactable

announceCaseCancellation

public void announceCaseCancellation(Set<YAWLServiceReference> services,
                                     YIdentifier id)
Called by the engine to announce the cancellation of a case

Specified by:
announceCaseCancellation in interface ObserverGateway
Parameters:
services - a set of custom services to receive the announcement
id - the case id of the cancelled case

shutdown

public void shutdown()
Called by the engine to announce shutdown of the engine's servlet container

Specified by:
shutdown in interface ObserverGateway

getRequiredParamsForService

public YParameter[] getRequiredParamsForService(YAWLServiceReference yawlService)
                                         throws IOException,
                                                org.jdom.JDOMException
Returns an array of YParameter objects that describe the YAWL service being referenced.

Parameters:
yawlService - the YAWL service reference.
Returns:
an array of YParameter objects.
Throws:
IOException - if connection problem
org.jdom.JDOMException - if XML content problem.


Copyright © 2004-2012 The YAWL Foundation.