Class RecallAction


public class RecallAction extends ReturnToPreviousNodeAction
Since:
2.1
  • Field Details

    • cancel

      protected final boolean cancel
    • notificationRecipients

      protected final Collection<Recipient> 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

      public String validateActionRules(List<ActionRequestValue> actionRequests)
      Overrides:
      validateActionRules in class ReturnToPreviousNodeAction
    • validateActionsTaken

      protected String validateActionsTaken(DocumentRouteHeaderValue rh)
      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

      protected String validateRouting(DocumentRouteHeaderValue rh)
      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: ReturnToPreviousNodeAction
      Allows subclasses to determine which actionrequests to inspect for purposes of action validation
      Overrides:
      findApplicableActionRequests in class ReturnToPreviousNodeAction
      Parameters:
      actionRequests - all actionrequests for this document
      Returns:
      a (possibly) filtered list of actionrequests
    • isActionCompatibleRequest

      public boolean isActionCompatibleRequest(List<ActionRequestValue> requests)
      Overrides:
      isActionCompatibleRequest in class ReturnToPreviousNodeAction
    • getReturnToInitiatorActionRequestType

      protected org.kuali.rice.kew.api.action.ActionRequestType getReturnToInitiatorActionRequestType()
      Description copied from class: ReturnToPreviousNodeAction
      Template method that determines what action request to generate when returning to initiator
      Overrides:
      getReturnToInitiatorActionRequestType in class ReturnToPreviousNodeAction
      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:
      determineInitialNodePrincipal in class ReturnToPreviousNodeAction
      Parameters:
      routeHeader - the document route header
      Returns:
      a Principal
    • sendAdditionalNotifications

      protected void sendAdditionalNotifications()
      Description copied from class: ReturnToPreviousNodeAction
      Template 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:
      sendAdditionalNotifications in class ReturnToPreviousNodeAction
    • recordAction

      public void recordAction() throws org.kuali.rice.kew.api.exception.InvalidActionTakenException
      Overrides:
      recordAction in class ReturnToPreviousNodeAction
      Throws:
      org.kuali.rice.kew.api.exception.InvalidActionTakenException
    • getLastActionTaken

      protected static ActionTakenValue getLastActionTaken(String docId)
      Returns the last action taken on a document
      Parameters:
      docId - the doc id
      Returns:
      last action taken on a document