public class WorkletService extends InterfaceBWebsideController implements InterfaceX_Service
| Modifier and Type | Field and Description |
|---|---|
protected EngineClient |
_engineClient |
protected EnabledEventQueue |
_eventQueue |
protected WorkletLoader |
_loader |
protected boolean |
_persisting |
protected RdrEvaluator |
_rdr |
protected RunnerMap |
_runners |
_ibCache, _interfaceBClient, _logger, _report, engineLogonName, engineLogonPassword, XSD_ANYURI_TYPE, XSD_NAMESPACE, XSD_NCNAME_TYPE, XSD_STRINGTYPE| Modifier | Constructor and Description |
|---|---|
protected |
WorkletService()
the constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
cancelWorkletSet(java.util.Set<WorkletRunner> runnerSet)
Cancels each of the worklets listed in the wr as running
|
void |
completeInitialisation()
completes the initialisation of the service load-up (mainly persistence)
called from servlet WorkletGateway after contexts are loaded
|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
displays a web page describing the service
|
java.util.Map<java.lang.String,WorkletRunner> |
getAllRunners() |
EngineClient |
getEngineClient() |
EnabledEventQueue |
getEventQueue() |
ExceptionService |
getExceptionService() |
java.lang.String |
getExternalServiceHandle(CostGatewayClient costClient) |
static WorkletService |
getInstance() |
WorkletLoader |
getLoader() |
RdrEvaluator |
getRdrEvaluator() |
Rdr |
getRdrInterface() |
java.lang.String |
getResourceServiceURL() |
java.lang.String |
getRunnerCaseIdList(java.util.Set<WorkletRunner> runners) |
WorkletEventServer |
getServer() |
void |
handleCancelledCaseEvent(java.lang.String caseID)
Receives notification from the engine that an active case has been
cancelled.
|
void |
handleCancelledWorkItemEvent(WorkItemRecord wir)
Handles a message from the engine that a workitem has been cancelled
(see InterfaceBWebsideController for more details)
In this case, it cancels any worklet(s) running in place of the
workitem.
|
void |
handleCaseCancellationEvent(java.lang.String caseID) |
void |
handleCheckCaseConstraintEvent(YSpecificationID specID,
java.lang.String caseID,
java.lang.String data,
boolean precheck) |
void |
handleCheckWorkItemConstraintEvent(WorkItemRecord wir,
java.lang.String data,
boolean precheck) |
void |
handleCompleteCaseEvent(java.lang.String caseID,
java.lang.String casedata)
Handles a message from the engine that a (worklet) case has
completed (see InterfaceBWebsideController for more details).
|
java.lang.String |
handleConstraintViolationException(WorkItemRecord wir,
java.lang.String caseData) |
void |
handleEnabledWorkItemEvent(WorkItemRecord workItemRecord)
Handles a message from the engine that a workitem has been enabled
(see InterfaceBWebsideController for more details)
In this case, it either starts a worklet substitution process, or, if
the workitem denotes the end of a worklet case, it completes the
substitution process by checking the original workitem back into
the engine.
|
void |
handleEngineInitialisationCompletedEvent()
Receives notification from the engine that it has finished startup
initialisation and is now in a running state.
|
void |
handleResourceUnavailableException(java.lang.String resourceID,
WorkItemRecord wir,
java.lang.String caseData,
boolean primary) |
void |
handleTimeoutEvent(WorkItemRecord wir,
java.lang.String taskList) |
java.lang.String |
handleWorkItemAbortException(WorkItemRecord wir,
java.lang.String caseData) |
boolean |
isAdminSession(java.lang.String sessionHandle)
returns true if the session specified is an admin session
|
boolean |
isExceptionHandlingEnabled() |
boolean |
isWorkletCase(java.lang.String caseID) |
void |
processEnabledWorkItemEvent(WorkItemRecord wir) |
protected void |
raise(java.lang.String msg) |
java.lang.String |
replaceWorklet(java.lang.String wirID)
Replaces a running worklet case with another worklet case after an
amendment to the ruleset for this task.
|
void |
setExceptionServiceEnabled(boolean enable) |
void |
setupEngineClient() |
void |
shutdown() |
boolean |
suspendCase(java.lang.String caseID) |
boolean |
suspendWorkItem(java.lang.String itemID) |
Element |
updateDataList(Element in,
Element out)
updates the input datalist with the changed data in the output datalist
|
checkConnection, checkInWorkItem, checkInWorkItem, checkInWorkItem, checkOut, checkOutAllInstancesOfThisTask, connect, describeRequiredParams, destroy, getAuthenticationConfig, getCachedWorkItem, getChildren, getEngineStoredWorkItem, getIBCache, getModel, getResourcingSpecs, getSpecificationData, getSpecificationData, getSpecificationPrototypesList, getTaskInformation, getTaskInformation, handleCaseResumedEvent, handleCaseSuspendedEvent, handleCaseSuspendingEvent, handleDeadlockedCaseEvent, handleStartCaseEvent, handleTimerExpiryEvent, handleWorkItemStatusChangeEvent, logContactError, prepareReplyRootElement, setEngineLogonName, setEngineLogonPassword, setRemoteAuthenticationDetails, setUpInterfaceBClient, successfulprotected EngineClient _engineClient
protected RunnerMap _runners
protected boolean _persisting
protected RdrEvaluator _rdr
protected final WorkletLoader _loader
protected final EnabledEventQueue _eventQueue
public static WorkletService getInstance()
public void setupEngineClient()
public java.lang.String getExternalServiceHandle(CostGatewayClient costClient) throws java.io.IOException
java.io.IOExceptionpublic void setExceptionServiceEnabled(boolean enable)
public boolean isExceptionHandlingEnabled()
public WorkletEventServer getServer()
public Rdr getRdrInterface()
public RdrEvaluator getRdrEvaluator()
public java.lang.String getResourceServiceURL()
public WorkletLoader getLoader()
public EngineClient getEngineClient()
public EnabledEventQueue getEventQueue()
public ExceptionService getExceptionService()
public void completeInitialisation()
public void shutdown()
public void handleEnabledWorkItemEvent(WorkItemRecord workItemRecord)
handleEnabledWorkItemEvent in class InterfaceBWebsideControllerworkItemRecord - - a record describing the enabled workitempublic void handleCancelledWorkItemEvent(WorkItemRecord wir)
handleCancelledWorkItemEvent in class InterfaceBWebsideControllerwir - - a record describing the cancelled workitempublic void handleCompleteCaseEvent(java.lang.String caseID,
java.lang.String casedata)
handleCompleteCaseEvent in class InterfaceBWebsideControllercaseID - - the id of the completed casecasedata - - an (XML) string containing the output data for
the casepublic void handleCancelledCaseEvent(java.lang.String caseID)
InterfaceBWebsideControllerhandleCancelledCaseEvent in class InterfaceBWebsideControllercaseID - the id of the case that has been cancelledpublic void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
doGet in interface InterfaceX_ServicedoGet in class InterfaceBWebsideControllerrequest - the requestresponse - the response.java.io.IOException - if an error is detected when the servlet handles the GET requestjavax.servlet.ServletException - if the request for the GET could not be handledpublic void handleEngineInitialisationCompletedEvent()
InterfaceBWebsideControllerhandleEngineInitialisationCompletedEvent in class InterfaceBWebsideControllerpublic void handleCheckCaseConstraintEvent(YSpecificationID specID, java.lang.String caseID, java.lang.String data, boolean precheck)
handleCheckCaseConstraintEvent in interface InterfaceX_Servicepublic void handleCheckWorkItemConstraintEvent(WorkItemRecord wir, java.lang.String data, boolean precheck)
handleCheckWorkItemConstraintEvent in interface InterfaceX_Servicepublic java.lang.String handleWorkItemAbortException(WorkItemRecord wir, java.lang.String caseData)
handleWorkItemAbortException in interface InterfaceX_Servicepublic void handleTimeoutEvent(WorkItemRecord wir, java.lang.String taskList)
handleTimeoutEvent in interface InterfaceX_Servicepublic void handleResourceUnavailableException(java.lang.String resourceID,
WorkItemRecord wir,
java.lang.String caseData,
boolean primary)
handleResourceUnavailableException in interface InterfaceX_Servicepublic java.lang.String handleConstraintViolationException(WorkItemRecord wir, java.lang.String caseData)
handleConstraintViolationException in interface InterfaceX_Servicepublic void handleCaseCancellationEvent(java.lang.String caseID)
handleCaseCancellationEvent in interface InterfaceX_Servicepublic boolean suspendCase(java.lang.String caseID)
public boolean suspendWorkItem(java.lang.String itemID)
public void processEnabledWorkItemEvent(WorkItemRecord wir)
protected boolean cancelWorkletSet(java.util.Set<WorkletRunner> runnerSet)
runnerSet - - the worklet record containing the list of worklets to cancelpublic java.lang.String replaceWorklet(java.lang.String wirID)
throws java.io.IOException
wirID - the id of the original checked out workitemjava.io.IOExceptionprotected void raise(java.lang.String msg)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getRunnerCaseIdList(java.util.Set<WorkletRunner> runners)
public Element updateDataList(Element in, Element out)
in - - the JDOM Element containing the input paramsout - - the JDOM Element containing the output paramspublic java.util.Map<java.lang.String,WorkletRunner> getAllRunners()
public boolean isAdminSession(java.lang.String sessionHandle)
public boolean isWorkletCase(java.lang.String caseID)
Copyright © 2004-2014 The YAWL Foundation.