org.kuali.rice.kew.api
Interface WorkflowDocument

All Superinterfaces:
DocumentContract
All Known Subinterfaces:
WorkflowDocumentPrototype
All Known Implementing Classes:
WorkflowDocumentImpl

public interface WorkflowDocument
extends DocumentContract

WorkflowDocument is the core client API for interaction with the Kuali Enterprise Workflow system. WorkflowDocument is an object-oriented facade/bridge to stateless KEW APIs, which maintains document state, and flushes updates as actions are taken. WorkflowDocuments cannot be constructed directly, create them via the WorkflowDocumentFactory

This class is *not* thread safe. If you are operating on the same document, be sure to synchronize access to the WorkflowDocument instance. If you are operating on different documents, obtain a distinct instance from the WorkflowDocumentFactory.


Method Summary
 void acknowledge(String annotation)
          Acknowledges the document, commits updates.
 void addAttributeDefinition(WorkflowAttributeDefinition attributeDefinition)
          Adds a workflow attribute definition.
 void addSearchableDefinition(WorkflowAttributeDefinition searchableDefinition)
          Adds a searchable workflow attribute definition.
 void adHocToGroup(ActionRequestType actionRequested, String annotation, String targetGroupId, String responsibilityDescription, boolean forceAction)
          Sends an "ad-hoc" action request to the specified group; commits updates.
 void adHocToGroup(ActionRequestType actionRequested, String nodeName, String annotation, String targetGroupId, String responsibilityDescription, boolean forceAction)
          Sends an "ad-hoc" action request to the specified group; commits updates.
 void adHocToGroup(ActionRequestType actionRequested, String nodeName, String annotation, String targetGroupId, String responsibilityDescription, boolean forceAction, String requestLabel)
          Sends an "ad-hoc" action request to the specified principal; commits updates.
 void adHocToGroup(AdHocToGroup adHocToGroup, String annotation)
          Sends an "ad-hoc" action request to the specified principal; commits updates.
 void adHocToPrincipal(ActionRequestType actionRequested, String annotation, String targetPrincipalId, String responsibilityDescription, boolean forceAction)
          Sends an "ad-hoc" action request to the specified principal; commits updates.
 void adHocToPrincipal(ActionRequestType actionRequested, String nodeName, String annotation, String targetPrincipalId, String responsibilityDescription, boolean forceAction)
          Sends an "ad-hoc" action request to the specified principal; commits updates.
 void adHocToPrincipal(ActionRequestType actionRequested, String nodeName, String annotation, String targetPrincipalId, String responsibilityDescription, boolean forceAction, String requestLabel)
          Sends an "ad-hoc" action request to the specified principal; commits updates.
 void adHocToPrincipal(AdHocToPrincipal adHocToPrincipal, String annotation)
          Sends an "ad-hoc" action request to the specified principal; commits updates.
 void approve(String annotation)
          Approves the document, commits updates.
 void blanketApprove(String annotation)
          Cancels the document, commits updates.
 void blanketApprove(String annotation, String... nodeNames)
          Blanket-approves the document, commits updates.
 void cancel(String annotation)
          Approves the document, commits updates.
 boolean checkStatus(DocumentStatus status)
          Helper that checks whether the document has the given status NOTE: does this really need to be in the public API? it only appears to be used internally
 void clearAttributeContent()
          Clears the document's attribute content.
 void clearAttributeDefinitions()
          Clears workflow attribute definitions.
 void clearSearchableContent()
          Clears the searchable content.
 void clearSearchableDefinitions()
          Clears searchable workflow attribute definitions.
 void complete(String annotation)
          Completes the document, commits updates.
 void delete()
          Deletes the document.
 void disapprove(String annotation)
          Disapproves the document, commits updates.
 void fyi()
          Clears an outstanding FYI on the document without an annotation, commits updates.
 void fyi(String annotation)
          Clears an outstanding FYI on the document, commits updates.
 List<ActionTaken> getActionsTaken()
          Return the list of past actions taken on the document
 List<RouteNodeInstance> getActiveRouteNodeInstances()
          Returns the list of active route node instances
 String getApplicationContent()
          Returns the currently set application content.
 String getAttributeContent()
          Returns the currently set document attribute content.
 List<WorkflowAttributeDefinition> getAttributeDefinitions()
          Returns the currently set workflow attribute definitions
 String getClearFutureRequestsValue()
          Returns whether the workflow variable that specifies that ...
 Set<String> getCurrentNodeNames()
          Returns the names of the nodes at which the document is currently at in it's route path.
 List<RouteNodeInstance> getCurrentRouteNodeInstances()
          Returns the list of active route node instances
 Document getDocument()
          Returns a read-only view of the underlying document meta-data
 DocumentContent getDocumentContent()
          Returns a read-only view of the underlying mutable document content
 DocumentDetail getDocumentDetail()
          Returns detailed document information TODO: consolidate with Document/ModifiableDocument or eliminate? currently bypasses locally cached Document data
 String getDoNotReceiveFutureRequestsValue()
          Returns whether the workflow variable that specifies that this principal should NOT receive future requests has been set
 Set<String> getNodeNames()
          Returns the names of the route nodes on the document which are currently active.
 List<String> getPreviousNodeNames()
          Returns the list of previous route node names
 String getPrincipalId()
          Returns the principalId with which this WorkflowDocument was constructed
 String getReceiveFutureRequestsValue()
          Returns whether the workflow variable that specifies that this principal should receive future requests has been set
 RequestedActions getRequestedActions()
          Returns the list of requested actions on this document for the current user
 List<ActionRequest> getRootActionRequests()
          Return the list of root action requests on the document.
 List<RouteNodeInstance> getRouteNodeInstances()
          Returns the flattened list of route node instances
 List<WorkflowAttributeDefinition> getSearchableDefinitions()
          Returns the currently set searchable workflow attribute definitions
 ValidActions getValidActions()
          Returns the list of valid actions on this document for the current user
 String getVariableValue(String name)
          Gets a workflow variable value.
 boolean isAcknowledgeRequested()
          Returns whether an acknowledge request is one of the requested actions.
 boolean isApprovalRequested()
          Returns whether an approval request is one of the requested actions.
 boolean isApproved()
          Indicates if the document is in the Processed or Finalized state.
 boolean isBlanketApproveCapable()
          Returns whether a blank-approve action is a valid action.
 boolean isCanceled()
          Indicates if the document is in the canceled state or not.
 boolean isCompletionRequested()
          Returns whether a completion request is one of the requested actions.
 boolean isDisapproved()
          Indicates if the document is in the disapproved state or not.
 boolean isEnroute()
          Indicates if the document is in the enroute state or not.
 boolean isException()
          Indicates if the document is in the exception state or not.
 boolean isFinal()
          Indicates if the document is in the final state or not.
 boolean isFYIRequested()
          Returns whether an FYI is one of the requested actions.
 boolean isInitiated()
          Indicates if the document is in the initiated state or not.
 boolean isProcessed()
          Indicates if the document is in the processed state or not.
 boolean isRecalled()
          Indicates if the document is in the recalled state or not.
 boolean isRouteCapable()
          Returns whether a route action is a valid action.
 boolean isSaved()
          Indicates if the document is in the saved state or not.
 boolean isValidAction(ActionType actionType)
          Returns whether the specified action type is valid
 void logAnnotation(String annotation)
          Records a log action which adds an annotation on the document but does not affect routing.
 void move(MovePoint movePoint, String annotation)
          Moves the document to a different node; commits updates.
 void placeInExceptionRouting(String annotation)
          Places the document in exception routing; commits updates.
 void recall(String annotation, boolean cancel)
          Recalls the document, commits updates.
 void refresh()
          Reloads the document state, any pending changes will be discarded
 void releaseGroupAuthority(String annotation, String groupId)
          Releases authority of a group by a member of that group; commits updates.
 void removeAttributeDefinition(WorkflowAttributeDefinition attributeDefinition)
          Removes a workflow attribute definition.
 void removeSearchableDefinition(WorkflowAttributeDefinition searchableDefinition)
          Removes a searchable workflow attribute definition.
 void returnToPreviousNode(String annotation, ReturnPoint returnPoint)
          Returns the document to a previous node; commits updates.
 void returnToPreviousNode(String annotation, String nodeName)
          Returns the document to a previous node; commits updates.
 void revokeAdHocRequestById(String actionRequestId, String annotation)
          Revokes an Ad-Hoc request by id; commits updates.
 void revokeAdHocRequests(AdHocRevoke revoke, String annotation)
          Revokes an Ad-Hoc request by the specified criteria; commits updates.
 void revokeAllAdHocRequests(String annotation)
          Revokes all Ad-Hoc requests; commits updates; commits updates.
 void route(String annotation)
          Routes the document, commits updates.
 void saveDocument(String annotation)
          Saves the document, commits updates.
 void saveDocumentData()
          Save the document data without affecting routing, commits updates.
 void setApplicationContent(String applicationContent)
          Sets the document's application content.
 void setApplicationDocumentId(String applicationDocumentId)
          Sets the application document id.
 void setApplicationDocumentStatus(String applicationDocumentStatus)
          Sets the application document status.
 void setAttributeContent(String attributeContent)
          Sets the document's attribute content.
 void setClearFutureRequests()
          Sets the workflow variable that specifies that ...
 void setDoNotReceiveFutureRequests()
          Sets the workflow variable that specifies that this principal should NOT receive future requests
 void setReceiveFutureRequests()
          Sets the workflow variable that specifies that this principal should receive future requests
 void setSearchableContent(String searchableContent)
          Sets the document's searchable content.
 void setTitle(String title)
          Sets the document title.
 void setVariable(String name, String value)
          Sets a workflow variable.
 void superUserBlanketApprove(String annotation)
          Performs a super-user blanket-approve action; commits updates.
 void superUserCancel(String annotation)
          Performs a super-user cancel action; commits updates.
 void superUserDisapprove(String annotation)
          Performs a super-user disapprove action; commits updates.
 void superUserNodeApprove(String nodeName, String annotation)
          Performs a super-user approve action for the specified node; commits updates.
 void superUserReturnToPreviousNode(ReturnPoint returnPoint, String annotation)
          Performs a super-user "return to previous node" action; commits updates.
 void superUserTakeRequestedAction(String actionRequestId, String annotation)
          Performs a super-user approve action for the specified node; commits updates.
 void switchPrincipal(String principalId)
          Switches the principalId under which WorkflowDocument API are performed.
 void takeGroupAuthority(String annotation, String groupId)
          Takes authority of a group by a member of that group; commits updates.
 void updateDocumentContent(DocumentContentUpdate documentContentUpdate)
          Sets internal DocumentContentUpdate object TODO: exposes internal API and used only by tests, candidate for elimination?
 List<? extends RemotableAttributeErrorContract> validateAttributeDefinition(WorkflowAttributeDefinition attributeDefinition)
          Validates a workflow attribute definition and returns a list of validation errors.
 
Methods inherited from interface org.kuali.rice.kew.api.document.DocumentContract
getApplicationDocumentId, getApplicationDocumentStatus, getApplicationDocumentStatusDate, getDateApproved, getDateCreated, getDateFinalized, getDateLastModified, getDocumentHandlerUrl, getDocumentId, getDocumentTypeId, getDocumentTypeName, getInitiatorPrincipalId, getRoutedByPrincipalId, getStatus, getTitle, getVariables
 

Method Detail

getPrincipalId

String getPrincipalId()
Returns the principalId with which this WorkflowDocument was constructed

Returns:
the principalId with which this WorkflowDocument was constructed

switchPrincipal

void switchPrincipal(String principalId)
Switches the principalId under which WorkflowDocument API are performed. This method necessitates clearing of any state associated with the principalId such as requested and valid actions.

Parameters:
principalId - the new principalId

getDocument

Document getDocument()
Returns a read-only view of the underlying document meta-data

Returns:
a read-only view of the underlying document meta-data

getDocumentContent

DocumentContent getDocumentContent()
Returns a read-only view of the underlying mutable document content

Returns:
a read-only view of the underlying mutable document content

getApplicationContent

String getApplicationContent()
Returns the currently set application content.

Returns:
the currently set application content.
See Also:
getDocumentContent()

setTitle

void setTitle(String title)
Sets the document title. The update will be committed with the next document operation.

Parameters:
title - the document title to set

setApplicationDocumentId

void setApplicationDocumentId(String applicationDocumentId)
Sets the application document id. The update will be committed with the next document operation.

Parameters:
applicationDocumentId - the application document id to set.

setApplicationDocumentStatus

void setApplicationDocumentStatus(String applicationDocumentStatus)
Sets the application document status. The update will be committed with the next document operation.

Parameters:
applicationDocumentStatus - the application document status to set

setApplicationContent

void setApplicationContent(String applicationContent)
Sets the document's application content. The update will be committed with the next document operation.

Parameters:
applicationContent - the document application content to set

setAttributeContent

void setAttributeContent(String attributeContent)
Sets the document's attribute content. The update will be committed with the next document operation.

Parameters:
attributeContent - the document attribute content to set

clearAttributeContent

void clearAttributeContent()
Clears the document's attribute content. The update will be committed with the next document operation.


getAttributeContent

String getAttributeContent()
Returns the currently set document attribute content.


addAttributeDefinition

void addAttributeDefinition(WorkflowAttributeDefinition attributeDefinition)
Adds a workflow attribute definition. The update will be committed with the next document operation.

Parameters:
attributeDefinition - the WorkflowAttributeDefinition to add

removeAttributeDefinition

void removeAttributeDefinition(WorkflowAttributeDefinition attributeDefinition)
Removes a workflow attribute definition. The update will be committed with the next document operation. Equality is determined on the basis of WorkflowAttributeDefinition fields.

Parameters:
attributeDefinition - the WorkflowAttributeDefinition to remove
See Also:
AbstractDataTransferObject.equals(Object)

clearAttributeDefinitions

void clearAttributeDefinitions()
Clears workflow attribute definitions. The update will be committed with the next document operation.


getAttributeDefinitions

List<WorkflowAttributeDefinition> getAttributeDefinitions()
Returns the currently set workflow attribute definitions

Returns:
the currently set workflow attribute definitions

setSearchableContent

void setSearchableContent(String searchableContent)
Sets the document's searchable content. The update will be committed with the next document operation.

Parameters:
searchableContent - the searchable content to set

addSearchableDefinition

void addSearchableDefinition(WorkflowAttributeDefinition searchableDefinition)
Adds a searchable workflow attribute definition. The update will be committed with the next document operation.

Parameters:
searchableDefinition - the WorkflowAttributeDefinition to add

removeSearchableDefinition

void removeSearchableDefinition(WorkflowAttributeDefinition searchableDefinition)
Removes a searchable workflow attribute definition. The update will be committed with the next document operation. Equality is determined on the basis of WorkflowAttributeDefinition fields.

Parameters:
searchableDefinition - the WorkflowAttributeDefinition to remove
See Also:
AbstractDataTransferObject.equals(Object)

clearSearchableDefinitions

void clearSearchableDefinitions()
Clears searchable workflow attribute definitions. The update will be committed with the next document operation.


clearSearchableContent

void clearSearchableContent()
Clears the searchable content. The update will be committed with the next document operation.


getSearchableDefinitions

List<WorkflowAttributeDefinition> getSearchableDefinitions()
Returns the currently set searchable workflow attribute definitions

Returns:
the currently set searchable workflow attribute definitions

setVariable

void setVariable(String name,
                 String value)
Sets a workflow variable. The update will be committed with the next document operation.

Parameters:
name - variable name
value - variable value
See Also:
DocumentContract.getVariables()

getVariableValue

String getVariableValue(String name)
Gets a workflow variable value.

Parameters:
name - variable name
See Also:
DocumentContract.getVariables()

setReceiveFutureRequests

void setReceiveFutureRequests()
Sets the workflow variable that specifies that this principal should receive future requests

See Also:
KewApiConstants.RECEIVE_FUTURE_REQUESTS_BRANCH_STATE_KEY, KewApiConstants.RECEIVE_FUTURE_REQUESTS_BRANCH_STATE_VALUE

setDoNotReceiveFutureRequests

void setDoNotReceiveFutureRequests()
Sets the workflow variable that specifies that this principal should NOT receive future requests

See Also:
KewApiConstants.RECEIVE_FUTURE_REQUESTS_BRANCH_STATE_KEY, KewApiConstants.DONT_RECEIVE_FUTURE_REQUESTS_BRANCH_STATE_VALUE

setClearFutureRequests

void setClearFutureRequests()
Sets the workflow variable that specifies that ... TODO: what does this do? (org.kuali.rice.kew.util.FutureRequestDocumentStateManager#clearStateFromDocument)

See Also:
KewApiConstants.RECEIVE_FUTURE_REQUESTS_BRANCH_STATE_KEY, KewApiConstants.CLEAR_FUTURE_REQUESTS_BRANCH_STATE_VALUE

getReceiveFutureRequestsValue

String getReceiveFutureRequestsValue()
Returns whether the workflow variable that specifies that this principal should receive future requests has been set

Returns:
whether the workflow variable that specifies that this principal should receive future requests has been set
See Also:
setReceiveFutureRequests()

getDoNotReceiveFutureRequestsValue

String getDoNotReceiveFutureRequestsValue()
Returns whether the workflow variable that specifies that this principal should NOT receive future requests has been set

Returns:
whether the workflow variable that specifies that this principal should NOT receive future requests has been set
See Also:
setDoNotReceiveFutureRequests()

getClearFutureRequestsValue

String getClearFutureRequestsValue()
Returns whether the workflow variable that specifies that ... has been set

Returns:
whether the workflow variable that specifies that ... has been set

validateAttributeDefinition

List<? extends RemotableAttributeErrorContract> validateAttributeDefinition(WorkflowAttributeDefinition attributeDefinition)
Validates a workflow attribute definition and returns a list of validation errors. This action is stateless and does not cause a commit of document updates. Implementation note: this is currently only used by EDL.

Parameters:
attributeDefinition - the workflow attribute definition to validate
Returns:
list of attribute validation errors
See Also:
WorkflowDocumentActionsService.validateWorkflowAttributeDefinition(org.kuali.rice.kew.api.document.attribute.WorkflowAttributeDefinition)

getRootActionRequests

List<ActionRequest> getRootActionRequests()
Return the list of root action requests on the document.

Returns:
the list of root action requests on the document.
See Also:
WorkflowDocumentService.getRootActionRequests(String)

getActionsTaken

List<ActionTaken> getActionsTaken()
Return the list of past actions taken on the document

Returns:
the list of past actions taken on the document
See Also:
WorkflowDocumentService.getActionsTaken(String)

getValidActions

ValidActions getValidActions()
Returns the list of valid actions on this document for the current user

Returns:
the list of valid actions on this document for the current user
See Also:
WorkflowDocumentActionsService.determineValidActions(String, String)

getRequestedActions

RequestedActions getRequestedActions()
Returns the list of requested actions on this document for the current user

Returns:
the list of requested actions on this document for the current user
See Also:
WorkflowDocumentActionsService.determineRequestedActions(String, String)

saveDocument

void saveDocument(String annotation)
Saves the document, commits updates.

Parameters:
annotation - the document action annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.save(org.kuali.rice.kew.api.action.DocumentActionParameters)

route

void route(String annotation)
Routes the document, commits updates.

Parameters:
annotation - the document action annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.route(org.kuali.rice.kew.api.action.DocumentActionParameters)

complete

void complete(String annotation)
Completes the document, commits updates.

Parameters:
annotation - the document action annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.complete(org.kuali.rice.kew.api.action.DocumentActionParameters)

disapprove

void disapprove(String annotation)
Disapproves the document, commits updates.

Parameters:
annotation - the document action annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.route(org.kuali.rice.kew.api.action.DocumentActionParameters)

approve

void approve(String annotation)
Approves the document, commits updates.

Parameters:
annotation - the document action annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.approve(org.kuali.rice.kew.api.action.DocumentActionParameters)

cancel

void cancel(String annotation)
Approves the document, commits updates.

Parameters:
annotation - the document action annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.approve(org.kuali.rice.kew.api.action.DocumentActionParameters)

recall

void recall(String annotation,
            boolean cancel)
Recalls the document, commits updates.

Parameters:
annotation - the document action annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
Since:
2.1
See Also:
WorkflowDocumentActionsService.approve(org.kuali.rice.kew.api.action.DocumentActionParameters)

blanketApprove

void blanketApprove(String annotation)
Cancels the document, commits updates.

Parameters:
annotation - the document action annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.cancel(org.kuali.rice.kew.api.action.DocumentActionParameters)

blanketApprove

void blanketApprove(String annotation,
                    String... nodeNames)
Blanket-approves the document, commits updates.

Parameters:
annotation - the document action annotation
nodeNames - a set of node names to which to blanket approve the given document
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.blanketApproveToNodes(org.kuali.rice.kew.api.action.DocumentActionParameters, java.util.Set)

saveDocumentData

void saveDocumentData()
Save the document data without affecting routing, commits updates.

Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.saveDocumentData(org.kuali.rice.kew.api.action.DocumentActionParameters)

acknowledge

void acknowledge(String annotation)
Acknowledges the document, commits updates.

Parameters:
annotation - the document action annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.acknowledge(org.kuali.rice.kew.api.action.DocumentActionParameters)

fyi

void fyi(String annotation)
Clears an outstanding FYI on the document, commits updates.

Parameters:
annotation - the document action annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.clearFyi(org.kuali.rice.kew.api.action.DocumentActionParameters)

fyi

void fyi()
Clears an outstanding FYI on the document without an annotation, commits updates.

Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
fyi(String)

delete

void delete()
Deletes the document. Any pending updates are NOT committed, they are discarded. After deletion this WorkflowDocument object will no longer be valid, and any operations that interact with the workflow system will throws an IllegalStateException

Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.delete(String, String)

refresh

void refresh()
Reloads the document state, any pending changes will be discarded

Throws:
RiceIllegalArgumentException
RiceIllegalArgumentException
See Also:
WorkflowDocumentService.getDocument(String)

adHocToPrincipal

void adHocToPrincipal(ActionRequestType actionRequested,
                      String annotation,
                      String targetPrincipalId,
                      String responsibilityDescription,
                      boolean forceAction)
Sends an "ad-hoc" action request to the specified principal; commits updates.

Parameters:
actionRequested - the request action type
annotation - the route annotation
targetPrincipalId - the target principal id
responsibilityDescription - description of the responsibility
forceAction - whether the adhoc requests forces action by the recipient
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.adHocToPrincipal(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocToPrincipal)

adHocToPrincipal

void adHocToPrincipal(ActionRequestType actionRequested,
                      String nodeName,
                      String annotation,
                      String targetPrincipalId,
                      String responsibilityDescription,
                      boolean forceAction)
Sends an "ad-hoc" action request to the specified principal; commits updates.

Parameters:
actionRequested - the request action type
nodeName - the node on which to generate the adhoc request
annotation - the route annotation
targetPrincipalId - the target principal id
responsibilityDescription - description of the responsibility
forceAction - whether the adhoc requests forces action by the recipient
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.adHocToPrincipal(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocToPrincipal)

adHocToPrincipal

void adHocToPrincipal(ActionRequestType actionRequested,
                      String nodeName,
                      String annotation,
                      String targetPrincipalId,
                      String responsibilityDescription,
                      boolean forceAction,
                      String requestLabel)
Sends an "ad-hoc" action request to the specified principal; commits updates.

Parameters:
actionRequested - the request action type
nodeName - the node on which to generate the adhoc request
annotation - the route annotation
targetPrincipalId - the target principal id
responsibilityDescription - description of the responsibility
forceAction - whether the adhoc requests forces action by the recipient
requestLabel - the request label
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.adHocToPrincipal(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocToPrincipal)

adHocToPrincipal

void adHocToPrincipal(AdHocToPrincipal adHocToPrincipal,
                      String annotation)
Sends an "ad-hoc" action request to the specified principal; commits updates.

Parameters:
adHocToPrincipal - a pre-constructed AdHocToPrincipal object
annotation - the route annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.adHocToPrincipal(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocToPrincipal)

adHocToGroup

void adHocToGroup(ActionRequestType actionRequested,
                  String annotation,
                  String targetGroupId,
                  String responsibilityDescription,
                  boolean forceAction)
Sends an "ad-hoc" action request to the specified group; commits updates.

Parameters:
actionRequested - the request action type
annotation - the route annotation
targetGroupId - the target group id
responsibilityDescription - description of the responsibility
forceAction - whether the adhoc requests forces action by the recipient
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.adHocToGroup(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocToGroup)

adHocToGroup

void adHocToGroup(ActionRequestType actionRequested,
                  String nodeName,
                  String annotation,
                  String targetGroupId,
                  String responsibilityDescription,
                  boolean forceAction)
Sends an "ad-hoc" action request to the specified group; commits updates.

Parameters:
actionRequested - the request action type
nodeName - the node on which to generate the adhoc request
annotation - the route annotation
targetGroupId - the target group id
responsibilityDescription - description of the responsibility
forceAction - whether the adhoc requests forces action by the recipient
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.adHocToGroup(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocToGroup)

adHocToGroup

void adHocToGroup(ActionRequestType actionRequested,
                  String nodeName,
                  String annotation,
                  String targetGroupId,
                  String responsibilityDescription,
                  boolean forceAction,
                  String requestLabel)
Sends an "ad-hoc" action request to the specified principal; commits updates.

Parameters:
actionRequested - the request action type
nodeName - the node on which to generate the adhoc request
annotation - the route annotation
targetGroupId - the target group id
responsibilityDescription - description of the responsibility
forceAction - whether the adhoc requests forces action by the recipient
requestLabel - the request label
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.adHocToGroup(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocToGroup)

adHocToGroup

void adHocToGroup(AdHocToGroup adHocToGroup,
                  String annotation)
Sends an "ad-hoc" action request to the specified principal; commits updates.

Parameters:
adHocToGroup - a pre-constructed AdHocToGroup object
annotation - the route annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.adHocToPrincipal(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocToPrincipal)

revokeAdHocRequestById

void revokeAdHocRequestById(String actionRequestId,
                            String annotation)
Revokes an Ad-Hoc request by id; commits updates.

Parameters:
actionRequestId - the action request id to revoke
annotation - the routing annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.revokeAdHocRequestById(org.kuali.rice.kew.api.action.DocumentActionParameters, String)

revokeAdHocRequests

void revokeAdHocRequests(AdHocRevoke revoke,
                         String annotation)
Revokes an Ad-Hoc request by the specified criteria; commits updates.

Parameters:
revoke - the criteria for matching ad hoc action requests on the specified document that should be revoked
annotation - the routing annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.revokeAdHocRequests(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.AdHocRevoke)

revokeAllAdHocRequests

void revokeAllAdHocRequests(String annotation)
Revokes all Ad-Hoc requests; commits updates; commits updates.

Parameters:
annotation - the routing annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.revokeAllAdHocRequests(org.kuali.rice.kew.api.action.DocumentActionParameters)

returnToPreviousNode

void returnToPreviousNode(String annotation,
                          String nodeName)
Returns the document to a previous node; commits updates.

Parameters:
annotation - the routing annotation
nodeName - the node to return to
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.returnToPreviousNode(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.ReturnPoint)

returnToPreviousNode

void returnToPreviousNode(String annotation,
                          ReturnPoint returnPoint)
Returns the document to a previous node; commits updates.

Parameters:
annotation - the routing annotation
returnPoint - the node to return to
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
returnToPreviousNode(String, String), WorkflowDocumentActionsService.returnToPreviousNode(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.ReturnPoint)

move

void move(MovePoint movePoint,
          String annotation)
Moves the document to a different node; commits updates.

Parameters:
movePoint - the node to move to
annotation - the routing annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.move(org.kuali.rice.kew.api.action.DocumentActionParameters, org.kuali.rice.kew.api.action.MovePoint)

takeGroupAuthority

void takeGroupAuthority(String annotation,
                        String groupId)
Takes authority of a group by a member of that group; commits updates.

Parameters:
annotation - the routing annotation
groupId - the group for which to take authority
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.takeGroupAuthority(org.kuali.rice.kew.api.action.DocumentActionParameters, String)

releaseGroupAuthority

void releaseGroupAuthority(String annotation,
                           String groupId)
Releases authority of a group by a member of that group; commits updates.

Parameters:
annotation - the routing annotation
groupId - the group for which to take authority
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.releaseGroupAuthority(org.kuali.rice.kew.api.action.DocumentActionParameters, String)

placeInExceptionRouting

void placeInExceptionRouting(String annotation)
Places the document in exception routing; commits updates.

Parameters:
annotation - the routing annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.placeInExceptionRouting(org.kuali.rice.kew.api.action.DocumentActionParameters)

superUserBlanketApprove

void superUserBlanketApprove(String annotation)
Performs a super-user blanket-approve action; commits updates. The current user must be a super-user for this document.

Parameters:
annotation - the routing annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.superUserBlanketApprove(org.kuali.rice.kew.api.action.DocumentActionParameters, boolean)

superUserNodeApprove

void superUserNodeApprove(String nodeName,
                          String annotation)
Performs a super-user approve action for the specified node; commits updates. The current user must be a super-user for this document.

Parameters:
nodeName - the node to super-user approve
annotation - the routing annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.superUserNodeApprove(org.kuali.rice.kew.api.action.DocumentActionParameters, boolean, String)

superUserTakeRequestedAction

void superUserTakeRequestedAction(String actionRequestId,
                                  String annotation)
Performs a super-user approve action for the specified node; commits updates. The current user must be a super-user for this document.

Parameters:
actionRequestId - the action request to satisfy/approve
annotation - the routing annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.superUserTakeRequestedAction(org.kuali.rice.kew.api.action.DocumentActionParameters, boolean, String)

superUserDisapprove

void superUserDisapprove(String annotation)
Performs a super-user disapprove action; commits updates. The current user must be a super-user for this document.

Parameters:
annotation - the routing annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.superUserDisapprove(org.kuali.rice.kew.api.action.DocumentActionParameters, boolean)

superUserCancel

void superUserCancel(String annotation)
Performs a super-user cancel action; commits updates. The current user must be a super-user for this document.

Parameters:
annotation - the routing annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.superUserCancel(org.kuali.rice.kew.api.action.DocumentActionParameters, boolean)

superUserReturnToPreviousNode

void superUserReturnToPreviousNode(ReturnPoint returnPoint,
                                   String annotation)
Performs a super-user "return to previous node" action; commits updates. The current user must be a super-user for this document.

Parameters:
returnPoint - the node to return to
annotation - the routing annotation
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidDocumentContentException, InvalidActionTakenException
See Also:
WorkflowDocumentActionsService.superUserReturnToPreviousNode(org.kuali.rice.kew.api.action.DocumentActionParameters, boolean, org.kuali.rice.kew.api.action.ReturnPoint)

logAnnotation

void logAnnotation(String annotation)
Records a log action which adds an annotation on the document but does not affect routing. This action is stateless and does not cause a commit of document updates.

Parameters:
annotation - the annotation to log
Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException, - InvalidActionTakenException

isCompletionRequested

boolean isCompletionRequested()
Returns whether a completion request is one of the requested actions.

Returns:
whether a completion request is one of the requested actions.
See Also:
getRequestedActions()

isApprovalRequested

boolean isApprovalRequested()
Returns whether an approval request is one of the requested actions.

Returns:
whether an approval request is one of the requested actions.
See Also:
getRequestedActions()

isAcknowledgeRequested

boolean isAcknowledgeRequested()
Returns whether an acknowledge request is one of the requested actions.

Returns:
whether an acknowledge request is one of the requested actions.
See Also:
getRequestedActions()

isFYIRequested

boolean isFYIRequested()
Returns whether an FYI is one of the requested actions.

Returns:
whether an FYI is one of the requested actions.
See Also:
getRequestedActions()

isBlanketApproveCapable

boolean isBlanketApproveCapable()
Returns whether a blank-approve action is a valid action.

Returns:
whether a blank-approve action is a valid action.
See Also:
getValidActions()

isRouteCapable

boolean isRouteCapable()
Returns whether a route action is a valid action.

Returns:
whether a route action is a valid action.
See Also:
getValidActions()

isValidAction

boolean isValidAction(ActionType actionType)
Returns whether the specified action type is valid

Parameters:
actionType - the non-null ActionType to check
Returns:
whether the specified action type is valid
See Also:
getValidActions()

checkStatus

boolean checkStatus(DocumentStatus status)
Helper that checks whether the document has the given status NOTE: does this really need to be in the public API? it only appears to be used internally

Parameters:
status - the status to check
Returns:
whether the document status is the specified status
See Also:
DocumentContract.getStatus()

isInitiated

boolean isInitiated()
Indicates if the document is in the initiated state or not.

Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

isSaved

boolean isSaved()
Indicates if the document is in the saved state or not.

Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

isEnroute

boolean isEnroute()
Indicates if the document is in the enroute state or not.

Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

isException

boolean isException()
Indicates if the document is in the exception state or not.

Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

isCanceled

boolean isCanceled()
Indicates if the document is in the canceled state or not.

Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

isRecalled

boolean isRecalled()
Indicates if the document is in the recalled state or not.

Returns:
true if in the specified state
Since:
2.1
See Also:
DocumentContract.getStatus()

isDisapproved

boolean isDisapproved()
Indicates if the document is in the disapproved state or not.

Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

isApproved

boolean isApproved()
Indicates if the document is in the Processed or Finalized state.

Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

isProcessed

boolean isProcessed()
Indicates if the document is in the processed state or not.

Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

isFinal

boolean isFinal()
Indicates if the document is in the final state or not.

Returns:
true if in the specified state
See Also:
DocumentContract.getStatus()

getNodeNames

Set<String> getNodeNames()
Returns the names of the route nodes on the document which are currently active.

If the document has completed its routing (i.e. it is in processed or final status) then this method may return an empty set since no nodes are active at that time. In order to get either the active *or* terminal nodes, use the getCurrentNodeNames() method.

Returns:
an unmodifiable set containing the names of the active nodes for this document
See Also:
getActiveRouteNodeInstances(), WorkflowDocumentService.getActiveRouteNodeInstances(String)

getCurrentNodeNames

Set<String> getCurrentNodeNames()
Returns the names of the nodes at which the document is currently at in it's route path.

This method differs from getNodeNames() in the fact that if there are no active nodes, it will return the last nodes on the document instead (a.k.a. the document's terminal nodes).

Returns:
an unmodifiable set containing the names of the nodes at which this document is currently located within it's route path
See Also:
getCurrentRouteNodeInstances(), WorkflowDocumentService.getCurrentRouteNodeInstances(String)

getActiveRouteNodeInstances

List<RouteNodeInstance> getActiveRouteNodeInstances()
Returns the list of active route node instances

Returns:
the list of active route node instances
See Also:
WorkflowDocumentService.getActiveRouteNodeInstances(String)

getCurrentRouteNodeInstances

List<RouteNodeInstance> getCurrentRouteNodeInstances()
Returns the list of active route node instances

Returns:
the list of active route node instances
See Also:
WorkflowDocumentService.getCurrentRouteNodeInstances(String)

getRouteNodeInstances

List<RouteNodeInstance> getRouteNodeInstances()
Returns the flattened list of route node instances

Returns:
the flattened list of route node instances
See Also:
WorkflowDocumentService.getRouteNodeInstances(String)

getPreviousNodeNames

List<String> getPreviousNodeNames()
Returns the list of previous route node names

Returns:
the list of previous route node names
See Also:
WorkflowDocumentService.getPreviousRouteNodeNames(String)

getDocumentDetail

DocumentDetail getDocumentDetail()
Returns detailed document information TODO: consolidate with Document/ModifiableDocument or eliminate? currently bypasses locally cached Document data

Returns:
detailed document information
See Also:
WorkflowDocumentService.getDocumentDetail(String)

updateDocumentContent

void updateDocumentContent(DocumentContentUpdate documentContentUpdate)
Sets internal DocumentContentUpdate object TODO: exposes internal API and used only by tests, candidate for elimination?

Parameters:
documentContentUpdate - the DocumentContentUpdate to set


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.