com.ibm.commerce.approval.commands

Interface ApprovalProcessRecordsCmd

  • All Superinterfaces:
    com.ibm.websphere.command.CacheableCommand, com.ibm.commerce.command.CacheableECCommand, com.ibm.websphere.command.Command, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.TaskCommand
    All Known Implementing Classes:
    ApprovalProcessRecordsCmdImpl


    public interface ApprovalProcessRecordsCmd
    extends com.ibm.commerce.command.TaskCommand
    Processes an approval action with respect to the approval records. Approval actions include the approver approving or rejecting or the submitter canceling. The approver may supply an optional comment which will be stored in the approval request's record in the APRVSTATUS table.

    Before executing this task command the following sets should be performed:

  • setBusinessFlowId(): the flow being used for this approval
  • setBusinessEntityId(): the entity on which the approval is being done
  • setActorId(): the user acting on the approval
  • setAction(): the action being performed: approve, reject, or cancel
  • setComment(): the reason supplied by actor for performing the action
  • Behaviour

    This command loop through the records in the APRVSTATUS table for the given entity. Records that are for the given entity, but whose approver ID does not match the actor, get deleted. If there is a record whose approver ID matches the actor for the given entity, the status and action timestamp are updated.

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
      static java.lang.String defaultCommandClassName
      The default implementation class.
      static java.lang.String NAME
      The name of the Command Interface class.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void setAction(java.lang.Integer action)
      Sets the action being performed: approve, reject, or cancel.
      void setActorId(java.lang.Long actorId)
      Sets the user performing the action.
      void setBusinessEntityId(java.lang.Long businessEntityId)
      Sets the ID of the business entity object being acted on.
      void setBusinessFlowId(java.lang.Long businessFlowId)
      Sets the flow being used for this approval process.
      void setComment(java.lang.String comment)
      Sets a comment that the actor wants included with the action.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.ibm.commerce.command.CacheableECCommand

        execute
      • Methods inherited from interface com.ibm.commerce.command.ECCommand

        checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, performExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • defaultCommandClassName

        static final java.lang.String defaultCommandClassName
        The default implementation class.
        See Also:
        Constant Field Values
      • NAME

        static final java.lang.String NAME
        The name of the Command Interface class.
        See Also:
        Constant Field Values
    • Method Detail

      • setAction

        void setAction(java.lang.Integer action)
        Sets the action being performed: approve, reject, or cancel. Represented as an integer.
        Parameters:
        action - The action being performed: approve, reject, or cancel
      • setActorId

        void setActorId(java.lang.Long actorId)
        Sets the user performing the action.
        Parameters:
        actorId - The user acting on the approval
      • setBusinessEntityId

        void setBusinessEntityId(java.lang.Long businessEntityId)
        Sets the ID of the business entity object being acted on.
        Parameters:
        businessEntityId - The entity on which the approval is being done
      • setBusinessFlowId

        void setBusinessFlowId(java.lang.Long businessFlowId)
        Sets the flow being used for this approval process.
        Parameters:
        businessFlowId - The flow being used for this approval
      • setComment

        void setComment(java.lang.String comment)
        Sets a comment that the actor wants included with the action.
        Parameters:
        comment - The reason supplied by actor for performing the action