Novell exteNd
Director 5.0 API

com.sssw.wf.client
Interface EbiQueueDelegate

All Superinterfaces:
EbiDelegate

public interface EbiQueueDelegate
extends EbiDelegate

The delegate interface needed for access to the work queue


Field Summary
static int QUEUE_STATUS_RUNNING
          Constant to be used when setting queue status to running.
static int QUEUE_STATUS_SHUTDOWN
          Constant to be used when setting queue status to shudown.
static int QUEUE_STATUS_SUSPENDED
          Constant to be used when setting queue status to suspended.
 
Fields inherited from interface com.sssw.fw.api.EbiDelegate
SERVICE_LOCAL, SERVICE_REMOTE
 
Method Summary
 void forward(EbiWorkitemDelegate delegate)
          Forwards a workitem to the next activity.
 void forward(EbiWorkitemDelegate delegate, EbiContext context)
          Forwards a workitem to the next activity.
 void forward(String workitemId)
          Forwards a workitem to the next activity.
 EbiWorkitemDelegate getNextWorkitem(EbiContext context)
          Gets the next workitem.
 EbiWorkitemDelegate getNextWorkitem(String activity)
          Deprecated. This method is applicable only for Director 4.x java activities migrated to 5.0. Use getNextWorkitem( Ebicontext ) as the alternative for all newly created java activities starting in 5.0 and later.
 int getQueueStatus()
          Gets the queue status
 EbiWorkitemDelegate getWorkitem(String workitemId)
          Gets a workitem by workitem id.
 EbiWorkitemDelegate getWorkitem(String workitemId, EbiContext context)
          Gets a workitem by workitem id.
 org.w3c.dom.Document getWorklist(EbiContext context)
          Gets a queued workitem list for a 'non-automatic' activity.
 org.w3c.dom.Document getWorklist(EbiContext context, boolean excludeClaimedWorkitems, boolean excludedUnclaimedWorkitems)
          Gets a queued workitem list for the user or role in the context, optionally excluding all the claimed workitems or unclaimed workitems.
 org.w3c.dom.Document getWorklist(String activity)
          Deprecated. This method is not applicable for automatic activities that implement EbiJavaActivity.
 org.w3c.dom.Document getWorklist(String[] addressee, String name, Integer priority, boolean ignoreSuspendedActivities)
          Gets a worklist based on customized parameters.
 void reassignWorkitem(String workitemId, String newAddressee, EbiContext context)
          Reassign a workitem to a new user.
 void removeWorkitem(String workitemId, boolean terminateActivity)
          Removes a workitem from the queue.
 void setQueueStatus(int status)
          Deprecated. This is no longer the way to perform operations on the Queue's status. Individual functions are now provided for the user to perform the disired operation. Use startQueue(), or shutdownQueue(), or suspendQueue() when appropriate.
 void shutdownQueue()
          Shutdown the queue.
 void startQueue()
          Start the queue.
 void suspendQueue()
          Suspend the queue.
 
Methods implemented from interface com.sssw.fw.api.EbiDelegate
getName
 

Field Detail

QUEUE_STATUS_RUNNING

public static final int QUEUE_STATUS_RUNNING
Constant to be used when setting queue status to running.
See Also:
setQueueStatus()

QUEUE_STATUS_SUSPENDED

public static final int QUEUE_STATUS_SUSPENDED
Constant to be used when setting queue status to suspended.
See Also:
setQueueStatus()

QUEUE_STATUS_SHUTDOWN

public static final int QUEUE_STATUS_SHUTDOWN
Constant to be used when setting queue status to shudown.
See Also:
setQueueStatus()
Method Detail

getWorkitem

public EbiWorkitemDelegate getWorkitem(String workitemId)
                                throws EboWorkitemException
Gets a workitem by workitem id.
Parameters:
workitemId - The id of the workitem desired.
Returns:
Returns an EbiWorkitemDelegate of the workitem retrieved.
Throws:
EboWorkitemException - Throws an EboWorkitemException if the workitem cannot be retrieved.
See Also:
EbiWorkitemDelegate

getWorkitem

public EbiWorkitemDelegate getWorkitem(String workitemId,
                                       EbiContext context)
                                throws EboWorkitemException,
                                       EboQueueException
Gets a workitem by workitem id. Need a context for security purposes.
Parameters:
workitemId - The id of the workitem desired.
context - The context for the current activity/user.
Returns:
an EbiWorkitemDelegate of the workitem retrieved.
Throws:
EboWorkitemException - Throws an EboWorkitemException if the workitem cannot be retrieved.
EboQueueException -  
See Also:
EbiWorkitemDelegate, EbiContext

getNextWorkitem

public EbiWorkitemDelegate getNextWorkitem(EbiContext context)
Gets the next workitem. Claims this workitem for the user or role in the context.
Parameters:
context - The context of the current user/activity.
Returns:
an EbiWorkitemDelegate of the workitem retrieved.
See Also:
EbiWorkitemDelegate

getNextWorkitem

public EbiWorkitemDelegate getNextWorkitem(String activity)
Deprecated. This method is applicable only for Director 4.x java activities migrated to 5.0. Use getNextWorkitem( Ebicontext ) as the alternative for all newly created java activities starting in 5.0 and later.

Gets the next workitem for a 'java' activity.
Parameters:
activity - The current activity class name. To get the class name of the activity, call this.getClass().getName().
Returns:
an EbiWorkitemDelegate of the next workitem for this activity
See Also:
EbiWorkitemDelegate

forward

public void forward(String workitemId)
             throws EboWorkitemException
Forwards a workitem to the next activity. This signifies that an activity is complete and the process should continue.
Parameters:
workitemId - The id of the workitem to forward.
Throws:
EboWorkitemException - Throws an exception if the workitem cannot be determined from the id.

forward

public void forward(EbiWorkitemDelegate delegate)
Forwards a workitem to the next activity. This signifies that an activity is complete and the process should continue.
Parameters:
delegate - The workitem to forward.
See Also:
EbiWorkitemDelegate

forward

public void forward(EbiWorkitemDelegate delegate,
                    EbiContext context)
Forwards a workitem to the next activity. This signifies that an activity is complete and the process should continue.
Parameters:
delegate - The workitem to forward.
context - The requestor's context.
See Also:
EbiWorkitemDelegate

getWorklist

public org.w3c.dom.Document getWorklist(String activity)
                                 throws EboWorkitemException
Deprecated. This method is not applicable for automatic activities that implement EbiJavaActivity.

Gets a worklist for an 'automatic' activity that implements EbiActivity.
Parameters:
activity - classname of the user implementation of EbiActivity.
Returns:
A document that contains the worklist. It adheres to workflow-worklist_3_0.dtd.
Throws:
EboWorkitemException - Throws an EboWorkitemException if the worklist cannot get generated.

getWorklist

public org.w3c.dom.Document getWorklist(EbiContext context)
                                 throws EboWorkitemException
Gets a queued workitem list for a 'non-automatic' activity. Retrieves both claimed and unclaimed queued workitems.
Parameters:
context - The context for the current user/activity.
Returns:
A document that contains the worklist. It adheres to workflow-worklist_3_0.dtd.
Throws:
EboWorkitemException - throws an EboWorkitemException if the worklist cannot be generated.

getWorklist

public org.w3c.dom.Document getWorklist(EbiContext context,
                                        boolean excludeClaimedWorkitems,
                                        boolean excludedUnclaimedWorkitems)
                                 throws EboWorkitemException
Gets a queued workitem list for the user or role in the context, optionally excluding all the claimed workitems or unclaimed workitems.
Parameters:
context - The context for the current user/activity.
excludeClaimedWorkitems - If true, will get only unclaimed workitems.
excludeUnclaimedWorkitems - If true, will get only claimed workitems.
Returns:
A document that contains the worklist. It adheres to workflow-worklist_3_0.dtd.
Throws:
EboWorkitemException -  

getWorklist

public org.w3c.dom.Document getWorklist(String[] addressee,
                                        String name,
                                        Integer priority,
                                        boolean ignoreSuspendedActivities)
                                 throws EboWorkitemException
Gets a worklist based on customized parameters. This is primarily used for administration purposes.
Parameters:
addressee - An array of addressees to lookup. Optional
name - The name of the workitem. Optional
priority - The priority of the workitem to lookup. Optional
ignoreSuspendedActivities - Whether or not to include suspended activities in the result set.
Returns:
A document that contains the worklist. It adheres to workflow-worklist_3_0.dtd.
Throws:
EboWorkitemException - Throws an EboWorkitemException if the worklist cannot be created.

setQueueStatus

public void setQueueStatus(int status)
                    throws EboQueueException
Deprecated. This is no longer the way to perform operations on the Queue's status. Individual functions are now provided for the user to perform the disired operation. Use startQueue(), or shutdownQueue(), or suspendQueue() when appropriate.

Sets the queue status.
Parameters:
status - The status to set the queue to.
Throws:
EboQueueException - Throws an EboQueueException if the status cannot be altered.

startQueue

public void startQueue()
                throws EboQueueException
Start the queue.
Throws:
EboQueueException - Throws an EboQueueException if the status cannot be altered.

suspendQueue

public void suspendQueue()
                  throws EboQueueException
Suspend the queue.
Throws:
EboQueueException - Throws an EboQueueException if the status cannot be altered.

shutdownQueue

public void shutdownQueue()
                   throws EboQueueException
Shutdown the queue.
Throws:
EboQueueException - Throws an EboQueueException if the status cannot be altered.

getQueueStatus

public int getQueueStatus()
                   throws EboQueueException
Gets the queue status
Returns:
The current status of the queue.
Throws:
EboQueueException - Throws an exception if the status cannot be determined.

removeWorkitem

public void removeWorkitem(String workitemId,
                           boolean terminateActivity)
                    throws EboQueueException
Removes a workitem from the queue. Primarily for administrative purposes.
Parameters:
workitemId - The workitem id to be removed.
terminateActivity - If the activity is 'automatic', the terminate method will be fired.
Throws:
EboQueueException - Throws an EboQueueException if the workitem cannot be determined or cannot be stopped.

reassignWorkitem

public void reassignWorkitem(String workitemId,
                             String newAddressee,
                             EbiContext context)
                      throws EboQueueException
Reassign a workitem to a new user. Primarily for administrative purposes.
Parameters:
workitemId - The workitem id to be removed.
newAddressee - The new addresse who the worktiem will be assigned to.
EbiContext - The context for the current queue.
Throws:
EboQueueException - Throws an EboQueueException if the workitem cannot be determined or cannot be stopped.

Novell exteNd
Director 5.0 API