@Entity public class DocumentRouteHeaderValue extends DataObjectBase implements DocumentContract, DocumentSearchCriteriaEbo
DocumentType
and follows
the route path defined by that DocumentType.
During a document's lifecycle it progresses through a series of statuses, starting
with INITIATED and moving to one of the terminal states (such as FINAL, CANCELED, etc).
The list of status on a document are defined in the KewApiConstants
class and
include the constants starting with "ROUTE_HEADER_" and ending with "_CD".
Associated with the document is the document content. The document content is XML which represents the content of that document. This XML content is typically used to make routing decisions for the document.
A document has associated with it a set of ActionRequestValue
object and
ActionTakenValue
objects. Action Requests represent requests for user
action (such as Approve, Acknowledge, etc). Action Takens represent action that
users have performed on the document, such as approvals or cancelling of the document.
The instantiated route path of a document is defined by it's graph of
RouteNodeInstance
objects. The path starts at the initial node of the document
and progresses from there following the next nodes of each node instance. The current
active nodes on the document are defined by the "active" flag on the node instance
where are not marked as "complete".
DocumentType
,
ActionRequestValue
,
ActionItem
,
ActionTakenValue
,
RouteNodeInstance
,
KewApiConstants
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
CURRENT_ROUTE_NODE_NAME_DELIMITER |
protected static HashMap<String,String> |
legalActions |
protected static HashMap<String,String> |
stateTransitionMap |
objectId, versionNumber
Constructor and Description |
---|
DocumentRouteHeaderValue() |
Modifier and Type | Method and Description |
---|---|
void |
applyDocumentUpdate(DocumentUpdate documentUpdate) |
Object |
copy(boolean preserveKeys) |
DocumentRouteHeaderValue |
deepCopy(Map<Object,Object> visited) |
static DocumentRouteHeaderValue |
from(Document document) |
List<ActionItem> |
getActionItems() |
List<ActionRequestValue> |
getActionRequests() |
List<ActionTakenValue> |
getActionsTaken() |
String |
getAppDocId() |
String |
getAppDocStatus()
This method returns the Application Document Status.
|
Timestamp |
getAppDocStatusDate() |
List<DocumentStatusTransition> |
getAppDocStatusHistory() |
String |
getApplicationDocumentId()
Retrieve the application document id.
|
String |
getApplicationDocumentStatus()
Retrieve the application document status.
|
org.joda.time.DateTime |
getApplicationDocumentStatusDate()
Retrieve the last application document status transition date.
|
Timestamp |
getApprovedDate() |
String |
getCombinedStatus()
This method returns a combination of the route status label and the app doc status.
|
Timestamp |
getCreateDate() |
List<String> |
getCurrentNodeNames() |
String |
getCurrentRouteLevelName() |
CustomActionListAttribute |
getCustomActionListAttribute() |
CustomEmailAttribute |
getCustomEmailAttribute() |
CustomNoteAttribute |
getCustomNoteAttribute() |
org.joda.time.DateTime |
getDateApproved()
Retrieve the document approval date
|
org.joda.time.DateTime |
getDateCreated()
Retrieve the document creation date
|
org.joda.time.DateTime |
getDateFinalized()
Retrieve the document finalization date
|
org.joda.time.DateTime |
getDateLastModified()
Retrieve the document last-modified date
|
Timestamp |
getDateModified() |
ActionItem |
getDocActionItem(int index) |
ActionRequestValue |
getDocActionRequest(int index) |
ActionTakenValue |
getDocActionTaken(int index) |
String |
getDocContent() |
Integer |
getDocRouteLevel() |
String |
getDocRouteStatus() |
String |
getDocRouteStatusLabel() |
String |
getDocStatusPolicy()
This method returns the Document Status Policy for the document type associated with this Route Header.
|
String |
getDocTitle() |
DocumentRouteHeaderValueContent |
getDocumentContent() |
String |
getDocumentHandlerUrl()
Retrieve the document handler url
|
String |
getDocumentId()
Retrieve the document id
|
DocumentType |
getDocumentType() |
String |
getDocumentTypeId()
Retrieve the id of the type of this document
|
String |
getDocumentTypeName()
Retrieve the name of the type of this document
|
Integer |
getDocVersion() |
Timestamp |
getFinalizedDate() |
List<RouteNodeInstance> |
getInitialRouteNodeInstances() |
String |
getInitiatorDisplayName() |
Principal |
getInitiatorPrincipal() |
String |
getInitiatorPrincipalId()
Retrieve the initiator principal id
|
String |
getInitiatorWorkflowId() |
List<Note> |
getNotes() |
Branch |
getRootBranch()
Convenience method that returns the branch of the first (and presumably only?) initial node
|
List<BranchState> |
getRootBranchState() |
String |
getRoutedByDisplayName() |
Principal |
getRoutedByPrincipal() |
String |
getRoutedByPrincipalId()
Retrieve the router principal id
|
String |
getRoutedByUserWorkflowId() |
Timestamp |
getRouteStatusDate() |
String |
getRouteStatusLabel() |
List<ActionRequestValue> |
getSimulatedActionRequests() |
DocumentStatus |
getStatus()
Retrieve the document status
|
String |
getTitle()
Retrieve the document title
|
String |
getVariable(String name)
Gets a variable
|
Map<String,String> |
getVariables()
Retrieve the currently defined internal workflow engine variables for the document
NOTE: use of workflow engine variables is an advanced technique requiring specific crafting of the
workflow document routing; these variables will not be useful for the majority of workflow use cases
|
boolean |
isCanceled() |
boolean |
isDisaproved() |
boolean |
isEnroute() |
boolean |
isFinal() |
boolean |
isInException() |
boolean |
isProcessed() |
boolean |
isRoutable() |
boolean |
isRouted() |
boolean |
isRoutingReport() |
boolean |
isStateInitiated() |
boolean |
isStateSaved() |
boolean |
isValidActionToTake(String actionCd)
Return true if the given action code is valid for this document's current state.
|
boolean |
isValidStatusChange(String newStatus) |
void |
markDocumentCanceled()
Mark document cancled.
|
void |
markDocumentDisapproved()
Mark document disapproved
|
void |
markDocumentEnroute()
Mark the document as being actively routed.
|
void |
markDocumentFinalized()
Mark document finalized.
|
void |
markDocumentInException()
Mark the document as being in the exception state.
|
void |
markDocumentProcessed()
Mark the document as being processed.
|
void |
markDocumentRecalled()
Mark document recalled.
|
void |
markDocumentSaved()
Mark document saved
|
void |
refresh()
Invoked to refresh business objects related to the parent based on their key field values
|
void |
removeVariableThatContains(String name) |
void |
setAppDocId(String appDocId) |
void |
setAppDocStatus(String appDocStatus) |
void |
setAppDocStatusDate(Timestamp appDocStatusDate) |
void |
setAppDocStatusHistory(List<DocumentStatusTransition> appDocStatusHistory) |
void |
setApprovedDate(Timestamp approvedDate) |
void |
setCreateDate(Timestamp createDate) |
void |
setDateModified(Timestamp dateModified) |
void |
setDocContent(String docContent) |
void |
setDocRouteLevel(Integer docRouteLevel) |
void |
setDocRouteStatus(String docRouteStatus) |
void |
setDocTitle(String docTitle) |
void |
setDocumentContent(DocumentRouteHeaderValueContent documentContent) |
void |
setDocumentId(String documentId) |
void |
setDocumentTypeId(String documentTypeId) |
void |
setDocVersion(Integer docVersion) |
void |
setFinalizedDate(Timestamp finalizedDate) |
void |
setInitialRouteNodeInstances(List<RouteNodeInstance> initialRouteNodeInstances) |
void |
setInitiatorWorkflowId(String initiatorWorkflowId) |
void |
setNotes(List<Note> notes) |
void |
setRoutedByUserWorkflowId(String routedByUserWorkflowId) |
void |
setRouteHeaderData(Document routeHeaderVO)
This method takes data from a VO and sets it on this route header
|
void |
setRouteStatus(String newStatus,
boolean finalState) |
void |
setRouteStatusDate(Timestamp routeStatusDate) |
void |
setRoutingReport(boolean routingReport) |
void |
setSimulatedActionRequests(List<ActionRequestValue> simulatedActionRequests) |
void |
setVariable(String name,
String value)
Sets a variable
|
static Document |
to(DocumentRouteHeaderValue documentBo) |
void |
updateAppDocStatus(String appDocStatus)
This method sets the appDocStatus.
|
generateAndSetObjectIdIfNeeded, getExtensionObject, getObjectId, getVersionNumber, prePersist, preUpdate, setExtensionObject, setObjectId, setVersionNumber, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
protected static final HashMap<String,String> legalActions
protected static final HashMap<String,String> stateTransitionMap
public static final String CURRENT_ROUTE_NODE_NAME_DELIMITER
public DocumentRouteHeaderValue()
public Principal getInitiatorPrincipal()
public Principal getRoutedByPrincipal()
public String getInitiatorDisplayName()
public String getRoutedByDisplayName()
public String getCurrentRouteLevelName()
public List<String> getCurrentNodeNames()
public String getRouteStatusLabel()
public String getDocRouteStatusLabel()
public String getDocStatusPolicy()
public List<ActionItem> getActionItems()
public List<ActionTakenValue> getActionsTaken()
public List<ActionRequestValue> getActionRequests()
public List<ActionRequestValue> getSimulatedActionRequests()
public void setSimulatedActionRequests(List<ActionRequestValue> simulatedActionRequests)
public DocumentType getDocumentType()
public String getAppDocId()
public void setAppDocId(String appDocId)
public Timestamp getApprovedDate()
public void setApprovedDate(Timestamp approvedDate)
public Timestamp getCreateDate()
public void setCreateDate(Timestamp createDate)
public String getDocContent()
public void setDocContent(String docContent)
public Integer getDocRouteLevel()
public void setDocRouteLevel(Integer docRouteLevel)
public String getDocRouteStatus()
public void setDocRouteStatus(String docRouteStatus)
public String getDocTitle()
public void setDocTitle(String docTitle)
public String getDocumentTypeId()
DocumentContract
getDocumentTypeId
in interface DocumentContract
public void setDocumentTypeId(String documentTypeId)
public Integer getDocVersion()
public void setDocVersion(Integer docVersion)
public Timestamp getFinalizedDate()
public void setFinalizedDate(Timestamp finalizedDate)
public String getInitiatorWorkflowId()
public void setInitiatorWorkflowId(String initiatorWorkflowId)
public String getRoutedByUserWorkflowId()
public void setRoutedByUserWorkflowId(String routedByUserWorkflowId)
public String getDocumentId()
DocumentContract
getDocumentId
in interface DocumentContract
getDocumentId
in interface DocumentSearchCriteriaEbo
public void setDocumentId(String documentId)
public Timestamp getRouteStatusDate()
public void setRouteStatusDate(Timestamp routeStatusDate)
public Timestamp getDateModified()
public void setDateModified(Timestamp dateModified)
public String getAppDocStatus()
ApplicationDocumentStatus
,
DocumentTypePolicy
public void setAppDocStatus(String appDocStatus)
public String getCombinedStatus()
public void updateAppDocStatus(String appDocStatus) throws WorkflowRuntimeException
appDocStatus
- WorkflowRuntimeException
public Timestamp getAppDocStatusDate()
public void setAppDocStatusDate(Timestamp appDocStatusDate)
public boolean isStateInitiated()
public boolean isStateSaved()
public boolean isRouted()
public boolean isInException()
public boolean isDisaproved()
public boolean isCanceled()
public boolean isFinal()
public boolean isEnroute()
public boolean isProcessed()
public boolean isRoutable()
public boolean isValidActionToTake(String actionCd)
actionCd
- The action code to be tested.ActionRegistry.getValidActions(org.kuali.rice.kim.api.identity.principal.PrincipalContract, DocumentRouteHeaderValue)
public boolean isValidStatusChange(String newStatus)
public void setRouteStatus(String newStatus, boolean finalState) throws InvalidActionTakenException
InvalidActionTakenException
public void markDocumentProcessed() throws InvalidActionTakenException
public void markDocumentCanceled() throws InvalidActionTakenException
public void markDocumentRecalled() throws InvalidActionTakenException
public void markDocumentDisapproved() throws InvalidActionTakenException
public void markDocumentSaved() throws InvalidActionTakenException
public void markDocumentInException() throws InvalidActionTakenException
public void markDocumentEnroute() throws InvalidActionTakenException
public void markDocumentFinalized() throws InvalidActionTakenException
public void setRouteHeaderData(Document routeHeaderVO) throws WorkflowException
routeHeaderVO
- WorkflowException
public void applyDocumentUpdate(DocumentUpdate documentUpdate)
public Branch getRootBranch()
public String getVariable(String name)
name
- variable namepublic void removeVariableThatContains(String name)
public void setVariable(String name, String value)
name
- variable namevalue
- variable value, or null if variable should be removedpublic List<BranchState> getRootBranchState()
public CustomActionListAttribute getCustomActionListAttribute() throws WorkflowException
WorkflowException
public CustomEmailAttribute getCustomEmailAttribute() throws WorkflowException
WorkflowException
public CustomNoteAttribute getCustomNoteAttribute() throws WorkflowException
WorkflowException
public ActionRequestValue getDocActionRequest(int index)
public ActionTakenValue getDocActionTaken(int index)
public ActionItem getDocActionItem(int index)
public boolean isRoutingReport()
public void setRoutingReport(boolean routingReport)
public List<RouteNodeInstance> getInitialRouteNodeInstances()
public void setInitialRouteNodeInstances(List<RouteNodeInstance> initialRouteNodeInstances)
public DocumentRouteHeaderValueContent getDocumentContent()
public void setDocumentContent(DocumentRouteHeaderValueContent documentContent)
public List<DocumentStatusTransition> getAppDocStatusHistory()
public void setAppDocStatusHistory(List<DocumentStatusTransition> appDocStatusHistory)
public DocumentStatus getStatus()
DocumentContract
getStatus
in interface DocumentContract
getStatus
in interface DocumentSearchCriteriaEbo
public org.joda.time.DateTime getDateCreated()
DocumentContract
getDateCreated
in interface DocumentContract
getDateCreated
in interface DocumentSearchCriteriaEbo
public org.joda.time.DateTime getDateLastModified()
DocumentContract
getDateLastModified
in interface DocumentContract
public org.joda.time.DateTime getDateApproved()
DocumentContract
getDateApproved
in interface DocumentContract
public org.joda.time.DateTime getDateFinalized()
DocumentContract
getDateFinalized
in interface DocumentContract
public String getTitle()
DocumentContract
getTitle
in interface DocumentContract
getTitle
in interface DocumentSearchCriteriaEbo
public String getApplicationDocumentId()
DocumentContract
getApplicationDocumentId
in interface DocumentContract
getApplicationDocumentId
in interface DocumentSearchCriteriaEbo
public String getInitiatorPrincipalId()
DocumentContract
getInitiatorPrincipalId
in interface DocumentContract
getInitiatorPrincipalId
in interface DocumentSearchCriteriaEbo
public String getRoutedByPrincipalId()
DocumentContract
getRoutedByPrincipalId
in interface DocumentContract
public String getDocumentTypeName()
DocumentContract
getDocumentTypeName
in interface DocumentContract
getDocumentTypeName
in interface DocumentSearchCriteriaEbo
public String getDocumentHandlerUrl()
DocumentContract
getDocumentHandlerUrl
in interface DocumentContract
public String getApplicationDocumentStatus()
DocumentContract
getApplicationDocumentStatus
in interface DocumentContract
getApplicationDocumentStatus
in interface DocumentSearchCriteriaEbo
public org.joda.time.DateTime getApplicationDocumentStatusDate()
DocumentContract
getApplicationDocumentStatusDate
in interface DocumentContract
public Map<String,String> getVariables()
DocumentContract
getVariables
in interface DocumentContract
public static Document to(DocumentRouteHeaderValue documentBo)
public static DocumentRouteHeaderValue from(Document document)
public void refresh()
BusinessObject
During processing (for example accepting user input) the field values that participate in relationships can become out of sync with the related business objects (for example: suppose our business object has a property name bookId with a related object of type Book that contains the id property. If the user changes the value for the bookId property, our id property on the related book and the associated information is still pointing to the previous book id). This method is invoked to indicate the related objects should be refreshed based on their related keys. For @{link PersistableBusinessObject} implementations, most refreshes can be handled by the ORM tool
refresh
in interface BusinessObject
public DocumentRouteHeaderValue deepCopy(Map<Object,Object> visited)
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.