xflow.client
Class WorkflowProcess

java.lang.Object
  |
  +--xflow.client.WorkflowProcess
All Implemented Interfaces:
javax.jms.MessageListener

public class WorkflowProcess
extends java.lang.Object
implements javax.jms.MessageListener

A WorkflowProcess receives work items from the XFlow system and "works" on them. It is bound or associated to a node in the workflow model.


Constructor Summary
WorkflowProcess(java.lang.String wfName, int wfVersion, java.lang.String processName, xflow.client.InboxMessageListener listener, xflow.security.User u)
          WorkflowProcess constructor
 
Method Summary
 void completeWorkItem(xflow.common.WorkItem workItem)
          Completes a work item.
 xflow.common.WorkItem getNextWorkItem()
          Gets the next work item (in First-In-First-Out order) from the inbox
 xflow.common.WorkItem getWorkItem(xflow.common.WorkItemId workItemId)
          Gets a work item with a specific work item ID from the inbox
 java.util.Vector getWorkItems()
          Gets a list of work items from this process's inbox.
 void onMessage(javax.jms.Message msg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkflowProcess

public WorkflowProcess(java.lang.String wfName,
                       int wfVersion,
                       java.lang.String processName,
                       xflow.client.InboxMessageListener listener,
                       xflow.security.User u)
                throws XflowException
WorkflowProcess constructor

Parameters:
wfName - the workflow name
wfVersion - the workflow version - set to -1 if the latest version is to be used
processName - the process name - must be the name of a valid process node in the workflow model
listener - the inbox listener for asynchronous delivery of work items - may be null
Throws:
XflowException
Method Detail

onMessage

public void onMessage(javax.jms.Message msg)
Specified by:
onMessage in interface javax.jms.MessageListener

getWorkItems

public java.util.Vector getWorkItems()
                              throws XflowException
Gets a list of work items from this process's inbox.

Returns:
A list of WorkItem objects
Throws:
XflowException

getNextWorkItem

public xflow.common.WorkItem getNextWorkItem()
                                      throws XflowException
Gets the next work item (in First-In-First-Out order) from the inbox

Returns:
A WorkItem object or null - if there are no work items.
Throws:
XflowException

getWorkItem

public xflow.common.WorkItem getWorkItem(xflow.common.WorkItemId workItemId)
                                  throws XflowException
Gets a work item with a specific work item ID from the inbox

Returns:
A WorkItem object or null - if there is no such work item
Throws:
XflowException

completeWorkItem

public void completeWorkItem(xflow.common.WorkItem workItem)
                      throws XflowException
Completes a work item. This is typically invoked by a workflow process after it is done with its processing of the work item.

Throws:
XflowException