org.yawlfoundation.yawl.engine.interfce.interfaceE
Class YLogGatewayClient

java.lang.Object
  extended by org.yawlfoundation.yawl.engine.interfce.Interface_Client
      extended by org.yawlfoundation.yawl.engine.interfce.interfaceE.YLogGatewayClient

public class YLogGatewayClient
extends Interface_Client

An API to be used by clients that want to retrieve data from the YAWL process logs.

Author:
Michael Adams 29/10/2007 Last Date: 02/12/2009 (for v2.1)

Constructor Summary
YLogGatewayClient(String uri)
          the only constructor
 
Method Summary
 String checkConnection(String handle)
          Checks if a sessionhandle is active
 String connect(String userID, String password)
          Connects an external entity to the engine
 String getAllCasesCancelledByService(String serviceName, String handle)
          Gets a list of all of the 'CaseCancel' events triggered by the service
 String getAllCasesStartedByService(String serviceName, String handle)
          Gets a list of all of the 'CaseStart' events triggered by the service
 String getAllSpecifications(String handle)
          Gets an summary xml list of all the specifications logged
 String getBackEndURI()
           
 String getCaseEvent(String caseID, String eventType, String handle)
          Gets the log record of a particular case-level event
 String getCaseEvents(long rootNetInstanceKey, String handle)
          Gets all the case level events for the root net key passed
 String getCaseEvents(String caseID, String handle)
          Gets all the case level events for the case id passed
 String getCompleteCaseLog(String caseID, String handle)
          Gets a comprehensive listing of all of the data logged for the case passed, including all net & task instances, events and data items
 String getCompleteCaseLogsForSpecification(long specKey, String handle)
          Gets a complete listing of all the cases launched from the specification key passed, including all net & task instances, events and data items
 String getCompleteCaseLogsForSpecification(String identifier, String version, String uri, String handle)
          Gets a complete listing of all the cases launched from the specification data passed, including all net & task instances, events and data items
 String getDataForEvent(long eventKey, String handle)
          Gets all of the data items logged with the event requested
 String getDataTypeForDataItem(long dataTypeKey, String handle)
          Gets the data type for the key passed
 String getEventsForTaskInstance(String itemID, String handle)
          Gets the set of events for a task instance (workitem)
 String getInstanceEvents(long instanceKey, String handle)
          Gets all of the net or task instances for the instance key passed
 String getNetInstancesOfSpecification(long specKey, String handle)
          Gets all of the net instances (root and sub-net) of all the logged cases based on the specification key passed
 String getNetInstancesOfSpecification(String identifier, String version, String uri, String handle)
          Gets all of the net instances (root and sub-net) of all the logged cases based on the specification details passed
 String getServiceName(long serviceKey, String handle)
          Gets the name of the service referenced by the key passed
 String getSpecificationStatistics(long specKey, String handle)
          Gets a set of summary statistics for executed instances of the specification key passed
 String getSpecificationStatistics(String identifier, String version, String uri, long from, long to, String handle)
          Gets a set of summary statistics for executed instances of the specification data passed
 String getSpecificationStatistics(String identifier, String version, String uri, String handle)
          Gets a set of summary statistics for executed instances of the specification data passed
 String getSpecificationStatistics(YSpecificationID specID, long from, long to, String handle)
          Gets a set of summary statistics for executed instances of the specification data passed
 String getSpecificationStatistics(YSpecificationID specID, String handle)
          Gets a set of summary statistics for executed instances of the specification data passed
 String getSpecificationXESLog(String identifier, String version, String uri, boolean withData, String handle)
          Gets a complete listing of all the cases launched from the specification data passed, in OpenXES format
 String getSpecificationXESLog(String identifier, String version, String uri, String handle)
          Gets a complete listing of all the cases launched from the specification data passed, in OpenXES format
 String getSpecificationXESLog(YSpecificationID specID, boolean withData, String handle)
          Gets a complete listing of all the cases launched from the specification data passed, in OpenXES format
 String getSpecificationXESLog(YSpecificationID specID, String handle)
          Gets a complete listing of all the cases launched from the specification data passed, in OpenXES format
 String getTaskInstancesForCase(String caseID, String handle)
          Gets a listing of all the task instances (ie work items) created for the case
 String getTaskInstancesForTask(long taskKey, String handle)
          Gets a listing of all the task instances (ie work items) created for the task
 String getTaskInstancesForTask(String rootCaseID, String taskName, String handle)
          Gets a listing of all the task instances (ie work items) created for the task within a specified case
 
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
 

Constructor Detail

YLogGatewayClient

public YLogGatewayClient(String uri)
the only constructor

Parameters:
uri - the uri of the YAWL engine's log gateway
Method Detail

getBackEndURI

public String getBackEndURI()

getAllSpecifications

public String getAllSpecifications(String handle)
                            throws IOException
Gets an summary xml list of all the specifications logged

Parameters:
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getNetInstancesOfSpecification

public String getNetInstancesOfSpecification(String identifier,
                                             String version,
                                             String uri,
                                             String handle)
                                      throws IOException
Gets all of the net instances (root and sub-net) of all the logged cases based on the specification details passed

Parameters:
identifier - the unique identifier of the specification
version - the specification's version number
uri - the specification's uri
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getNetInstancesOfSpecification

public String getNetInstancesOfSpecification(long specKey,
                                             String handle)
                                      throws IOException
Gets all of the net instances (root and sub-net) of all the logged cases based on the specification key passed

Parameters:
specKey - the primary key identifier of the specification in its log table
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getCompleteCaseLogsForSpecification

public String getCompleteCaseLogsForSpecification(String identifier,
                                                  String version,
                                                  String uri,
                                                  String handle)
                                           throws IOException
Gets a complete listing of all the cases launched from the specification data passed, including all net & task instances, events and data items

Parameters:
identifier - the unique identifier of the specification
version - the specification's version number
uri - the specification's uri
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getCompleteCaseLogsForSpecification

public String getCompleteCaseLogsForSpecification(long specKey,
                                                  String handle)
                                           throws IOException
Gets a complete listing of all the cases launched from the specification key passed, including all net & task instances, events and data items

Parameters:
specKey - the primary key identifier of the specification in its log table
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getSpecificationStatistics

public String getSpecificationStatistics(String identifier,
                                         String version,
                                         String uri,
                                         long from,
                                         long to,
                                         String handle)
                                  throws IOException
Gets a set of summary statistics for executed instances of the specification data passed

Parameters:
identifier - the unique identifier of the specification
version - the specification's version number
uri - the specification's uri
from - the start of the range of timestamps to include
to - the end of the range of timestamps to include
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getSpecificationStatistics

public String getSpecificationStatistics(String identifier,
                                         String version,
                                         String uri,
                                         String handle)
                                  throws IOException
Gets a set of summary statistics for executed instances of the specification data passed

Parameters:
identifier - the unique identifier of the specification
version - the specification's version number
uri - the specification's uri
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getSpecificationStatistics

public String getSpecificationStatistics(YSpecificationID specID,
                                         String handle)
                                  throws IOException
Gets a set of summary statistics for executed instances of the specification data passed

Parameters:
specID - the unique identifier of the specification
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getSpecificationStatistics

public String getSpecificationStatistics(YSpecificationID specID,
                                         long from,
                                         long to,
                                         String handle)
                                  throws IOException
Gets a set of summary statistics for executed instances of the specification data passed

Parameters:
specID - the unique identifier of the specification
from - the start of the range of timestamps to include
to - the end of the range of timestamps to include
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getSpecificationStatistics

public String getSpecificationStatistics(long specKey,
                                         String handle)
                                  throws IOException
Gets a set of summary statistics for executed instances of the specification key passed

Parameters:
specKey - the primary key identifier of the specification in its log table
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getCaseEvents

public String getCaseEvents(long rootNetInstanceKey,
                            String handle)
                     throws IOException
Gets all the case level events for the root net key passed

Parameters:
rootNetInstanceKey - the primary key identifier of the root net instance of the case
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getCaseEvents

public String getCaseEvents(String caseID,
                            String handle)
                     throws IOException
Gets all the case level events for the case id passed

Parameters:
caseID - the case id of the case to get the events for
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getDataForEvent

public String getDataForEvent(long eventKey,
                              String handle)
                       throws IOException
Gets all of the data items logged with the event requested

Parameters:
eventKey - the primary key identifier of the event
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getInstanceEvents

public String getInstanceEvents(long instanceKey,
                                String handle)
                         throws IOException
Gets all of the net or task instances for the instance key passed

Parameters:
instanceKey - the primary key identifier of the net or task instance
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getDataTypeForDataItem

public String getDataTypeForDataItem(long dataTypeKey,
                                     String handle)
                              throws IOException
Gets the data type for the key passed

Parameters:
dataTypeKey - the primary key identifier of the data type
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getCompleteCaseLog

public String getCompleteCaseLog(String caseID,
                                 String handle)
                          throws IOException
Gets a comprehensive listing of all of the data logged for the case passed, including all net & task instances, events and data items

Parameters:
caseID - the case id to get the log data for
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getTaskInstancesForCase

public String getTaskInstancesForCase(String caseID,
                                      String handle)
                               throws IOException
Gets a listing of all the task instances (ie work items) created for the case

Parameters:
caseID - the case id to get the log data for
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getTaskInstancesForTask

public String getTaskInstancesForTask(long taskKey,
                                      String handle)
                               throws IOException
Gets a listing of all the task instances (ie work items) created for the task

Parameters:
taskKey - the primary key identifier of the task definition
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getTaskInstancesForTask

public String getTaskInstancesForTask(String rootCaseID,
                                      String taskName,
                                      String handle)
                               throws IOException
Gets a listing of all the task instances (ie work items) created for the task within a specified case

Parameters:
rootCaseID - the root case id of the case to get the task instances for
taskName - the primary key identifier of the task definition
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getCaseEvent

public String getCaseEvent(String caseID,
                           String eventType,
                           String handle)
                    throws IOException
Gets the log record of a particular case-level event

Parameters:
caseID - the case id to get the event for
eventType - the 'name' of the event (eg 'CaseStart')
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getAllCasesStartedByService

public String getAllCasesStartedByService(String serviceName,
                                          String handle)
                                   throws IOException
Gets a list of all of the 'CaseStart' events triggered by the service

Parameters:
serviceName - the name of the registered service
handle - an active sessionhandle
Returns:
an XML'd String list of Case Start events triggered by the service
Throws:
IOException - if there's a problem connecting to the engine

getAllCasesCancelledByService

public String getAllCasesCancelledByService(String serviceName,
                                            String handle)
                                     throws IOException
Gets a list of all of the 'CaseCancel' events triggered by the service

Parameters:
serviceName - the name of the registered service
handle - an active sessionhandle
Returns:
an XML'd String list of Case Cancellation events triggered by the service
Throws:
IOException - if there's a problem connecting to the engine

getServiceName

public String getServiceName(long serviceKey,
                             String handle)
                      throws IOException
Gets the name of the service referenced by the key passed

Parameters:
serviceKey - the primary key identifier of the service
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getEventsForTaskInstance

public String getEventsForTaskInstance(String itemID,
                                       String handle)
                                throws IOException
Gets the set of events for a task instance (workitem)

Parameters:
itemID - the id of the workitem
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine

getSpecificationXESLog

public String getSpecificationXESLog(String identifier,
                                     String version,
                                     String uri,
                                     boolean withData,
                                     String handle)
                              throws IOException
Gets a complete listing of all the cases launched from the specification data passed, in OpenXES format

Parameters:
identifier - the unique identifier of the specification
version - the specification's version number
uri - the specification's uri
withData - if true, all data change events will be included
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine
See Also:
getSpecificationXESLog(YSpecificationID, boolean, String)

getSpecificationXESLog

public String getSpecificationXESLog(String identifier,
                                     String version,
                                     String uri,
                                     String handle)
                              throws IOException
Gets a complete listing of all the cases launched from the specification data passed, in OpenXES format

Parameters:
identifier - the unique identifier of the specification
version - the specification's version number
uri - the specification's uri
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine
See Also:
getSpecificationXESLog(YSpecificationID, String)

getSpecificationXESLog

public String getSpecificationXESLog(YSpecificationID specID,
                                     String handle)
                              throws IOException
Gets a complete listing of all the cases launched from the specification data passed, in OpenXES format

Parameters:
specID - the unique identifier of the specification
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine
See Also:
getSpecificationXESLog(String, String, String, String)

getSpecificationXESLog

public String getSpecificationXESLog(YSpecificationID specID,
                                     boolean withData,
                                     String handle)
                              throws IOException
Gets a complete listing of all the cases launched from the specification data passed, in OpenXES format

Parameters:
specID - the unique identifier of the specification
withData - if true, all data change events will be included
handle - an active sessionhandle
Returns:
the resultant String response (log data or error message)
Throws:
IOException - if there's a problem connecting to the engine
See Also:
getSpecificationXESLog(String, String, String, String)

connect

public String connect(String userID,
                      String password)
               throws IOException
Connects an external entity to the engine

Parameters:
userID - the userid
password - the password
Returns:
a sessionHandle if successful, or a failure message if not
Throws:
IOException - if there's a problem connecting to the engine

checkConnection

public String checkConnection(String handle)
                       throws IOException
Checks if a sessionhandle is active

Parameters:
handle - the sessionhandle to check
Returns:
true if the session is alive, false if otherwise
Throws:
IOException - if there's a problem connecting to the engine


Copyright © 2004-2012 The YAWL Foundation.