|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.workflow.portlet.client.GenericCommandHandler | +--com.ibm.workflow.portlet.sample.AuditTrailHandler
This CommandHandler accesses the IBM WebSphere MQ Workflow audit trail using JDBC and returns the event data in XML format. This data is then optionally formatted using XSL style sheets.
This sample also demonstrates how to use the Command
class.
For details on how to run this sample, see the Samples section.
Constructor Summary | |
---|---|
AuditTrailHandler()
|
Method Summary | |
---|---|
void |
destroy()
When the handler is unloaded, the cached JDBC connection is closed. |
static java.lang.String |
format(java.lang.String code)
This static method transforms the numeric representation of an MQWF event code to a human-readable string by looking up the translation in the 'AuditTrail.properties' file (which allows for easy language translation). |
ResponsePage |
getActivityStatistics(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This custom command first retrieves the audit records for all activity instances whose names match the name of work item whose OID is passed via the 'id' parameter of the HTTP-request. |
java.lang.String |
getHandlerInfo()
Returns information about the handler, such as author, version, and copyright. |
ResponsePage |
getInstanceHistory(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This custom command first retrieves the audit records for the process instance whose OID matches the 'id' parameter in the HTTP-request, and then transforms the data to XML. |
java.lang.String |
getTriggerTagFor(int list,
RequestContext context)
The trigger tags for the handler. |
void |
init(Config cfg)
During initialization, the handler opens a JDBC connection to the MQWF runtime database (either on the local host or on a remote host [depending on the presence of the 'DB2Server' property in the configuration file]). |
Methods inherited from class com.ibm.workflow.portlet.client.GenericCommandHandler |
---|
execute, getConfig, getContext, getCredentials, getSessionContext, onLogoff, onLogon |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AuditTrailHandler()
Method Detail |
public java.lang.String getHandlerInfo()
getHandlerInfo
in class GenericCommandHandler
public void init(Config cfg)
init
in class GenericCommandHandler
config
- The servlet's configuration and initialization parameterspublic void destroy()
destroy
in class GenericCommandHandler
public java.lang.String getTriggerTagFor(int list, RequestContext context)
getTriggerTagFor
in class GenericCommandHandler
list
- Denotes the list for which the trigger tag is queried.context
- The RequestContext
which was passed to the Viewer
calling this method.getActivityStatistics
command; for instance lists, an HTML tag to invoke the
getInstanceHistory
command.public ResponsePage getInstanceHistory(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws ClientException
request
- The request the client has made of the servletresponse
- The response the servlet sends to the clientpublic ResponsePage getActivityStatistics(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws ClientException
request
- The request the client has made of the servletresponse
- The response the servlet sends to the clientpublic static final java.lang.String format(java.lang.String code)
code
- The numeric audit event ID
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |