|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.object.PersistentObject
com.waveset.object.WorkItem
This class is used to represent the state of a work list item. These were formerly called "workflow tasks" but the name was changed to prevent confusion with TaskInstance.
A work item is created for each manual Action in the workfow process. Work items are "owned" by a particular Administrator, and the GUI is expected to provide a way to examine the assigned work items and edit them.
The work item will contain a set of variable values copied from the running case. By default it will contain a complete set of all workflow variables, this can be restricted by setting the "exposedVariables" and "editableVariables" lists in the associated action definition.
Nested Class Summary |
Nested classes inherited from class com.waveset.object.PersistentObject |
PersistentObject.Comparator, PersistentObject.InitialInstance |
Field Summary | |
static java.lang.String |
APPROVAL
|
static java.lang.String |
ATT_IGNORE_TIMEOUT
|
static java.lang.String |
ATT_ITEM_TYPE
|
static java.lang.String |
ATT_REQUEST
|
static java.lang.String |
ATT_REQUESTER
|
static java.lang.String |
ATT_SYNCEXEC
|
static java.lang.String |
ATT_TIMEOUT
|
static java.lang.String |
code_id
|
static java.lang.String |
EL_DESCRIPTION
|
static java.lang.String |
EL_FORMREF
|
static java.lang.String |
EL_TASKREF
|
static java.lang.String |
EL_VARIABLES
|
static java.lang.String |
EL_VIEWS
|
static java.lang.String |
REVIEW
|
static java.lang.String |
SUSPEND
|
static java.lang.String |
VAR_COMMENTS
The name of a variable that may be used to place explanitory comments in the work item. |
static java.lang.String |
WIZARD
|
Fields inherited from class com.waveset.object.PersistentObject |
_trace, trace |
Constructor Summary | |
WorkItem()
Build an empty work item. |
|
WorkItem(org.w3c.dom.Element e)
Build a work item from its XML representation. |
Method Summary | |
protected void |
addSubclassAttributes(java.lang.StringBuffer buf)
Each concrete subclass may append to the buffer an XML representation of any fields it adds to PersistentObject (if those field values must persist). |
protected void |
addSubclassElements(java.lang.StringBuffer buf)
Each concrete subclass may append to the buffer an XML representation of any fields it adds to PersistentObject (if those field values must persist). |
void |
clearDirty()
Clear the dirty flag. |
java.lang.String |
getActivityName()
Get the name of the associated workflow process activity. |
protected WSAttribute |
getAttributeValues(java.lang.String attrName)
|
WFCase.Result |
getCaseResult()
|
java.lang.String |
getDelegator()
Get the delegator of this work item, if any. |
java.lang.String |
getDescription()
|
Form |
getForm()
Get the form for this work item. |
ObjectRef |
getFormRef()
Get the form reference. |
java.lang.String |
getItemType()
|
Form |
getLocalForm()
Get the local form. |
java.lang.String |
getOwner()
Get the owner of this item. |
java.lang.String |
getProcessName()
Get the name of the associated workflow process. |
java.util.ArrayList |
getReferences()
Return the list of references within this object. |
java.lang.String |
getRequest()
|
java.lang.String |
getRequester()
|
WSAttributes |
getSummaryAttributes()
|
TaskInstance |
getTask()
Get the resolved TaskInstance that contains our WorkflowCase. |
ObjectRef |
getTaskRef()
Get a reference to the TaskInstance that contains our WorkflowCase. |
java.util.Date |
getTimeout()
Get the work item timeout. |
java.lang.String |
getTrackingId()
Get the optional tracking id. |
Type |
getType()
Returns the associated Type object. |
java.lang.Object |
getVariable(Attribute attr)
Get the value of a variable. |
java.lang.Object |
getVariable(java.lang.String name)
Get the value of a variable. |
GenericObject |
getVariables()
Get the entire variable table. |
java.util.List |
getViews()
|
boolean |
isComplete()
Test the completion state of the item. |
boolean |
isDirty()
Test the dirty flag. |
boolean |
isIgnoreTimeout()
|
boolean |
isSyncExec()
|
java.util.List |
listQueryableAttributes()
|
java.util.List |
listQueryableReferenceAttributes()
|
java.util.List |
listSummaryAttributes()
Returns the complete list of defined attributes
that this type of persistent object exposes as summary attributes
(regardless of whether this particular object has a value for each). |
protected void |
parseSubclassAttributes(org.w3c.dom.Element e)
Each concrete subclass should parse from the XML buffer any persisted subclass-specific fields (generally, the same ones that it writes into the buffer). |
protected void |
parseSubclassElements(org.w3c.dom.Element e)
Each concrete subclass should parse from the XML buffer any persisted subclass-specific elements (generally, the same ones that it writes into the buffer). |
void |
setActivityName(java.lang.String s)
Get the name of the associated workflow process activity. |
void |
setCaseResult(WFCase.Result r)
|
void |
setComplete(boolean b)
Set the completion state of the item. |
void |
setDelegator(java.lang.String delegator)
|
void |
setDescription(java.lang.String s)
|
void |
setFormRef(ObjectRef ref)
Set the form reference. |
void |
setIgnoreTimeout(boolean b)
|
void |
setItemType(java.lang.String s)
|
void |
setLocalForm(Form f)
Set the local form. |
void |
setOwner(java.lang.String s)
Set the owner of this item. |
void |
setProcessName(java.lang.String s)
Set the name of the associated workflow process. |
void |
setRequest(java.lang.String s)
|
void |
setRequester(java.lang.String s)
|
void |
setSyncExec(boolean b)
|
void |
setTask(TaskInstance t)
Set the resolved TaskInstance that contains our WorkflowCase. |
void |
setTaskRef(ObjectRef ref)
Set the reference to the TaskInstance that contains our WorkflowCase. |
void |
setTimeout(java.util.Date d)
Set the work item timeout. |
void |
setTrackingId(java.lang.String id)
Set an optional tracking ID. |
void |
setVariable(java.lang.String name,
java.lang.Object value)
Set one variable. |
void |
setVariables(GenericObject src)
Bulk assignment of variables. |
void |
setViews(java.util.List views)
|
void |
visit(Visitor v)
Visitor interface. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String APPROVAL
public static final java.lang.String WIZARD
public static final java.lang.String SUSPEND
public static final java.lang.String REVIEW
public static final java.lang.String VAR_COMMENTS
public static final java.lang.String ATT_ITEM_TYPE
public static final java.lang.String ATT_TIMEOUT
public static final java.lang.String ATT_SYNCEXEC
public static final java.lang.String ATT_REQUEST
public static final java.lang.String ATT_REQUESTER
public static final java.lang.String ATT_IGNORE_TIMEOUT
public static final java.lang.String EL_TASKREF
public static final java.lang.String EL_VARIABLES
public static final java.lang.String EL_FORMREF
public static final java.lang.String EL_DESCRIPTION
public static final java.lang.String EL_VIEWS
Constructor Detail |
public WorkItem()
public WorkItem(org.w3c.dom.Element e) throws WavesetException
Method Detail |
public void setCaseResult(WFCase.Result r)
public Type getType()
getType
in class PersistentObject
public java.util.ArrayList getReferences()
getReferences
in class PersistentObject
public void visit(Visitor v) throws WavesetException
visit
in class PersistentObject
WavesetException
public java.lang.String getOwner()
public void setOwner(java.lang.String s)
This will be set up originally by the workflow case, it may be changed after it has been created if you want to reassign the item to someone else. // *
// * Hmm, might want to use an ObjectRef here to support // * Administrator account rename.
public java.lang.String getDelegator()
public void setDelegator(java.lang.String delegator)
public java.util.Date getTimeout()
public void setTimeout(java.util.Date d)
public ObjectRef getTaskRef()
public void setTaskRef(ObjectRef ref)
public TaskInstance getTask() throws WavesetException
WavesetException
public void setTask(TaskInstance t)
public java.lang.String getProcessName()
public void setProcessName(java.lang.String s)
public java.lang.String getActivityName()
public void setActivityName(java.lang.String s)
public boolean isComplete()
public void setComplete(boolean b)
This must be called by an application that provides a "work list" to the owner. The owner may decide to complete without modifying variables, modify variables without completing or both.
public boolean isDirty()
public void clearDirty()
public void setTrackingId(java.lang.String id)
public java.lang.String getTrackingId()
public ObjectRef getFormRef()
public void setFormRef(ObjectRef ref)
public Form getLocalForm()
public void setLocalForm(Form f)
public Form getForm() throws WavesetException
WavesetException
public void setDescription(java.lang.String s)
public java.lang.String getDescription()
public void setSyncExec(boolean b)
public boolean isSyncExec()
public java.lang.String getRequest()
public void setRequest(java.lang.String s)
public java.lang.String getRequester()
public void setRequester(java.lang.String s)
public void setViews(java.util.List views)
public java.util.List getViews()
public void setIgnoreTimeout(boolean b)
public boolean isIgnoreTimeout()
public WFCase.Result getCaseResult()
public void setItemType(java.lang.String s)
public java.lang.String getItemType()
public void setVariables(GenericObject src)
public java.lang.Object getVariable(Attribute attr)
public java.lang.Object getVariable(java.lang.String name)
public void setVariable(java.lang.String name, java.lang.Object value)
public GenericObject getVariables()
public java.util.List listSummaryAttributes()
PersistentObject
defined attributes
that this type of persistent object exposes as summary attributes
(regardless of whether this particular object has a value for each).
Any subclass of PersistentObject that overrides this method
should first invoke super.listSummaryAttributes()
to ensure that the subclass includes summary attributes
that are common to all PersistentObjects.
Any subclass that overrides this implementation must also consider the length of the summary string that will be generated from these attributes.
listSummaryAttributes
in class PersistentObject
defined attributes
that this type of persistent object exposes as summary attributes
(regardless of whether this particular object has a value for each).
Any subclass of PersistentObject that overrides this method
should first invoke super.listSummaryAttributes()
to ensure that the subclass includes summary attributes
that are common to all PersistentObjects.
Constants.MAX_SUMMARY_STRING_LENGTH
,
PersistentObject.getSummaryString()
public java.util.List listQueryableAttributes()
listQueryableAttributes
in class PersistentObject
defined attributes
that this type of persistent object exposes as queryable attributes
(regardless of whether this particular object has a value for each).
Any subclass of PersistentObject that overrides this method
should first invoke super.listQueryableAttributes()
to ensure that the subclass includes queryable attributes
that are common to all PersistentObjects.
public java.util.List listQueryableReferenceAttributes()
listQueryableReferenceAttributes
in class PersistentObject
defined attributes
that this type of persistent object exposes as queryable attributes
and for which each value is a reference to another persistent object.public WSAttributes getSummaryAttributes()
getSummaryAttributes
in class PersistentObject
attribute values
to be displayed when this object appears in a list.
The WSAttributes
contains
a WSAttribute
for each summary attribute.
Each WSAttribute
may contain multiple values.
Any subclass of PersistentObject that overrides this method
should first invoke super.getSummaryAttributes()
to ensure that the subclass includes summary attributes
that are common to all PersistentObjects.
If a subclass wants to expose a different set of summary attributes,
that subclass should override {@link #listSummaryAttributes}.
In order to supply values for summary attributes
that may not be available in PersistentObject
(e.g., from a field specified to that subclass),
such a subclass may also override {@link #getAttributeValues(Attribute)}.
A subclass should not need to override this method
(except to limit the number of values for a summary attribute).
protected WSAttribute getAttributeValues(java.lang.String attrName)
getAttributeValues
in class PersistentObject
attrName
- - the name of the attribute for which to return values.
WSAttribute
that represents the value (or values)
that this object contains for the specified attribute.
protected void addSubclassAttributes(java.lang.StringBuffer buf)
PersistentObject
NOTE: Any subclass that overrides this method must similarly override parseSubclassAttributes() so that the subclass attributes are restored.
addSubclassAttributes
in class PersistentObject
protected void addSubclassElements(java.lang.StringBuffer buf)
PersistentObject
NOTE: Any subclass that overrides this method must similarly override parseSubclassElements() so that the subclass elements are restored.
addSubclassElements
in class PersistentObject
protected void parseSubclassAttributes(org.w3c.dom.Element e) throws WavesetException
PersistentObject
parseSubclassAttributes
in class PersistentObject
WavesetException
PersistentObject's default implementation is a no-op.
,
PersistentObject.parseXml(Element)
protected void parseSubclassElements(org.w3c.dom.Element e) throws WavesetException
PersistentObject
parseSubclassElements
in class PersistentObject
WavesetException
PersistentObject's default implementation is a no-op.
,
PersistentObject.parseXml(Element)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |