xflow.common
Class WorkItem

java.lang.Object
  extended byxflow.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 TXT
           
static java.lang.String XML
           
 
Constructor Summary
WorkItem()
          Constructor
WorkItem(java.lang.Integer wid)
          Constructor
 
Method Summary
 void _setPayloadType(java.lang.String pt)
          Sets the payload type of this work item.
 java.lang.Integer 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
 java.lang.Integer getWorkflowId()
          Gets the workflow instance ID
 WorkItem makeCopy()
           
 void setId(java.lang.Integer id)
          Sets the work item ID
 void setPayload(java.lang.Object pload)
          Sets the payload of this work item.
 void setPayloadAsJavaObject(java.lang.Object payload)
           
 void setPayloadTXT(java.lang.String s)
           
 void setPayloadXML(java.lang.String s)
           
 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(java.lang.Integer 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

TXT

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

WorkItem

public WorkItem()
Constructor


WorkItem

public WorkItem(java.lang.Integer wid)
Constructor

Parameters:
wid - a work item ID
Method Detail

getId

public java.lang.Integer getId()
Gets the work item ID

Returns:
the work item ID

setId

public void setId(java.lang.Integer id)
Sets the work item ID

Parameters:
id - the work item ID

getWorkflowId

public java.lang.Integer getWorkflowId()
Gets the workflow instance ID

Returns:
the workflow instance ID

setWorkflowId

public void setWorkflowId(java.lang.Integer 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

Returns:
the string representation

setPayloadAsJavaObject

public void setPayloadAsJavaObject(java.lang.Object payload)

setPayloadXML

public void setPayloadXML(java.lang.String s)

setPayloadTXT

public void setPayloadTXT(java.lang.String s)

makeCopy

public WorkItem makeCopy()