org.yawlfoundation.yawl.engine
Class YWorkItem

java.lang.Object
  extended by org.yawlfoundation.yawl.engine.YWorkItem

public class YWorkItem
extends Object

Author:
Lachlan Aldred Date: 28/05/2003 Time: 15:29:33 Refactored for v2.0 by Michael Adams 10/2007 - 12/2009

Constructor Summary
YWorkItem()
           
YWorkItem(YPersistenceManager pmgr, YSpecificationID specID, YTask task, YWorkItemID workItemID, boolean allowsDynamicCreation, boolean isDeadlocked)
          Creates an enabled WorkItem
 
Method Summary
 void add_child(YWorkItem child)
           
 void add_children(Set children)
           
 void addToRepository()
           
 boolean allowsDynamicCreation()
           
 void cancel(YPersistenceManager pmgr)
          removes workitems from persistence when cancelled
 void checkStartTimer(YPersistenceManager pmgr, YNetData data)
           
 void completeData(YPersistenceManager pmgr, org.jdom.Document output)
          write output data values to event log
 YWorkItem createChild(YPersistenceManager pmgr, YIdentifier childCaseID)
           
 boolean equals(Object other)
           
 boolean get_allowsDynamicCreation()
           
 Set get_children()
           
 String get_dataString()
           
 String get_deferredChoiceGroupID()
           
 Date get_enablementTime()
           
 String get_externalClient()
           
 Date get_firingTime()
           
 YWorkItem get_parent()
           
 String get_prevStatus()
           
 String get_specIdentifier()
           
 String get_specUri()
           
 String get_specVersion()
           
 Date get_startTime()
           
 String get_status()
           
 String get_thisID()
           
 Hashtable<String,String> getAttributes()
           
 YIdentifier getCaseID()
           
 Set<YWorkItem> getChildren()
           
 String getCodelet()
           
 URL getCustomFormURL()
           
 org.jdom.Element getDataElement()
           
 String getDataString()
           
 String getDeferredChoiceGroupID()
           
 String getDocumentation()
           
 Date getEnablementTime()
           
 String getEnablementTimeStr()
           
 YClient getExternalClient()
           
 Date getFiringTime()
           
 String getFiringTimeStr()
           
 String getIDString()
           
 YNetRunner getNetRunner()
           
 YWorkItem getParent()
           
 YSpecificationID getSpecificationID()
           
 String getSpecName()
           
 Date getStartTime()
           
 String getStartTimeStr()
           
 YWorkItemStatus getStatus()
           
 YTask getTask()
           
 String getTaskID()
           
 long getTimerExpiry()
           
 Map getTimerParameters()
           
 String getTimerStatus()
           
 YWorkItemID getWorkItemID()
           
 boolean hasChildren()
           
 boolean hasCompletedStatus()
           
 boolean hasFinishedStatus()
           
 int hashCode()
           
 boolean hasLiveStatus()
           
 boolean hasTimerStarted()
           
 boolean hasUnfinishedStatus()
           
 boolean isEnabledSuspended()
           
 boolean requiresManualResourcing()
           
 void restoreDataToNet(Set<YAWLServiceReference> services)
           
 void rollBackStatus(YPersistenceManager pmgr)
           
 void set_allowsDynamicCreation(boolean a)
           
 void set_dataString(String s)
           
 void set_deferredChoiceGroupID(String id)
           
 void set_enablementTime(Date eTime)
           
 void set_externalClient(String owner)
           
 void set_firingTime(Date fTime)
           
 void set_parent(YWorkItem parent)
           
 void set_prevStatus(String status)
           
 void set_specIdentifier(String id)
           
 void set_specUri(String uri)
           
 void set_specVersion(String version)
           
 void set_startTime(Date sTime)
           
 void set_status(String status)
           
 void set_thisID(String thisID)
           
 void setAttributes(Map<String,String> attributes)
           
 void setCodelet(String codelet)
           
 void setCustomFormURL(URL formURL)
           
 void setData(YPersistenceManager pmgr, org.jdom.Element data)
          write data input values to event log
 void setDeferredChoiceGroupID(String id)
           
 void setExternalLogPredicate(String predicate)
           
 void setInitData(org.jdom.Element data)
           
 void setRequiresManualResourcing(boolean requires)
           
 void setStatus(YWorkItemStatus status)
           
 void setStatusToComplete(YPersistenceManager pmgr, YEngine.WorkItemCompletion completionFlag)
           
 void setStatusToDeleted(YPersistenceManager pmgr)
           
 void setStatusToDiscarded(YPersistenceManager pmgr)
          announces and logs that this workitem has been discarded - ie.
 void setStatusToStarted(YPersistenceManager pmgr, YClient client)
           
 void setStatusToSuspended(YPersistenceManager pmgr)
           
 void setStatusToUnsuspended(YPersistenceManager pmgr)
           
 void setTask(YTask task)
           
 void setTimerExpiry(long time)
           
 void setTimerParameters(Map params)
           
 void setTimerStarted(boolean started)
           
 void setWorkItemID(YWorkItemID workitemid)
           
 String toString()
           
 String toXML()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

YWorkItem

public YWorkItem()

YWorkItem

public YWorkItem(YPersistenceManager pmgr,
                 YSpecificationID specID,
                 YTask task,
                 YWorkItemID workItemID,
                 boolean allowsDynamicCreation,
                 boolean isDeadlocked)
          throws YPersistenceException
Creates an enabled WorkItem

Throws:
YPersistenceException
Method Detail

addToRepository

public void addToRepository()

createChild

public YWorkItem createChild(YPersistenceManager pmgr,
                             YIdentifier childCaseID)
                      throws YPersistenceException
Throws:
YPersistenceException

setExternalLogPredicate

public void setExternalLogPredicate(String predicate)

setData

public void setData(YPersistenceManager pmgr,
                    org.jdom.Element data)
             throws YPersistenceException
write data input values to event log

Throws:
YPersistenceException

completeData

public void completeData(YPersistenceManager pmgr,
                         org.jdom.Document output)
write output data values to event log


restoreDataToNet

public void restoreDataToNet(Set<YAWLServiceReference> services)
                      throws YPersistenceException
Throws:
YPersistenceException

cancel

public void cancel(YPersistenceManager pmgr)
            throws YPersistenceException
removes workitems from persistence when cancelled

Throws:
YPersistenceException

checkStartTimer

public void checkStartTimer(YPersistenceManager pmgr,
                            YNetData data)
                     throws YPersistenceException
Throws:
YPersistenceException

hasLiveStatus

public boolean hasLiveStatus()
Returns:
true if workitem is 'live'

hasFinishedStatus

public boolean hasFinishedStatus()
Returns:
true if workitem is finished

hasCompletedStatus

public boolean hasCompletedStatus()
Returns:
true if workitem has completed

hasUnfinishedStatus

public boolean hasUnfinishedStatus()
Returns:
true if workitem is not finished

isEnabledSuspended

public boolean isEnabledSuspended()
Returns:
true if workitem is suspended from enabled status

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

setStatusToStarted

public void setStatusToStarted(YPersistenceManager pmgr,
                               YClient client)
                        throws YPersistenceException
Throws:
YPersistenceException

setStatusToComplete

public void setStatusToComplete(YPersistenceManager pmgr,
                                YEngine.WorkItemCompletion completionFlag)
                         throws YPersistenceException
Throws:
YPersistenceException

setStatusToDeleted

public void setStatusToDeleted(YPersistenceManager pmgr)
                        throws YPersistenceException
Throws:
YPersistenceException

setStatusToDiscarded

public void setStatusToDiscarded(YPersistenceManager pmgr)
announces and logs that this workitem has been discarded - ie. left in the net when the net completed


rollBackStatus

public void rollBackStatus(YPersistenceManager pmgr)
                    throws YPersistenceException
Throws:
YPersistenceException

setStatusToSuspended

public void setStatusToSuspended(YPersistenceManager pmgr)
                          throws YPersistenceException
Throws:
YPersistenceException

setStatusToUnsuspended

public void setStatusToUnsuspended(YPersistenceManager pmgr)
                            throws YPersistenceException
Throws:
YPersistenceException

set_parent

public void set_parent(YWorkItem parent)

get_parent

public YWorkItem get_parent()

get_children

public Set get_children()

hasChildren

public boolean hasChildren()

add_child

public void add_child(YWorkItem child)

add_children

public void add_children(Set children)

setWorkItemID

public void setWorkItemID(YWorkItemID workitemid)

get_thisID

public String get_thisID()

set_thisID

public void set_thisID(String thisID)

get_specIdentifier

public String get_specIdentifier()

get_specVersion

public String get_specVersion()

get_specUri

public String get_specUri()

set_specIdentifier

public void set_specIdentifier(String id)

set_specUri

public void set_specUri(String uri)

set_specVersion

public void set_specVersion(String version)

getAttributes

public Hashtable<String,String> getAttributes()

setAttributes

public void setAttributes(Map<String,String> attributes)

requiresManualResourcing

public boolean requiresManualResourcing()

setRequiresManualResourcing

public void setRequiresManualResourcing(boolean requires)

getCodelet

public String getCodelet()

setCodelet

public void setCodelet(String codelet)

getCustomFormURL

public URL getCustomFormURL()

setCustomFormURL

public void setCustomFormURL(URL formURL)

get_deferredChoiceGroupID

public String get_deferredChoiceGroupID()

set_deferredChoiceGroupID

public void set_deferredChoiceGroupID(String id)

get_enablementTime

public Date get_enablementTime()

set_enablementTime

public void set_enablementTime(Date eTime)

get_firingTime

public Date get_firingTime()

set_firingTime

public void set_firingTime(Date fTime)

get_startTime

public Date get_startTime()

set_startTime

public void set_startTime(Date sTime)

get_status

public String get_status()

set_status

public void set_status(String status)

get_prevStatus

public String get_prevStatus()

set_prevStatus

public void set_prevStatus(String status)

get_externalClient

public String get_externalClient()

set_externalClient

public void set_externalClient(String owner)

get_allowsDynamicCreation

public boolean get_allowsDynamicCreation()

set_allowsDynamicCreation

public void set_allowsDynamicCreation(boolean a)

get_dataString

public String get_dataString()

set_dataString

public void set_dataString(String s)

setInitData

public void setInitData(org.jdom.Element data)

setStatus

public void setStatus(YWorkItemStatus status)

getWorkItemID

public YWorkItemID getWorkItemID()

getEnablementTime

public Date getEnablementTime()

getEnablementTimeStr

public String getEnablementTimeStr()

getFiringTime

public Date getFiringTime()

getFiringTimeStr

public String getFiringTimeStr()

getStartTime

public Date getStartTime()

getStartTimeStr

public String getStartTimeStr()

getStatus

public YWorkItemStatus getStatus()

getParent

public YWorkItem getParent()

getChildren

public Set<YWorkItem> getChildren()

getCaseID

public YIdentifier getCaseID()

getTaskID

public String getTaskID()

getIDString

public String getIDString()

getDeferredChoiceGroupID

public String getDeferredChoiceGroupID()

setDeferredChoiceGroupID

public void setDeferredChoiceGroupID(String id)

getSpecName

public String getSpecName()

getSpecificationID

public YSpecificationID getSpecificationID()

getTimerParameters

public Map getTimerParameters()

setTimerParameters

public void setTimerParameters(Map params)

hasTimerStarted

public boolean hasTimerStarted()

setTimerStarted

public void setTimerStarted(boolean started)

getTimerExpiry

public long getTimerExpiry()

setTimerExpiry

public void setTimerExpiry(long time)

getTimerStatus

public String getTimerStatus()

allowsDynamicCreation

public boolean allowsDynamicCreation()

toString

public String toString()
Overrides:
toString in class Object

getExternalClient

public YClient getExternalClient()

getNetRunner

public YNetRunner getNetRunner()

getDataElement

public org.jdom.Element getDataElement()

getDataString

public String getDataString()

getTask

public YTask getTask()

setTask

public void setTask(YTask task)

getDocumentation

public String getDocumentation()

toXML

public String toXML()


Copyright © 2004-2012 The YAWL Foundation.