xflow.common
Class WorkItem

java.lang.Object
  |
  +--xflow.common.WorkItem
All Implemented Interfaces:
java.io.Serializable

public class WorkItem
extends java.lang.Object
implements java.io.Serializable

This class represents a work item that gets routed to a process.

See Also:
Serialized Form

Field Summary
static java.lang.String JAVA_OBJECT
           
static java.lang.String XML
           
 
Constructor Summary
WorkItem()
          Constructor
WorkItem(xflow.common.WorkItemId wid)
          Constructor
 
Method Summary
 xflow.common.WorkItemId getId()
          Gets the work item ID
 java.lang.Object getPayload()
          Gets the payload of this work item.
 java.lang.String getPayloadType()
          Gets the payload type of this work item.
 java.util.HashMap getProperties()
          Gets a work item's property hash map
 java.lang.Object getProperty(java.lang.String key)
          Gets a work item's property
 xflow.common.WorkflowId getWorkflowId()
          Gets the workflow instance ID
 void setId(xflow.common.WorkItemId id)
          Sets the work item ID
 void setPayload(java.lang.Object pload)
          Sets the payload of this work item.
 void setPayloadType(java.lang.String pt)
          Sets the payload type of this work item.
 void setProperties(java.util.HashMap m)
          Sets a work item's property hash map
 void setProperty(java.lang.String key, java.lang.Object value)
          Sets a property on a work item
 void setWorkflowId(xflow.common.WorkflowId wfId)
          Sets the workflow instance ID
 java.lang.String toString()
          Gets the string representation of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

JAVA_OBJECT

public static final java.lang.String JAVA_OBJECT
See Also:
Constant Field Values

XML

public static final java.lang.String XML
See Also:
Constant Field Values
Constructor Detail

WorkItem

public WorkItem()
Constructor


WorkItem

public WorkItem(xflow.common.WorkItemId wid)
Constructor

Parameters:
wid - a work item ID
Method Detail

getId

public xflow.common.WorkItemId getId()
Gets the work item ID

Returns:
the work item ID

setId

public void setId(xflow.common.WorkItemId id)
Sets the work item ID

Parameters:
id - the work item ID

getWorkflowId

public xflow.common.WorkflowId getWorkflowId()
Gets the workflow instance ID

Returns:
the workflow instance ID

setWorkflowId

public void setWorkflowId(xflow.common.WorkflowId wfId)
Sets the workflow instance ID

Parameters:
wfId - the workflow instance ID

setPayload

public void setPayload(java.lang.Object pload)
Sets the payload of this work item.

Parameters:
pload - the payload

getPayload

public java.lang.Object getPayload()
Gets the payload of this work item.

Returns:
the payload

setPayloadType

public void setPayloadType(java.lang.String pt)
Sets the payload type of this work item.

Parameters:
pt - the payload type - JAVA_OBJECT or XML

getPayloadType

public java.lang.String getPayloadType()
Gets the payload type of this work item.

Returns:
the payload type - JAVA_OBJECT or XML

getProperty

public java.lang.Object getProperty(java.lang.String key)
Gets a work item's property

Parameters:
key - the property name
Returns:
the property value

setProperty

public void setProperty(java.lang.String key,
                        java.lang.Object value)
Sets a property on a work item

Parameters:
key - the property name
value - the property value - must be serializable

getProperties

public java.util.HashMap getProperties()
Gets a work item's property hash map

Returns:
the property hash map

setProperties

public void setProperties(java.util.HashMap m)
Sets a work item's property hash map

Parameters:
m - the property hash map

toString

public java.lang.String toString()
Gets the string representation of this object

Overrides:
toString in class java.lang.Object
Returns:
the string representation