org.yawlfoundation.yawl.engine.interfce.interfaceB
Interface InterfaceBClient

All Known Implementing Classes:
YEngine

public interface InterfaceBClient

Defines the 'B' interface into the YAWL Engine corresponding to WfMC interfaces 2+3 - Workflow client applications and invoked applications.

Author:
Andrew Hastie Creation Date: 10-Jun-2005

Method Summary
 String allocateCaseID()
          Returns the next available caseID to be used when launching a new case where this is required to be known via the launch request.
 void checkElegibilityToAddInstances(String workItemID)
           
 void completeWorkItem(YWorkItem workItem, String data, String logPredicate, YEngine.WorkItemCompletion flag)
           
 YWorkItem createNewInstance(YWorkItem workItem, String paramValueForMICreation)
           
 Set<YWorkItem> getAllWorkItems()
          Returns a set of all work items, regardless of state, from the engine.
 Set<YWorkItem> getAvailableWorkItems()
          Returns a set of all availkable workitems from the engine.
 String getCaseData(String caseID)
          Returns an XML representation of the current net data of the case corresponding to caseID.
 Set getChildrenOfWorkItem(YWorkItem workItem)
           
 YTask getTaskDefinition(YSpecificationID specificationID, String taskID)
          Returns the task definition, not the task instance.
 YWorkItem getWorkItem(String workItemID)
           
 String launchCase(YSpecificationID specID, String caseParams, URI completionObserver, String caseID, YLogDataItemList logData, String serviceHandle, boolean delayed)
          Starts an instance of a specification (known as a 'case') within the engine.
 String launchCase(YSpecificationID specID, String caseParams, URI completionObserver, YLogDataItemList logData)
          Starts an instance of a specification (known as a 'case') within the engine.
 void registerInterfaceBObserver(InterfaceBClientObserver observer)
          Register an InterfaceB client with the engine in order to receive callbacks.
 void registerInterfaceBObserverGateway(ObserverGateway gateway)
          Registers an InterfaceB Observer Gateway with the engine in order to receive callbacks.
 void rollbackWorkItem(String workItemID)
           
 YWorkItem startWorkItem(YWorkItem workItem, YClient client)
           
 YWorkItem suspendWorkItem(String workItemID)
           
 

Method Detail

registerInterfaceBObserver

void registerInterfaceBObserver(InterfaceBClientObserver observer)
Register an InterfaceB client with the engine in order to receive callbacks.

Parameters:
observer -

registerInterfaceBObserverGateway

void registerInterfaceBObserverGateway(ObserverGateway gateway)
                                       throws YAWLException
Registers an InterfaceB Observer Gateway with the engine in order to receive callbacks.

Parameters:
gateway -
Throws:
YAWLException

getAvailableWorkItems

Set<YWorkItem> getAvailableWorkItems()
Returns a set of all availkable workitems from the engine.

Returns:
Set of available work items

getAllWorkItems

Set<YWorkItem> getAllWorkItems()
Returns a set of all work items, regardless of state, from the engine.

Returns:
Set of work items

startWorkItem

YWorkItem startWorkItem(YWorkItem workItem,
                        YClient client)
                        throws YStateException,
                               YDataStateException,
                               YQueryException,
                               YPersistenceException,
                               YEngineStateException
Throws:
YStateException
YDataStateException
YQueryException
YPersistenceException
YEngineStateException

completeWorkItem

void completeWorkItem(YWorkItem workItem,
                      String data,
                      String logPredicate,
                      YEngine.WorkItemCompletion flag)
                      throws YStateException,
                             YDataStateException,
                             YQueryException,
                             YPersistenceException,
                             YEngineStateException
Throws:
YStateException
YDataStateException
YQueryException
YPersistenceException
YEngineStateException

rollbackWorkItem

void rollbackWorkItem(String workItemID)
                      throws YStateException,
                             YPersistenceException,
                             YLogException
Throws:
YStateException
YPersistenceException
YLogException

suspendWorkItem

YWorkItem suspendWorkItem(String workItemID)
                          throws YStateException,
                                 YPersistenceException,
                                 YLogException
Throws:
YStateException
YPersistenceException
YLogException

getWorkItem

YWorkItem getWorkItem(String workItemID)

getCaseData

String getCaseData(String caseID)
                   throws YStateException
Returns an XML representation of the current net data of the case corresponding to caseID.

Parameters:
caseID - to retrieve net data of
Returns:
XML representation of the net
Throws:
YStateException

launchCase

String launchCase(YSpecificationID specID,
                  String caseParams,
                  URI completionObserver,
                  YLogDataItemList logData)
                  throws YStateException,
                         YDataStateException,
                         YPersistenceException,
                         YEngineStateException,
                         YLogException,
                         YQueryException
Starts an instance of a specification (known as a 'case') within the engine.

Parameters:
specID - the specification id.
caseParams - the XML string of the case params (can be null).
completionObserver - the observer for completion events (can be null).
Returns:
the caseid of the started case
Throws:
YStateException
YDataStateException
YPersistenceException
YEngineStateException
YLogException
YQueryException

launchCase

String launchCase(YSpecificationID specID,
                  String caseParams,
                  URI completionObserver,
                  String caseID,
                  YLogDataItemList logData,
                  String serviceHandle,
                  boolean delayed)
                  throws YStateException,
                         YDataStateException,
                         YPersistenceException,
                         YEngineStateException,
                         YLogException,
                         YQueryException
Starts an instance of a specification (known as a 'case') within the engine.

Parameters:
specID - the specification id.
caseParams - the XML string of the case params (can be null).
completionObserver - the observer for completion events (can be null).
caseID - The case identifier to use (not supported in a persisting engine)
Returns:
the caseid of the started case
Throws:
YStateException
YDataStateException
YPersistenceException
YEngineStateException
YLogException
YQueryException

allocateCaseID

String allocateCaseID()
                      throws YPersistenceException
Returns the next available caseID to be used when launching a new case where this is required to be known via the launch request.

Returns:
A unique CaseID which can be used to start a new case.
Throws:
YPersistenceException

checkElegibilityToAddInstances

void checkElegibilityToAddInstances(String workItemID)
                                    throws YStateException
Throws:
YStateException

createNewInstance

YWorkItem createNewInstance(YWorkItem workItem,
                            String paramValueForMICreation)
                            throws YStateException,
                                   YPersistenceException
Throws:
YStateException
YPersistenceException

getChildrenOfWorkItem

Set getChildrenOfWorkItem(YWorkItem workItem)

getTaskDefinition

YTask getTaskDefinition(YSpecificationID specificationID,
                        String taskID)
Returns the task definition, not the task instance.

Parameters:
specificationID - the specification id
taskID - the task id
Returns:
the task definition object.


Copyright © 2004-2012 The YAWL Foundation.