WebLogic Process Integrator Version 1.1

com.bea.wlpi.server.worklist
Interface Worklist


public interface Worklist
extends javax.ejb.EJBObject

Provides the functionality required by a worklist client application. A worklist bean has an associated workflow participant.

See Also:
WorklistHome

Method Summary
 java.lang.String getActiveOrganization()
          Return the active organization.
 java.util.List getStartableWorkflows(java.lang.String orgId)
          List the workflows that may be started manually.
 int[] getTaskCounts()
          Return the number of assigned and overdue tasks on a user's worklist.
 java.util.List getTasks()
          List the tasks assigned to the user who created this remote worklist object.
 java.util.List getTasks(java.lang.String orgId, java.lang.String assigneeId, boolean isRole)
          List the tasks assigned to a participant.
 java.lang.String instantiateWorkflow(java.lang.String orgId, java.lang.String templateId)
          Create a new workflow instance.
 void ping()
          A "dummy" method for the client to ping.
 java.lang.String response(java.lang.String templateDefinitionId, java.lang.String instanceId, java.lang.String nodeId, java.lang.String xml)
          Send the client's response to a previously received client request.
 void setActiveOrganization(java.lang.String orgId)
          Set the active organization.
 java.lang.String taskAssign(java.lang.String templateId, java.lang.String instanceId, java.lang.String taskId, java.lang.String assigneeId, boolean isRole, boolean userInRole)
          Assign a task to a participant.
 java.lang.String taskExecute(java.lang.String templateId, java.lang.String instanceId, java.lang.String taskId)
          Execute a task instance.
 java.lang.String taskMarkDone(java.lang.String templateId, java.lang.String instanceId, java.lang.String taskId)
          Mark a task instance as complete.
 java.lang.String taskSetProperties(java.lang.String templateId, java.lang.String instanceId, java.lang.String taskId, int priority, boolean doneWithoutDoit, boolean doitIfDone, boolean unmarkDone, boolean modifible, boolean reassignment)
          Set the properties for a task instance.
 java.lang.String taskUnmarkDone(java.lang.String templateId, java.lang.String instanceId, java.lang.String taskId)
          Mark a task as incomplete.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

setActiveOrganization

public void setActiveOrganization(java.lang.String orgId)
                           throws java.rmi.RemoteException,
                                  WorkflowException
Set the active organization. The active organization is the default used by those worklist requests that do not explicitly specify an organization.
Parameters:
orgId - The ID of the organization to set as active.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if an exception prevented the call from completing.

getActiveOrganization

public java.lang.String getActiveOrganization()
                                       throws java.rmi.RemoteException,
                                              WorkflowException
Return the active organization.
Returns:
The ID of the active organization.
Throws:
java.rmi.RemoteException - if a communications error occurred.

ping

public void ping()
          throws java.rmi.RemoteException
A "dummy" method for the client to ping. This is to avoid a WLS "feature" that dereferences a remote object that has not been referenced for a certain amound of time. This causes the client to die.
Throws:
java.rmi.RemoteException - if a communications error occurred.

getTaskCounts

public int[] getTaskCounts()
                    throws java.rmi.RemoteException,
                           WorkflowException
Return the number of assigned and overdue tasks on a user's worklist.
Returns:
An array of task counts as follows:
element[0] the total number of tasks assigned to the user.
element[1] the number of those tasks which are overdue.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if an exception prevented the call from completing.

getTasks

public java.util.List getTasks()
                        throws java.rmi.RemoteException,
                               WorkflowException
List the tasks assigned to the user who created this remote worklist object. The default implementation caches the task list on the server side.
Returns:
A list of TaskInfo objects.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if an exception prevented the call from completing.

getTasks

public java.util.List getTasks(java.lang.String orgId,
                               java.lang.String assigneeId,
                               boolean isRole)
                        throws java.rmi.RemoteException,
                               WorkflowException
List the tasks assigned to a participant.
Parameters:
orgId - The ID of the organization for which to list tasks.
assigneeId - The ID of the participant for whom to list tasks.
isRole - true if assigneeId is that of a role.
Returns:
A list of TaskInfo objects.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if an exception prevented the call from completing.

getStartableWorkflows

public java.util.List getStartableWorkflows(java.lang.String orgId)
                                     throws java.rmi.RemoteException,
                                            WorkflowException
List the workflows that may be started manually.
Parameters:
orgId - The ID of the organization for which to list workflows.
Returns:
A list of TemplateInfo objects.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if an exception prevented the call from completing.

instantiateWorkflow

public java.lang.String instantiateWorkflow(java.lang.String orgId,
                                            java.lang.String templateId)
                                     throws java.rmi.RemoteException,
                                            WorkflowException
Create a new workflow instance.
Parameters:
orgId - The ID of the organization in which to instantiate the workflow.
templateId - The ID of the workflow template to instantiate.
Returns:
The ID of the newly created workflow instance.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the workflow could not be instantiated.

taskExecute

public java.lang.String taskExecute(java.lang.String templateId,
                                    java.lang.String instanceId,
                                    java.lang.String taskId)
                             throws java.rmi.RemoteException,
                                    WorkflowException
Execute a task instance. The default implementation causes the actions associated with the task's "executed" event to be performed in sequence.
Parameters:
templateDefinitionId - The ID of the workflow template definition.
instanceId - The ID of the workflow instance.
taskId - The ID of the task instance.
Returns:
A response string (in XML format) compliant with the client request document type definition. The response contains details of all workflow and task updates that occurred as a consequence of the call and may also contain requests that the client is expected to handle. Such requests are generated by the ActionSendXMLToClient action (and subclasses thereof) and are compliant with the call executable program, call Java class, display message box or set variable values document type definitions. Custom clients are free to define their own services and XML formats (provided these do not create ambiguities when referenced from the generic client request document type definition).
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the method is called by a client process and the task is not assigned to that user or if an exception prevented the task from being executed.

taskMarkDone

public java.lang.String taskMarkDone(java.lang.String templateId,
                                     java.lang.String instanceId,
                                     java.lang.String taskId)
                              throws java.rmi.RemoteException,
                                     WorkflowException
Mark a task instance as complete. The default implementation sets the task "completed" date to the current date/time and causes any actions associated with the task's "marked done" event to be performed in sequence.
Parameters:
templateDefinitionId - The ID of the workflow template definition.
instanceId - The ID of the workflow instance.
taskId - The ID of the task instance.
Returns:
A response string as described under taskExecute(java.lang.String, java.lang.String, java.lang.String).
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the method is called by a client process and the task's properties do not permit it to be marked complete or if an exception prevented the task from being marked complete.

taskUnmarkDone

public java.lang.String taskUnmarkDone(java.lang.String templateId,
                                       java.lang.String instanceId,
                                       java.lang.String taskId)
                                throws java.rmi.RemoteException,
                                       WorkflowException
Mark a task as incomplete. The default implementation clears the task's "completed" date but does not cause the execution of any actions defined for the task's "started" event.
Parameters:
templateDefinitionId - The ID of the workflow template definition.
instanceId - The ID of the workflow instance.
taskId - The ID of the task instance.
Returns:
A response string as described under taskExecute(java.lang.String, java.lang.String, java.lang.String).
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the method is called by a client process and the task's properties do not permit it to be marked incomplete, or if an exception prevented the task from being marked incomplete.

taskAssign

public java.lang.String taskAssign(java.lang.String templateId,
                                   java.lang.String instanceId,
                                   java.lang.String taskId,
                                   java.lang.String assigneeId,
                                   boolean isRole,
                                   boolean userInRole)
                            throws java.rmi.RemoteException,
                                   WorkflowException
Assign a task to a participant. The actual participant to whom the system assigns the task depends on: 1.) whether any task reroutes are currently in force for the nominated assignee and 2.) the value of the bLoadBalance argument.
Parameters:
templateDefinitionId - The ID of the workflow template definition.
instanceId - The ID of the workflow instance.
taskId - The ID of the task instance.
assigneeId - The ID of the participant to whom the task is to be assigned.
bRole - true if the assignee ID is that of a role, false if that of a user.
bLoadBalance - true to request the system to perform load-balancing within the specified role. This argument is ignored if the bRole argument is false.
Returns:
A response string as described under taskExecute(java.lang.String, java.lang.String, java.lang.String).
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the method is called by a client process and the task's properties do not permit it to be reassigned.

taskSetProperties

public java.lang.String taskSetProperties(java.lang.String templateId,
                                          java.lang.String instanceId,
                                          java.lang.String taskId,
                                          int priority,
                                          boolean doneWithoutDoit,
                                          boolean doitIfDone,
                                          boolean unmarkDone,
                                          boolean modifible,
                                          boolean reassignment)
                                   throws java.rmi.RemoteException,
                                          WorkflowException
Set the properties for a task instance.
Parameters:
templateDefinitionId - The ID of the workflow template definition.
instanceId - The ID of the workflow instance.
taskId - The ID of the task instance.
priority - The default task instance priority (0=low, 1=medium or 2=high).
doneWithoutDoit - true to permit a user to mark a task instance as complete (by calling the taskMarkDone(java.lang.String, java.lang.String, java.lang.String) method).
doitIfDone - true to permit a user to execute a task instance after it has been marked as complete (by calling the taskExecute(java.lang.String, java.lang.String, java.lang.String) method).
unmarkDone - true to permit a user to mark a task instance as incomplete (by calling the taskUnmarkDone(java.lang.String, java.lang.String, java.lang.String) method).
modifible - true to permit a user to modify a task instance's runtime properties (by calling this method).
reassignment - true to permit a user to reassign a task instance to another participant (by calling the taskAssign(java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, boolean) method).
Returns:
A response string as described under taskExecute(java.lang.String, java.lang.String, java.lang.String).
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the task properties could not be set.

response

public java.lang.String response(java.lang.String templateDefinitionId,
                                 java.lang.String instanceId,
                                 java.lang.String nodeId,
                                 java.lang.String xml)
                          throws java.rmi.RemoteException,
                                 WorkflowException
Send the client's response to a previously received client request. This request will generally have been raised by an ActionSendXMLToClient action, using one of the standard DTDs or a client-defined custom DTD. The response DTD matches the request DTD and the XML document contains the results of executing the server's request. The originating action typically uses the XPath function to extract the required values from the document. Clients are free to define custom request and response DTDs.
Parameters:
templateDefinitionId - The ID of the workflow template definition.
instanceId - The ID of the workflow instance.
nodeId - The ID of the object that raised the client request to which this call is responding.
xml - The client's request-specific response (in XML format) compliant with the document type definition called program response, called Java class response, message box response, set variables response or a custom format defined by the client.
Returns:
A further response string as described under taskExecute(java.lang.String, java.lang.String, java.lang.String).
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if an exception occurred while processing the response document.

WebLogic Process Integrator Version 1.1

WebLogic and Process Integrator are trademarks of BEA Systems, Inc.
Copyright (c) 2000 BEA Systems, Inc., 8920 Woodbine Avenue, Suite 400,
Markham, Ontario L3R 9W9 Canada. All rights reserved.