java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.approval.commands.ApprovalProcessRecordsCmdImpl
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:
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.
This command uses the following AccessBeans:
Field Summary | |
---|---|
protected
java.lang.Integer |
action action. |
protected
java.lang.Long |
actorId actor id. |
protected
java.lang.Long |
businessEntityId entity id. |
protected
java.lang.Long |
businessFlowId flow id. |
static java.lang.String |
COPYRIGHT IBM copyright notice field. |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.approval.commands. ApprovalProcessRecordsCmd |
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
ApprovalProcessRecordsCmdImpl() Default constructor. |
Method Summary | |
---|---|
boolean |
isReadyToCallExecute() Check if the command is ready to be executed. |
void |
performExecute() The main logic. |
void |
setAction(java.lang.Integer newAction) Sets the action being performed: approve, reject, or cancel. |
void |
setActorId(java.lang.Long newActorId) Sets the user performing the action. |
void |
setBusinessEntityId(java.lang.Long newBusinessEntityId) Sets the ID of the object being acted on. |
void |
setBusinessFlowId(java.lang.Long newBusinessFlowId) Sets the flow being used for this approval process. |
void |
setComment(java.lang.String newComment) Sets a comment that the actor wants included with the action. |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
reset,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties,
validateParameters |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
protected java.lang.Integer action
protected java.lang.Long businessFlowId
protected java.lang.Long businessEntityId
protected java.lang.Long actorId
Constructor Detail |
---|
public ApprovalProcessRecordsCmdImpl()
Method Detail |
---|
public boolean isReadyToCallExecute()
isReadyToCallExecute
in class
AbstractECTargetableCommand
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException.
ECException
public void setAction(java.lang.Integer newAction)
setAction
in interface
ApprovalProcessRecordsCmd
newAction
- The action being performed: approve, reject, or
cancelpublic void setActorId(java.lang.Long newActorId)
setActorId
in interface
ApprovalProcessRecordsCmd
newActorId
- The user acting on the
approvalpublic void setBusinessEntityId(java.lang.Long newBusinessEntityId)
setBusinessEntityId
in interface
ApprovalProcessRecordsCmd
newBusinessEntityId
- The entity on which the approval is
being donepublic void setBusinessFlowId(java.lang.Long newBusinessFlowId)
setBusinessFlowId
in interface
ApprovalProcessRecordsCmd
newBusinessFlowId
- The flow being used for this
approvalpublic void setComment(java.lang.String newComment)
setComment
in interface
ApprovalProcessRecordsCmd
newComment
- The reason supplied by actor for performing the
action