com.bea.wli.worklist.management
Interface WorklistSystemMBean


public interface WorklistSystemMBean

Defines management facilities for an instance of the Worklist system. This instance may be deployed as a system service or as an application module and be managed in the same way.


Method Summary
 void discardEditSession()
          Discard any edits you've made since the previous call to startEditSession.
 void endEditSession()
          Save any edits to a deployment plan, and redeploy the app to make the changes take effect.
 String getDefaultReportingDataSourceJndiName()
          Get the JNDI name of the DataSource that hosts the database tables for the default reporting store for Worklist.
 Interval getDefaultTerminalTaskRetentionTime()
          The length of time, expressed as a business calendar interval definition, that terminal tasks will be retained in the runtime store before they can be purged).
 EventHandler getEventHandler(String handlerName)
          Get the EventHandler corresponding to a given name returned from a prior call to getEventHandlerNames.
 long getEventHandlerCount()
           
 String[] getEventHandlerNames()
          Get an array of names for all the event handlers being managed by this WorklistSystemMBean instance.
 String getHostApplicationName()
          Get the name of the application that hosts this Worklist system instance.
 String getJavaMailSessionJndiName()
          Gets the JNDI name of the JavaMail session to use by default for this Worklist system instance.
 long getPurgeInterval()
          Get the number of seconds between automatic runs of the Worklist purge process.
 String getPurgeServerName()
          Get the name of the server that is responsible for automatic runs of the Worklist purge process.
 String getRuntimeDataSourceJndiName()
          Get the JNDI Name of the runtime data store for this Worklist system instance.
 TaskPlan getTaskPlan(String taskPlanId)
          Get the TaskPlan corresponding to a given TaskPlanId returned from a prior call to getTaskPlanIds.
 long getTaskPlanCount()
           
 TaskPlanId[] getTaskPlanIds()
          Get an array of TaskPlanId for all the task plans being managed by this WorklistSystemMBean instance.
 long getVisibleTaskPlanHostApplicationNameCount()
           
 String[] getVisibleTaskPlanHostApplicationNames()
          Get an array of Strings representing the names of applications that host one or more task plans that have been deployed to this Worklist system instance.
 boolean isDefaultReportingStoreEnabled()
          Get an indication of whether the Worklist default reporting store is enabled for this Worklist system instance.
 boolean isDirty()
          Get an indication of whether any edits have been made to this MBean during the current edit session.
 boolean isEditSessionActive()
          Check if a call to startEditSession has been made more recently than a call to either discardEditSession or endEditSession.
 boolean isRuntimeAccessAllowed()
          Get an indication of whether runtime operations allowed.
 void purgeTasks()
          Force an immediate run of the purge process for this Worklist system instance.
 void reassignWork(String oldUserId, String newUserId, boolean permanent)
          Reassign the work for a given user to another designated user.
 void setDefaultReportingDataSourceJndiName(String jndiName)
          Set the JNDI name of the DataSource that hosts the database tables for the default reporting store for Worklist.
 void setDefaultReportingStoreEnabled(boolean enabled)
          Enable or disable the Worklist default reporting store.
 void setDefaultTerminalTaskRetentionTime(Interval interval)
          Set the default length of time that terminal tasks will be retained in the runtime store before they can be purged.
 void setJavaMailSessionJndiName(String sessionJndiName)
          Sets the JNDI name of the JavaMail session to use by default for this Worklist system instance.
 void setPurgeInterval(long seconds)
          Set the number of seconds between automatic runs of the Worklist purge process.
 void setPurgeServerName(String serverName)
          Set the server that is responsible for automatic runs of the Worklist purge process.
 void setRuntimeDataSourceJndiName(String jndiName)
          Set the JNDI Name of the runtime data store for this Worklist system instance.
 void startEditSession()
          Start a session in which you can edit Worklist system configuration, task plan configuration, etc.
 void updateEventHandler(String handlerXML)
          Apply any edits made to a EventHandler between its being fetched from a call to getEventHandler() and the call to this method.
 void updateTaskPlan(String taskPlanId, String taskPlanXML)
          Apply any edits made to a TaskPlan between its being fetched from a call to getTaskPlan() and the call to this method.
 

Method Detail

getHostApplicationName

String getHostApplicationName()
Get the name of the application that hosts this Worklist system instance.


getVisibleTaskPlanHostApplicationNames

String[] getVisibleTaskPlanHostApplicationNames()
                                                throws ManagementException
Get an array of Strings representing the names of applications that host one or more task plans that have been deployed to this Worklist system instance.

Throws:
ManagementException

getPurgeInterval

long getPurgeInterval()
Get the number of seconds between automatic runs of the Worklist purge process.


setPurgeInterval

void setPurgeInterval(long seconds)
Set the number of seconds between automatic runs of the Worklist purge process. To invoke this method, you must have started an edit session.

Parameters:
seconds -
See Also:
startEditSession()

getPurgeServerName

String getPurgeServerName()
Get the name of the server that is responsible for automatic runs of the Worklist purge process. If this is null or invalid, the first server listed in the DomainMBean will be used.


setPurgeServerName

void setPurgeServerName(String serverName)
Set the server that is responsible for automatic runs of the Worklist purge process. To invoke this method, you must have started an edit session.

Parameters:
serverName -
See Also:
startEditSession()

getDefaultTerminalTaskRetentionTime

Interval getDefaultTerminalTaskRetentionTime()
The length of time, expressed as a business calendar interval definition, that terminal tasks will be retained in the runtime store before they can be purged). This value is a default, and can be overridden on a per-task plan basis by setting the terminal task retention time value on the task plan


setDefaultTerminalTaskRetentionTime

void setDefaultTerminalTaskRetentionTime(Interval interval)
Set the default length of time that terminal tasks will be retained in the runtime store before they can be purged. A value of 0 seconds is used initially for the default value, indicating tasks become eligible for purging immediately after they move into a terminal state. You can restore the 0 second default by passing null. To invoke this method, you must have started an edit session.

Parameters:
interval - An Interval, or null to clear the default.

getJavaMailSessionJndiName

String getJavaMailSessionJndiName()
Gets the JNDI name of the JavaMail session to use by default for this Worklist system instance.

See Also:
setJavaMailSessionJndiName(String)

setJavaMailSessionJndiName

void setJavaMailSessionJndiName(String sessionJndiName)
Sets the JNDI name of the JavaMail session to use by default for this Worklist system instance. This mail session is used by the email notification subsystem to deliver email notifications to clients. Note that individual event handlers (that define what types of events will cause an email to be sent, and to whom that email will be sent) can specify a JavaMail session to use when sending email notifications for the events/users they define. To invoke this method, you must have started an edit session.

See Also:
startEditSession()

getDefaultReportingDataSourceJndiName

String getDefaultReportingDataSourceJndiName()
Get the JNDI name of the DataSource that hosts the database tables for the default reporting store for Worklist.


setDefaultReportingDataSourceJndiName

void setDefaultReportingDataSourceJndiName(String jndiName)
                                           throws ManagementException
Set the JNDI name of the DataSource that hosts the database tables for the default reporting store for Worklist. To invoke this method, you must have started an edit session.

Parameters:
jndiName -
Throws:
ManagementException
See Also:
startEditSession()

getRuntimeDataSourceJndiName

String getRuntimeDataSourceJndiName()
Get the JNDI Name of the runtime data store for this Worklist system instance. To invoke this method, you must have started an edit session.

See Also:
startEditSession()

setRuntimeDataSourceJndiName

void setRuntimeDataSourceJndiName(String jndiName)
                                  throws ManagementException
Set the JNDI Name of the runtime data store for this Worklist system instance. To invoke this method, you must have started an edit session.

Throws:
ManagementException
See Also:
startEditSession()

getTaskPlanIds

TaskPlanId[] getTaskPlanIds()
                            throws ManagementException
Get an array of TaskPlanId for all the task plans being managed by this WorklistSystemMBean instance. This method should only be called when an edit session is active. If no edit session is active when this method is called, a ManagementException is thrown.

Throws:
ManagementException
See Also:
startEditSession()

getTaskPlan

TaskPlan getTaskPlan(String taskPlanId)
                     throws ManagementException
Get the TaskPlan corresponding to a given TaskPlanId returned from a prior call to getTaskPlanIds. Any modifications you make to this TaskPlan must be applied by calling updateTaskPlan with the edited TaskPlan instance. Any edits you make to the TaskPlan are captured directly into the active session if the client and server are co-located. In this case, the subsequent call to updateTaskPlan is a no-op. However, as a best practice, you should always call updateTaskPlan after making edits to a TaskPlan returned from this method. This method should only be called when an edit session is active. If no edit session is active when this method is called, a ManagementException is thrown.

NOTE: You cannot add or remove child objects within the task plan via this method. This method is intended to allow the modification of environment specific information in the task plan, and not for wholesale editing of a task plan that has already been deployed. The supported edits are listed below.

Parameters:
taskPlanId - The String value of the TaskPlanId taken from the modified TaskPlan instance (via TaskPlanId.getStringValue()) before calling this method.
Returns:
The TaskPlan instance for the task plan with the given id. This TaskPlan can be edited, and then updated into the runtime state of the Worklist system instance via updateTaskPlan(TaskPlan).
Throws:
ManagementException
See Also:
updateTaskPlan(String, String), startEditSession()

updateTaskPlan

void updateTaskPlan(String taskPlanId,
                    String taskPlanXML)
                    throws ManagementException
Apply any edits made to a TaskPlan between its being fetched from a call to getTaskPlan() and the call to this method. This method should only be called when an edit session is active. If no edit session is active when this method is called, a ManagementException is thrown.

Parameters:
taskPlanId - The String value of the TaskPlanId taken from the modified TaskPlan instance (via TaskPlanId.getStringValue()) before calling this method.
taskPlanXML - The XML content for the TaskPlan that has been edited and is now going to be applied to the running state of the Worklist system instance. You can obtain this XML by calling TaskPlan.writeToDescriptorStream() and then wrapping the resulting bytes in a String. Make sure to use the same encoding in both calls.
Throws:
ManagementException
See Also:
startEditSession(), TaskPlan.writeToDescriptorStream(java.io.OutputStream, String), getTaskPlan(String)

getEventHandlerNames

String[] getEventHandlerNames()
                              throws ManagementException
Get an array of names for all the event handlers being managed by this WorklistSystemMBean instance. This method should only be called when an edit session is active. If no edit session is active when this method is called, a ManagementException is thrown.

Throws:
ManagementException
See Also:
startEditSession()

getEventHandler

EventHandler getEventHandler(String handlerName)
                             throws ManagementException
Get the EventHandler corresponding to a given name returned from a prior call to getEventHandlerNames. Any modifications you make to this EventHandler must be applied by calling updateEventHandler with the edited EventHandler instance. Any edits you make to the EventHandler are captured directly into the active session if the client and server are co-located. In this case, the subsequent call to updateEventHandler is a no-op. However, as a best practice, you should always call updateEventHandler after making edits to an EventHandler returned from this method. This method should only be called when an edit session is active. If no edit session is active when this method is called, a ManagementException is thrown.

Parameters:
handlerName - The name of the handler to return.
Returns:
The EventHandler instance for the handler with the given name. This EventHandler can be edited, and then updated into the runtime state of the Worklist system instance via updateEventHandler(EventHandler).
Throws:
ManagementException
See Also:
updateEventHandler(String), startEditSession()

updateEventHandler

void updateEventHandler(String handlerXML)
                        throws ManagementException
Apply any edits made to a EventHandler between its being fetched from a call to getEventHandler() and the call to this method. This method should only be called when an edit session is active. If no edit session is active when this method is called, a ManagementException is thrown.

Parameters:
handlerXML - The XML content for the EventHandler that has been edited and is now going to be applied to the running state of the Worklist system instance. You can obtain this XML by calling EventHandler.writeToDescriptorStream() and then wrapping the resulting bytes in a String. Make sure to use the same encoding in both calls.
Throws:
ManagementException
See Also:
startEditSession(), EventHandler.writeToDescriptorStream(java.io.OutputStream, String)

isDefaultReportingStoreEnabled

boolean isDefaultReportingStoreEnabled()
                                       throws ManagementException
Get an indication of whether the Worklist default reporting store is enabled for this Worklist system instance. If true, this means that the default reporting store is receiving event data for any changes being made to tasks managed by this Worklist system instance. If false, the default reporting store is not receiving events. In this case, a customer defined reporting store may have been installed to receive events.

Throws:
ManagementException

setDefaultReportingStoreEnabled

void setDefaultReportingStoreEnabled(boolean enabled)
                                     throws ManagementException
Enable or disable the Worklist default reporting store. This store is intended to give basic out-of-box reporting capability to Worklist. Customers can replace this store by adding their own reporting listener and writing events to their own store. Customers may choose to run both the default reporting store and their own store, or simply turn off the default reporting store. To invoke this method, you must have already started an edit session.

Parameters:
enabled - If true, the default reporting store will receive events when tasks being managed by this Worklist system instance are changed.
Throws:
ManagementException
See Also:
startEditSession()

isRuntimeAccessAllowed

boolean isRuntimeAccessAllowed()
                               throws ManagementException
Get an indication of whether runtime operations allowed. If so, this indicates that there is at least one WorklistSystemRuntimeMBean instance available to do this work (for example, at least one managed server is running within a cluster).

Throws:
ManagementException

reassignWork

void reassignWork(String oldUserId,
                  String newUserId,
                  boolean permanent)
                  throws ManagementException
Reassign the work for a given user to another designated user. This method is used to support employee unavailability and departure scenarios. If the given employee is departing permanently, the permanent flag should be passed true. This will replace this user in the owner, and assignee list (both step and assign actions) configuration for all task plans being managed by this Worklist System instance. If you pass the permanent flag as true, you must have previously started an edit session by calling startEditSession. This method requires that the isRuntimeAccessAllowed method returns true in order to access task instances.

Throws:
ManagementException
See Also:
startEditSession(), isRuntimeAccessAllowed()

purgeTasks

void purgeTasks()
                throws ManagementException
Force an immediate run of the purge process for this Worklist system instance. This run will be in addition to any scheduled run as defined by the purgeInterval setting on this MBean. The purge process will run as if it had been scheduled in advance. Only tasks eligible for purging will be purged (i.e. completed/aborted tasks that have been in that state for longer than the terminalTaskRetentionTime setting). This method requires that the isRuntimeAccessAllowed method returns true in order to access task instances.

Throws:
ManagementException
See Also:
isRuntimeAccessAllowed()

isDirty

boolean isDirty()
Get an indication of whether any edits have been made to this MBean during the current edit session. If no edit session is active, or no edits have been performed to this MBean during the active session, this method returns false.


startEditSession

void startEditSession()
                      throws ManagementException
Start a session in which you can edit Worklist system configuration, task plan configuration, etc. for the application associated with this WorklistSystemMBean instance.

Throws:
ManagementException
See Also:
discardEditSession(), endEditSession()

isEditSessionActive

boolean isEditSessionActive()
Check if a call to startEditSession has been made more recently than a call to either discardEditSession or endEditSession.

See Also:
startEditSession()

discardEditSession

void discardEditSession()
                        throws ManagementException
Discard any edits you've made since the previous call to startEditSession. If no prior call to startEditSession was made, this call is ignored.

Throws:
ManagementException
See Also:
startEditSession()

endEditSession

void endEditSession()
                    throws ManagementException
Save any edits to a deployment plan, and redeploy the app to make the changes take effect.

Throws:
ManagementException
See Also:
startEditSession()

getTaskPlanCount

long getTaskPlanCount()
                      throws ManagementException
Throws:
ManagementException

getEventHandlerCount

long getEventHandlerCount()
                          throws ManagementException
Throws:
ManagementException

getVisibleTaskPlanHostApplicationNameCount

long getVisibleTaskPlanHostApplicationNameCount()
                                                throws ManagementException
Throws:
ManagementException