public class ApprovalProcessRecordsCmdImpl extends com.ibm.commerce.command.TaskCommandImpl implements ApprovalProcessRecordsCmd
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:
,
ApprovalStatusAccessBean| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName, NAME| Constructor and Description |
|---|
ApprovalProcessRecordsCmdImpl()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaccessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameterscheckIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameterspublic static final java.lang.String COPYRIGHT
public ApprovalProcessRecordsCmdImpl()
public boolean isReadyToCallExecute()
isReadyToCallExecute in class com.ibm.commerce.command.AbstractECTargetableCommandpublic void performExecute()
throws com.ibm.commerce.exception.ECException
performExecute in interface com.ibm.commerce.command.ECCommandperformExecute in class com.ibm.commerce.command.AbstractECTargetableCommandECException.com.ibm.commerce.exception.ECExceptionpublic void setAction(java.lang.Integer newAction)
setAction in interface ApprovalProcessRecordsCmdnewAction - The action being performed: approve, reject, or cancelpublic void setActorId(java.lang.Long newActorId)
setActorId in interface ApprovalProcessRecordsCmdnewActorId - The user acting on the approvalpublic void setBusinessEntityId(java.lang.Long newBusinessEntityId)
setBusinessEntityId in interface ApprovalProcessRecordsCmdnewBusinessEntityId - The entity on which the approval is being donepublic void setBusinessFlowId(java.lang.Long newBusinessFlowId)
setBusinessFlowId in interface ApprovalProcessRecordsCmdnewBusinessFlowId - The flow being used for this approvalpublic void setComment(java.lang.String newComment)
setComment in interface ApprovalProcessRecordsCmdnewComment - The reason supplied by actor for performing the action