public class BusinessFlowInstance
extends java.lang.Object
Constructor and Description |
---|
BusinessFlowInstance(java.lang.Long aFlowId,
java.lang.Long aResourceId,
java.lang.String aResourceClassName)
Construct a BusinessFlowInstance object.
|
BusinessFlowInstance(java.lang.String aFlowTypeIdentifier,
BusinessFlowEntityBean anEntity)
Construct a BusinessFlowInstance object.
|
BusinessFlowInstance(java.lang.String aFlowTypeIdentifier,
java.lang.Long anEntityId)
Construct a BusinessFlowInstance object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
anyAutomaticTransition(java.lang.String eventIdentifierFromEntryAction,
java.lang.String approvalEventIdentifier)
Check if we have automatic transitions from the new state after we have finished the
current transition.
|
void |
createInstanceBean(java.lang.Long anEntityId,
java.lang.Integer aStateIdentifier,
java.lang.String aFlowStages,
java.lang.Integer aCurrentFlowStageIndex,
java.lang.String aFlowContext)
Create a record in the FLINSTANCE table for the new business flow instance related to a newly created entity object.
|
java.lang.String |
generateActionName(BusinessFlowTransition aMatchTransition)
Generate an action name for Policy Manager by cancatenating flowTypeIdentifier,
flowIdentifier, eventIdentifier, sourceStateName,and targetStateName.
|
java.lang.String |
generateFlowStageString(BusinessFlow[] subFlows)
Generate a string by cancatenating flow Id's hyphenating by "-".
|
BusinessFlowEntityBean |
getBusinessFlowEntityBean()
Get the business flow entity bean this flow instance is controlling.
|
java.lang.Long |
getBusinessFlowEntityId()
Get the Id of the business flow entity this flow instance is controlling.
|
BusinessFlowManager |
getBusinessFlowManager()
Get the business flow manager which is managing the state machine cache.
|
java.lang.Integer |
getCurrentFlowStageIndex()
Get the index of the current flow stage the business flow instance is in.
|
BusinessFlowStateRelation |
getCurrentFlowStateRelBean()
Get the business flow state relation bean this flow instance is currently using.
|
BusinessFlowState |
getCurrentState()
Get the business flow state bean this flow instance is currently in.
|
java.lang.String |
getEventIdentifier()
Get an eventIdentifier.
|
BusinessFlow |
getFlowBean()
Get the bean of the business flow this flow instance is currently following.
|
com.ibm.commerce.ubf.objects.FlowInstanceAccessBean |
getFlowInstance()
Get the business flow instance access bean.
|
java.lang.String |
getFlowStages()
Get the flow stage string.
|
BusinessFlowType |
getFlowType()
Get the bean of the business flow type this flow instance belongs to.
|
BusinessFlowStateRelation |
getTargetFlowStateRelBean()
Get the business flow state relation bean this flow instance will be using next.
|
BusinessFlowState |
getTargetState()
Get the business flow state bean this flow instance will in next.
|
BusinessFlowTransition[] |
getTransitions()
Get an array of transitions the business flow instance has from the current state.
|
boolean |
isIsAprvAutoTranstn()
Check if it is an automatic transition for approval.
|
boolean |
isIsCreate()
Check if it is a new business flow instance.
|
boolean |
nullEventTransitionsExist()
Check if we have null event transitions.
|
com.ibm.commerce.approval.objects.ApprovalStatusAccessBean |
retrieveAprvStatusRecord(BusinessFlowEventData data)
Retrieve an ApprovalStatusAccessBean object which is the approval record in the APRVSTATUS table for the approver.
|
void |
retrieveEntityDataBean(java.lang.Long anEntityId)
Retrieve an entity data bean based on the bean class name in the FLOWTYPE table.
|
void |
retrieveEntityDataBean(java.lang.Long anEntityId,
java.lang.String aFlowTypeIdentifier)
Retrieve an entity data bean based on the bean class name in the FLOWTYPE table.
|
BusinessFlowEntityBean |
retrieveResourceDataBean(java.lang.Long aResourceId,
java.lang.String aResourceClassName)
Retrieve a resource data bean based on the bean class name and its Id.
|
BusinessFlowTransition[] |
retrieveTransitions(java.lang.String anEventIdentifier)
Retrieve an array of business flow transitions based on the event identifier.
|
void |
setBusinessFlowEntityBean(BusinessFlowEntityBean newBusinessFlowEntityBean)
Set the business flow entity bean this flow instance is controlling..
|
void |
setBusinessFlowEntityId(java.lang.Long newBusinessFlowEntityId)
Set the id of the business flow entity bean this flow instance is controlling..
|
void |
setBusinessFlowManager(BusinessFlowManager newBusinessFlowManager)
Set the business flow manager which is managing the state machine cache.
|
void |
setCurrentFlowStageIndex(java.lang.Integer newCurrentFlowStageIndex)
Set the index of the current flow stage the business flow instance is in.
|
void |
setCurrentFlowStateRelBean(BusinessFlowStateRelation newCurrentFlowStateRelBean)
Set the business flow state relation bean this flow instance is currently using.
|
void |
setCurrentState(BusinessFlowState newCurrentState)
Set the business flow state bean this flow instance is currently in.
|
void |
setEventIdentifier(java.lang.String newEventIdentifier)
Set an eventIdentifier.
|
void |
setFlowBean(BusinessFlow newFlowBean)
Set the bean of the business flow this flow instance is following.
|
void |
setFlowInstance(com.ibm.commerce.ubf.objects.FlowInstanceAccessBean newFlowInstance)
Set the business flow instance access bean.
|
void |
setFlowStages(java.lang.String newFlowStages)
Set the flow stage string.
|
void |
setFlowType(BusinessFlowType newFlowType)
Set the bean of the business flow type this flow instance belongs to.
|
void |
setIsAprvAutoTranstn(boolean newIsAprvAutoTranstn)
Set the flag to indicate if it is an automatic transition for approval.
|
void |
setIsCreate(boolean newIsCreate)
Set the flag to indicate if it is a new business flow instance.
|
void |
setTargetFlowStateRelBean(BusinessFlowStateRelation newTargetFlowStateRelBean)
Set the target business flow state relation bean this flow instance will be using next.
|
void |
setTargetState(BusinessFlowState newTargetState)
Set the business flow state bean this flow instance will in next.
|
void |
setTransitions(BusinessFlowTransition[] newTransitions)
Set an array of transitions the business flow instance has from the current state.
|
void |
updateFlowInstance(java.lang.String flowContext)
Update the record in the FLINSTANCE table for the business flow instance related to the entity object,
including its current state identifier, stage index, timestamp.
|
public BusinessFlowInstance(java.lang.Long aFlowId, java.lang.Long aResourceId, java.lang.String aResourceClassName) throws com.ibm.commerce.exception.ECSystemException
aFlowId
- The BusinessFlow Id this object represents.aResourceId
- The resource Id for access control checking.aResourceClassName
- The resource class name for access control checking.com.ibm.commerce.exception.ECSystemException
- If the entity data bean class can not be found,
the entity data bean class can not be accessed, or the entity data bean class can not be instantiated.public BusinessFlowInstance(java.lang.String aFlowTypeIdentifier, BusinessFlowEntityBean anEntity)
aFlowTypeIdentifier
- The business flow type identifier this business flow instance belongs to.anEntity
- The object of the business entity.public BusinessFlowInstance(java.lang.String aFlowTypeIdentifier, java.lang.Long anEntityId) throws com.ibm.commerce.exception.ECSystemException
aFlowTypeIdentifier
- The business flow type identifier this business flow instance belongs to.anEntityId
- The id of the business entity.com.ibm.commerce.exception.ECSystemException
- If the entity data bean class can not be found,
the entity data bean class can not be accessed, or the entity data bean class can not be instantiated.public boolean anyAutomaticTransition(java.lang.String eventIdentifierFromEntryAction, java.lang.String approvalEventIdentifier)
eventIdentifierFromEntryAction
- The event identifier from the entryAction.approvalEventIdentifier
- The event identifier from the approval code.public void createInstanceBean(java.lang.Long anEntityId, java.lang.Integer aStateIdentifier, java.lang.String aFlowStages, java.lang.Integer aCurrentFlowStageIndex, java.lang.String aFlowContext)
anEntityId
- The entity object Id which has been just created.aStateIdentifier
- The Identifier the current state which the entity is in.aFlowStages
- The flow stage string which represents the sequence of a composite flow.aCurrentFlowStageIndex
- The index of the current flow stage.aFlowContext
- The name-value pair string which is related to the business flow instance.public java.lang.String generateActionName(BusinessFlowTransition aMatchTransition)
aMatchTransition
- The current transition.public java.lang.String generateFlowStageString(BusinessFlow[] subFlows)
subFlows
- The array of flow Id's.public BusinessFlowEntityBean getBusinessFlowEntityBean()
public java.lang.Long getBusinessFlowEntityId()
public BusinessFlowManager getBusinessFlowManager()
public java.lang.Integer getCurrentFlowStageIndex()
public BusinessFlowStateRelation getCurrentFlowStateRelBean()
public BusinessFlowState getCurrentState()
public java.lang.String getEventIdentifier()
public BusinessFlow getFlowBean()
public com.ibm.commerce.ubf.objects.FlowInstanceAccessBean getFlowInstance()
public java.lang.String getFlowStages()
public BusinessFlowType getFlowType()
public BusinessFlowStateRelation getTargetFlowStateRelBean()
public BusinessFlowState getTargetState()
public BusinessFlowTransition[] getTransitions()
public boolean isIsAprvAutoTranstn()
public boolean isIsCreate()
public boolean nullEventTransitionsExist()
public com.ibm.commerce.approval.objects.ApprovalStatusAccessBean retrieveAprvStatusRecord(BusinessFlowEventData data)
data
- The BusinessFlowEventData which contains information related to the request.public void retrieveEntityDataBean(java.lang.Long anEntityId) throws com.ibm.commerce.exception.ECSystemException
anEntityId
- The id of the entity data bean.com.ibm.commerce.exception.ECSystemException
- If the user does fails for the ,
the entity data bean class can not be accessed, or the entity data bean class can not be instantiated.public void retrieveEntityDataBean(java.lang.Long anEntityId, java.lang.String aFlowTypeIdentifier) throws com.ibm.commerce.exception.ECSystemException
anEntityId
- The id of the entity data bean.aFlowTypeIdentifier
- The identifier of the flow type.com.ibm.commerce.exception.ECSystemException
- If the user does fails for the ,
the entity data bean class can not be accessed, or the entity data bean class can not be instantiated.public BusinessFlowEntityBean retrieveResourceDataBean(java.lang.Long aResourceId, java.lang.String aResourceClassName) throws com.ibm.commerce.exception.ECSystemException
aResourceId
- The id of the resource data bean.aResourceClassName
- The resource class name.com.ibm.commerce.exception.ECSystemException
- If the user does fails for the ,
the entity data bean class can not be accessed, or the entity data bean class can not be instantiated.public BusinessFlowTransition[] retrieveTransitions(java.lang.String anEventIdentifier)
anEventIdentifier
- The identifier of the event.public void setBusinessFlowEntityBean(BusinessFlowEntityBean newBusinessFlowEntityBean)
newBusinessFlowEntityBean
- The business flow entity bean.public void setBusinessFlowEntityId(java.lang.Long newBusinessFlowEntityId)
newBusinessFlowEntityId
- The id of the business flow entity bean.public void setBusinessFlowManager(BusinessFlowManager newBusinessFlowManager)
newBusinessFlowManager
- The business flow manager.public void setCurrentFlowStageIndex(java.lang.Integer newCurrentFlowStageIndex)
newCurrentFlowStageIndex
- The index of the current flow stage.public void setCurrentFlowStateRelBean(BusinessFlowStateRelation newCurrentFlowStateRelBean)
newCurrentFlowStateRelBean
- The business flow state relation bean.public void setCurrentState(BusinessFlowState newCurrentState)
newCurrentState
- The business flow state bean.public void setEventIdentifier(java.lang.String newEventIdentifier)
newEventIdentifier
- The event identifierpublic void setFlowBean(BusinessFlow newFlowBean)
newFlowBean
- The business flow bean.public void setFlowInstance(com.ibm.commerce.ubf.objects.FlowInstanceAccessBean newFlowInstance)
newFlowInstance
- The business flow instance access bean.public void setFlowStages(java.lang.String newFlowStages)
newFlowStages
- The flow stage string.public void setFlowType(BusinessFlowType newFlowType)
newFlowType
- The business flow type bean.public void setIsAprvAutoTranstn(boolean newIsAprvAutoTranstn)
newIsAprvAutoTranstn
- The flag to indicate if it is an automatic transition for approval.public void setIsCreate(boolean newIsCreate)
newIsCreate
- The flag to indicate if it is a new business flow instance.public void setTargetFlowStateRelBean(BusinessFlowStateRelation newTargetFlowStateRelBean)
newTargetFlowStateRelBean
- The target business flow state relation bean.public void setTargetState(BusinessFlowState newTargetState)
newTargetState
- The business flow state.public void setTransitions(BusinessFlowTransition[] newTransitions)
newTransitions
- The array of transitions.public void updateFlowInstance(java.lang.String flowContext)
flowContext
- The flow context from an action command which needs to be persisted.