Package org.kuali.rice.kew.actions
Class RecallAction
java.lang.Object
org.kuali.rice.kew.actions.ActionTakenEvent
org.kuali.rice.kew.actions.ReturnToPreviousNodeAction
org.kuali.rice.kew.actions.RecallAction
- Since:
- 2.1
-
Field Summary
FieldsFields inherited from class org.kuali.rice.kew.actions.ReturnToPreviousNodeAction
DEFAULT_SEND_NOTIFICATIONS, INITIAL_NODE_NAME, nodeNameFields inherited from class org.kuali.rice.kew.actions.ActionTakenEvent
annotation, DEFAULT_ANNOTATION, DEFAULT_QUEUE_DOCUMENT_AFTER_ACTION, DEFAULT_RUN_POSTPROCESSOR_LOGIC, routeHeader -
Constructor Summary
ConstructorsConstructorDescriptionRecallAction(DocumentRouteHeaderValue routeHeader, org.kuali.rice.kim.api.identity.principal.PrincipalContract principal) Constructor required for ActionRegistry validationRecallAction(DocumentRouteHeaderValue routeHeader, org.kuali.rice.kim.api.identity.principal.PrincipalContract principal, String annotation, boolean cancel) RecallAction(DocumentRouteHeaderValue routeHeader, org.kuali.rice.kim.api.identity.principal.PrincipalContract principal, String annotation, boolean cancel, boolean sendNotifications) RecallAction(DocumentRouteHeaderValue routeHeader, org.kuali.rice.kim.api.identity.principal.PrincipalContract principal, String annotation, boolean cancel, boolean sendNotifications, boolean runPostProcessorLogic) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.kuali.rice.kim.api.identity.principal.PrincipalContractdetermineInitialNodePrincipal(DocumentRouteHeaderValue routeHeader) Override the default return to previous behavior so that the document is returned to the recaller, not initiatorprotected List<ActionRequestValue> findApplicableActionRequests(List<ActionRequestValue> actionRequests) Allows subclasses to determine which actionrequests to inspect for purposes of action validationprotected static ActionTakenValuegetLastActionTaken(String docId) Returns the last action taken on a documentprotected org.kuali.rice.kew.api.action.ActionRequestTypeTemplate method that determines what action request to generate when returning to initiatorbooleanisActionCompatibleRequest(List<ActionRequestValue> requests) protected static Collection<Recipient> parseNotificationRecipients(DocumentRouteHeaderValue routeHeader) Parses notification recipients from the RECALL_NOTIFICATION document type policy, if presentvoidprotected voidTemplate method subclasses can use to send addition notification upon a return to previous action.validateActionRules(List<ActionRequestValue> actionRequests) protected StringDetermines whether prior actions taken are compatible with recall action by checking the RECALL_VALID_ACTIONSTAKEN document type policy.protected StringDetermines whether the doc's type appears to statically define any routing.Methods inherited from class org.kuali.rice.kew.actions.ReturnToPreviousNodeAction
canReturnToPreviousNode, executeNodeChange, isSuperUserUsage, processReturnToInitiator, setSuperUserUsage, validateActionRulesMethods inherited from class org.kuali.rice.kew.actions.ActionTakenEvent
filterActionRequestsByCode, findDelegatorForActionRequests, generateAcknowledgementsToPreviousActionTakers, getActionPerformedCode, getActionRequestService, getActionTakenCode, getDocumentId, getGroupIdsForPrincipal, getPrincipal, getRouteHeader, invokePostProcessor, isActionValid, isPolicySet, isPolicySet, isRunPostProcessorLogic, notifyActionTaken, notifyAfterActionTaken, notifyStatusChange, performAction, queueDocumentProcessing, saveActionTaken, saveActionTaken, saveActionTaken, saveActionTaken, setActionTakenCode, setRouteHeader, updateSearchableAttributesIfPossible
-
Field Details
-
cancel
protected final boolean cancel -
notificationRecipients
-
-
Constructor Details
-
RecallAction
public RecallAction(DocumentRouteHeaderValue routeHeader, org.kuali.rice.kim.api.identity.principal.PrincipalContract principal) Constructor required for ActionRegistry validation -
RecallAction
public RecallAction(DocumentRouteHeaderValue routeHeader, org.kuali.rice.kim.api.identity.principal.PrincipalContract principal, String annotation, boolean cancel) -
RecallAction
public RecallAction(DocumentRouteHeaderValue routeHeader, org.kuali.rice.kim.api.identity.principal.PrincipalContract principal, String annotation, boolean cancel, boolean sendNotifications) -
RecallAction
public RecallAction(DocumentRouteHeaderValue routeHeader, org.kuali.rice.kim.api.identity.principal.PrincipalContract principal, String annotation, boolean cancel, boolean sendNotifications, boolean runPostProcessorLogic)
-
-
Method Details
-
parseNotificationRecipients
protected static Collection<Recipient> parseNotificationRecipients(DocumentRouteHeaderValue routeHeader) Parses notification recipients from the RECALL_NOTIFICATION document type policy, if present- Parameters:
routeHeader- this document- Returns:
- notification recipient RuleResponsibilityBos
-
validateActionRules
- Overrides:
validateActionRulesin classReturnToPreviousNodeAction
-
validateActionsTaken
Determines whether prior actions taken are compatible with recall action by checking the RECALL_VALID_ACTIONSTAKEN document type policy.- Parameters:
rh- the DocumentRouteHeaderValue- Returns:
- null if valid (policy not specified, no actions taken, or all actions taken are in valid actions taken list), or error message if invalid
-
validateRouting
Determines whether the doc's type appears to statically define any routing. If not, then Recall action doesn't make much sense, and should not be available. Checks whether any document type processes are defined, and if so, whether are are any non-"adhoc" nodes (based on literal node name check).- Parameters:
rh- the DocumentRouteHeaderValue- Returns:
- error message if it looks like it's this doc will not route to a person based on static route definition, null (valid) otherwise
-
findApplicableActionRequests
protected List<ActionRequestValue> findApplicableActionRequests(List<ActionRequestValue> actionRequests) Description copied from class:ReturnToPreviousNodeActionAllows subclasses to determine which actionrequests to inspect for purposes of action validation- Overrides:
findApplicableActionRequestsin classReturnToPreviousNodeAction- Parameters:
actionRequests- all actionrequests for this document- Returns:
- a (possibly) filtered list of actionrequests
-
isActionCompatibleRequest
- Overrides:
isActionCompatibleRequestin classReturnToPreviousNodeAction
-
getReturnToInitiatorActionRequestType
protected org.kuali.rice.kew.api.action.ActionRequestType getReturnToInitiatorActionRequestType()Description copied from class:ReturnToPreviousNodeActionTemplate method that determines what action request to generate when returning to initiator- Overrides:
getReturnToInitiatorActionRequestTypein classReturnToPreviousNodeAction- Returns:
- the ActionRequestType
-
determineInitialNodePrincipal
protected org.kuali.rice.kim.api.identity.principal.PrincipalContract determineInitialNodePrincipal(DocumentRouteHeaderValue routeHeader) Override the default return to previous behavior so that the document is returned to the recaller, not initiator- Overrides:
determineInitialNodePrincipalin classReturnToPreviousNodeAction- Parameters:
routeHeader- the document route header- Returns:
- a Principal
-
sendAdditionalNotifications
protected void sendAdditionalNotifications()Description copied from class:ReturnToPreviousNodeActionTemplate method subclasses can use to send addition notification upon a return to previous action. This occurs after the postprocessors have been called and the node has been changed- Overrides:
sendAdditionalNotificationsin classReturnToPreviousNodeAction
-
recordAction
public void recordAction() throws org.kuali.rice.kew.api.exception.InvalidActionTakenException- Overrides:
recordActionin classReturnToPreviousNodeAction- Throws:
org.kuali.rice.kew.api.exception.InvalidActionTakenException
-
getLastActionTaken
Returns the last action taken on a document- Parameters:
docId- the doc id- Returns:
- last action taken on a document
-