|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.yawlfoundation.yawl.engine.interfce.interfaceB.InterfaceBWebsideController
public abstract class InterfaceBWebsideController
An abstract class designed to be implemented by YAWL custom services. It provides access to, and receives event notifications from, the Engine via Interface B.
| Field Summary | |
|---|---|
protected IBControllerCache |
_ibCache
|
protected InterfaceB_EnvironmentBasedClient |
_interfaceBClient
|
protected org.apache.log4j.Category |
_logger
|
protected String |
_report
|
protected String |
engineLogonName
|
protected String |
engineLogonPassword
|
protected static String |
XSD_ANYURI_TYPE
|
protected static String |
XSD_NAMESPACE
|
protected static String |
XSD_NCNAME_TYPE
|
protected static String |
XSD_STRINGTYPE
|
| Constructor Summary | |
|---|---|
InterfaceBWebsideController()
Constructs a controller. |
|
| Method Summary | |
|---|---|
boolean |
checkConnection(String sessionHandle)
Checks if the sessionhandle with the engine is currently active. |
String |
checkInWorkItem(String workItemID,
org.jdom.Element inputData,
org.jdom.Element outputData,
String sessionHandle)
Deprecated. since 2.1 - use checkInWorkItem(String, Element, Element, String, String) Checks a work item into the engine. |
String |
checkInWorkItem(String workItemID,
org.jdom.Element inputData,
org.jdom.Element outputData,
String logPredicate,
String sessionHandle)
Checks a work item into the engine. |
String |
checkInWorkItem(String workItemID,
String inputData,
String outputData,
String sessionHandle)
Deprecated. since 2.1 - use checkInWorkItem(String, Element, Element, String, String) Checks a work item back into the engine. |
WorkItemRecord |
checkOut(String workItemID,
String sessionHandle)
Checks a work item out of the engine. |
protected List<WorkItemRecord> |
checkOutAllInstancesOfThisTask(WorkItemRecord enabledWorkItem,
String sessionHandle)
Utility method for implementers to use for helping to check all instances of a given task out of the engine. |
String |
connect(String userID,
String password)
Creates a session with the engine. |
YParameter[] |
describeRequiredParams()
Override this method if you wish to allow other tools to find out what input parameters are required for your custom YAWL service to work. |
void |
destroy()
Receives notification when the environment is being shutdown. |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Override this method to provide a welcome screen for your Custom YAWL Service For instance you could redirect to a JSP or just write typical servlet doGet() code inside your subclass. |
AuthenticationConfig |
getAuthenticationConfig()
Gets a reference to the authentication configuration for the local service (if any) |
WorkItemRecord |
getCachedWorkItem(String workItemID)
Gets a locally stored copy of a work item. |
List<WorkItemRecord> |
getChildren(String workItemID,
String sessionHandle)
Retrieve a list of all the child work items for a given parent work item |
WorkItemRecord |
getEngineStoredWorkItem(String workItemID,
String sessionHandle)
Gets a copy of a workitem form the engine's cache |
IBControllerCache |
getIBCache()
|
IBControllerCache |
getModel()
Deprecated. use getIBCache() instead |
protected org.jdom.Element |
getResourcingSpecs(YSpecificationID specID,
String taskID,
String sessionHandle)
Retrieve the resourcing specifications for a given task |
SpecificationData |
getSpecificationData(String specID,
String sessionHandle)
Deprecated. superseded by getSpecificationData(YSpecificationID, String) |
SpecificationData |
getSpecificationData(YSpecificationID specID,
String sessionHandle)
Gets the specification data object with the spec id. |
List<SpecificationData> |
getSpecificationPrototypesList(String sessionHandle)
Gets a list of all specifications currently loaded in the engine |
TaskInformation |
getTaskInformation(String specID,
String taskID,
String sessionHandle)
Deprecated. superseded by getTaskInformation(YSpecificationID, String, String) |
TaskInformation |
getTaskInformation(YSpecificationID specID,
String taskID,
String sessionHandle)
Gets metadata of a task. |
void |
handleCancelledCaseEvent(String caseID)
Receives notification from the engine that an active case has been cancelled. |
abstract void |
handleCancelledWorkItemEvent(WorkItemRecord workItemRecord)
Receives notification from the engine that an active workitem has been cancelled. |
void |
handleCaseResumedEvent(String caseID)
Receives notification from the engine that an active case has been cancelled. |
void |
handleCaseSuspendedEvent(String caseID)
Receives notification from the engine that an active case has been cancelled. |
void |
handleCaseSuspendingEvent(String caseID)
Receives notification from the engine that an active case has been cancelled. |
void |
handleCompleteCaseEvent(String caseID,
String casedata)
Receives notification from the engine that an active case has been completed. |
abstract void |
handleEnabledWorkItemEvent(WorkItemRecord enabledWorkItem)
Receives notification from the engine of an enabled workitem. |
void |
handleEngineInitialisationCompletedEvent()
Receives notification from the engine that it has finished startup initialisation and is now in a running state. |
void |
handleStartCaseEvent(YSpecificationID specID,
String caseID,
String launchingService,
boolean delayed)
Receives notification from the engine that a case has been started. |
void |
handleTimerExpiryEvent(WorkItemRecord expiredWorkItem)
Receives notification from the engine that an active workitem's timer has expired. |
void |
handleWorkItemStatusChangeEvent(WorkItemRecord workItem,
String oldStatus,
String newStatus)
Receives notification from the engine that the status of a workitem has been modified. |
static void |
logContactError(IOException e,
String backEndURIStr)
Logs the failure of a client to contact the YAWL engine. |
protected org.jdom.Element |
prepareReplyRootElement(WorkItemRecord enabledWorkItem,
String sessionHandle)
Utility method to prepare the reply element for checking a work item back into the engine. |
protected void |
setEngineLogonName(String logonName)
|
protected void |
setEngineLogonPassword(String logonPassword)
|
void |
setRemoteAuthenticationDetails(String userName,
String password,
String httpProxyHost,
String proxyPort)
If a custom service is installed outside of a firewall then you will need to set this method once. |
void |
setUpInterfaceBClient(String backEndURI)
Provided that you set up the web.xml file according to the YAWL documentation you do not need to call this method. |
boolean |
successful(String input)
Checks an interface return message for success . |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected InterfaceB_EnvironmentBasedClient _interfaceBClient
protected IBControllerCache _ibCache
protected String _report
protected static final String XSD_STRINGTYPE
protected static final String XSD_ANYURI_TYPE
protected static final String XSD_NCNAME_TYPE
protected static final String XSD_NAMESPACE
protected String engineLogonName
protected String engineLogonPassword
protected org.apache.log4j.Category _logger
| Constructor Detail |
|---|
public InterfaceBWebsideController()
| Method Detail |
|---|
public void setUpInterfaceBClient(String backEndURI)
backEndURI - the uri of the engine.public abstract void handleEnabledWorkItemEvent(WorkItemRecord enabledWorkItem)
enabledWorkItem - the enabled work itempublic abstract void handleCancelledWorkItemEvent(WorkItemRecord workItemRecord)
workItemRecord - the cancelled work itempublic void handleCancelledCaseEvent(String caseID)
caseID - the id of the case that has been cancelled
public void handleStartCaseEvent(YSpecificationID specID,
String caseID,
String launchingService,
boolean delayed)
specID - the specification id of the started casecaseID - the id of the caselaunchingService - the uri (String) of the service that started the casedelayed - true if this is a delayed case start, false if immediate
public void handleCompleteCaseEvent(String caseID,
String casedata)
caseID - the id of the completed case.casedata - the set of net-level data for the case when it completespublic void handleTimerExpiryEvent(WorkItemRecord expiredWorkItem)
expiredWorkItem - the workitem that has an expired timerpublic void handleEngineInitialisationCompletedEvent()
public void handleWorkItemStatusChangeEvent(WorkItemRecord workItem,
String oldStatus,
String newStatus)
workItem - the work item that has had its status modifiedoldStatus - the work item's previous statusnewStatus - the work item's new statuspublic void handleCaseSuspendingEvent(String caseID)
caseID - the id of the case that has been cancelledpublic void handleCaseSuspendedEvent(String caseID)
caseID - the id of the case that has been cancelledpublic void handleCaseResumedEvent(String caseID)
caseID - the id of the case that has been cancelledpublic void destroy()
public YParameter[] describeRequiredParams()
public void setRemoteAuthenticationDetails(String userName,
String password,
String httpProxyHost,
String proxyPort)
userName - mandatorypassword - mandatoryhttpProxyHost - optional (if using a non authenticating proxy firewall).proxyPort - optional (if using a non authenticating proxy firewall).protected void setEngineLogonName(String logonName)
protected void setEngineLogonPassword(String logonPassword)
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
javax.servlet.ServletException
request - the requestresponse - the response.
IOException - if an error is detected when the servlet handles the GET request
javax.servlet.ServletException - if the request for the GET could not be handled
public boolean checkConnection(String sessionHandle)
throws IOException
sessionHandle - the session handle
IOException - if a connection with the engine cannot be established.
public String connect(String userID,
String password)
throws IOException
userID - the userIDpassword - the password.
IOException - if a connection with the engine cannot be established.
public WorkItemRecord checkOut(String workItemID,
String sessionHandle)
throws IOException,
YAWLException
workItemID - the work item id.sessionHandle - a valid session handle
IOException - if a connection with the engine cannot be established.
YAWLException - if the checkout was unsuccessful
public String checkInWorkItem(String workItemID,
String inputData,
String outputData,
String sessionHandle)
throws IOException,
org.jdom.JDOMException
workItemID - the work item id.inputData - the input data.outputData - the output data.sessionHandle - the session handle.
IOException - if there is a problem contacting the engine.
org.jdom.JDOMException - if there is a problem parsing XML of input or output data
public String checkInWorkItem(String workItemID,
org.jdom.Element inputData,
org.jdom.Element outputData,
String sessionHandle)
throws IOException,
org.jdom.JDOMException
workItemID - the work item id.inputData - the input data as an XML String.outputData - the output data as an XML StringsessionHandle - a valid session handle
IOException - if there is a problem contacting the engine.
org.jdom.JDOMException - if there is a problem parsing XML of input or output data
public String checkInWorkItem(String workItemID,
org.jdom.Element inputData,
org.jdom.Element outputData,
String logPredicate,
String sessionHandle)
throws IOException,
org.jdom.JDOMException
workItemID - the work item id.inputData - the input data as an XML String.outputData - the output data as an XML StringlogPredicate - a configurable logging string to be logged when the item
completes. May be a simple string or an xml'd YLogDataItemList object.sessionHandle - a valid session handle
IOException - if there is a problem contacting the engine.
org.jdom.JDOMException - if there is a problem parsing XML of input or output datapublic WorkItemRecord getCachedWorkItem(String workItemID)
workItemID - the id of the workitem to retrieve
public WorkItemRecord getEngineStoredWorkItem(String workItemID,
String sessionHandle)
throws IOException
workItemID - the id of the workitem to retrievesessionHandle - a valid sesion handle
IOException - if there is a problem contacting the engine.
public TaskInformation getTaskInformation(String specID,
String taskID,
String sessionHandle)
throws IOException
specID - the specification idtaskID - the task idsessionHandle - a valid session handle
IOException - if there is a problem contacting the engine.
public TaskInformation getTaskInformation(YSpecificationID specID,
String taskID,
String sessionHandle)
throws IOException
specID - the specification idtaskID - the task idsessionHandle - a valid session handle
IOException - if there is a problem contacting the engine.public IBControllerCache getModel()
public IBControllerCache getIBCache()
public AuthenticationConfig getAuthenticationConfig()
public List<WorkItemRecord> getChildren(String workItemID,
String sessionHandle)
throws IOException
workItemID - the id of the parent workitemsessionHandle - a valid session handle
IOException - if there is a problem contacting the engine.
public static void logContactError(IOException e,
String backEndURIStr)
e - the thrown exceptionbackEndURIStr - the uri of the enginepublic boolean successful(String input)
input - the return message
public List<SpecificationData> getSpecificationPrototypesList(String sessionHandle)
throws IOException
sessionHandle - a valid session handle
IOException - if there is a problem contacting the engine.
public SpecificationData getSpecificationData(String specID,
String sessionHandle)
throws IOException
specID - the specification idsessionHandle - a valid session handle
IOException - if there is a problem contacting the engine.
public SpecificationData getSpecificationData(YSpecificationID specID,
String sessionHandle)
throws IOException
specID - the specification idsessionHandle - a valid session handle
IOException - if there is a problem contacting the engine.
protected List<WorkItemRecord> checkOutAllInstancesOfThisTask(WorkItemRecord enabledWorkItem,
String sessionHandle)
throws IOException,
YAWLException
enabledWorkItem - an enabled WorkItemRecord.sessionHandle - a valid session handle with the engine.
IOException - if there is a problem communicating with the engine.
YAWLException - if the checkout is unsuccessful
protected org.jdom.Element prepareReplyRootElement(WorkItemRecord enabledWorkItem,
String sessionHandle)
throws IOException
enabledWorkItem - the enabled work item.sessionHandle - the session handle
IOException - if there is a problem communicating with the engine.
protected org.jdom.Element getResourcingSpecs(YSpecificationID specID,
String taskID,
String sessionHandle)
throws IOException
specID - the specification idtaskID - the task idsessionHandle - a valid sessionhandle
IOException - if there is a problem communicating with the engine.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||