|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.shark.WfExecutionObjectImpl
org.enhydra.shark.WfProcessImpl
WfProcessImpl - Workflow Process Object implementation
Field Summary | |
protected ActivityCache |
activityCache
|
protected java.util.Map |
activityToFollowedTransitions
|
protected WfActivityInternal |
actRequester
|
protected java.lang.String |
actRequesterId
|
protected java.lang.String |
actRequestersProcessId
|
protected boolean |
contextInitialized
|
protected long |
creationTime
|
protected Evaluator |
evaluator
|
protected java.lang.String |
externalRequesterClassName
|
protected TxSynchronization |
initialTransaction
|
protected boolean |
isReadOnly
|
protected boolean |
isRunning
|
protected boolean |
justCreated
|
protected boolean |
justCreatedVariables
|
protected java.util.List |
lastFinishedActivities
|
protected WfProcessMgrInternal |
manager
|
protected java.lang.String |
managerName
|
protected java.lang.String |
mgrVer
|
protected java.util.Map |
newActivityToFollowedTransitions
|
protected java.lang.String |
pDefId
|
protected java.lang.String |
pkgId
|
protected java.util.Map |
processContext
|
protected java.lang.String |
resRequesterId
|
protected java.lang.Thread |
startingThread
|
protected long |
startTime
|
protected boolean |
terminateOrAbortFromActivity
|
protected java.util.Set |
variableIdsToPersist
|
protected org.enhydra.shark.xpdl.elements.WorkflowProcess |
xpdlProcess
|
Fields inherited from class org.enhydra.shark.WfExecutionObjectImpl |
description, key, lastStateEventAudit, lastStateTime, limitTime, name, priority, state |
Constructor Summary | |
protected |
WfProcessImpl(ProcessPersistenceObject po)
Used to create object when restoring it from database. |
protected |
WfProcessImpl(WMSessionHandle shandle,
WfProcessMgrInternal manager,
WfRequesterInternal requester,
java.lang.String key)
Creates new WfProcessImpl |
Method Summary | |
void |
abort(WMSessionHandle shandle)
Abort the execution of this process. |
void |
abortFromActivity(WMSessionHandle shandle)
|
WfActivityInternal |
activateBlockActivity(WMSessionHandle shandle,
java.lang.String blockActDefId)
|
void |
activity_abort(WMSessionHandle shandle,
WfActivityInternal activity)
Receives notification when an activity has aborted. |
void |
activity_complete(WMSessionHandle shandle,
WfActivityInternal activity)
Receives notification when an activity has completed. |
void |
activity_terminate(WMSessionHandle shandle,
WfActivityInternal activity)
Receives notification when an activity has terminated. |
protected void |
change_state(WMSessionHandle shandle,
java.lang.String new_state)
Method change_state |
boolean |
checkDeadline(WMSessionHandle shandle,
java.lang.String actId)
|
WfActivityInternal[] |
checkDeadlines(WMSessionHandle shandle)
|
protected void |
checkReadOnly()
|
protected ProcessPersistenceObject |
createAndFillPersistentObject()
|
void |
delete(WMSessionHandle shandle)
|
WfProcessInternal |
duplicate()
|
boolean |
equals(java.lang.Object obj)
It is assumed that there can't be two or more processes having the same key. |
Evaluator |
evaluator(WMSessionHandle shandle)
|
protected void |
fillPersistentObject(ProcessPersistenceObject po)
|
java.util.List |
getActiveActivities(WMSessionHandle shandle)
|
WfActivityInternal |
getActiveActivity(WMSessionHandle shandle,
java.lang.String actId)
|
WfActivityInternal |
getActivity(WMSessionHandle shandle,
java.lang.String actId)
|
java.lang.String |
getActivityRequesterId(WMSessionHandle shandle)
|
java.lang.String |
getActivityRequesterProcessId(WMSessionHandle shandle)
|
java.util.List |
getAllActiveActivitiesForBlockActivity(WMSessionHandle shandle,
java.lang.String blockActivityId)
|
java.util.List |
getAllActivities(WMSessionHandle shandle)
|
java.util.Map |
getContext(WMSessionHandle shandle)
|
long |
getCreationTime(WMSessionHandle shandle)
|
protected java.util.List |
getExceptionTransFrom(WMSessionHandle shandle,
WfActivityInternal fromActivity,
org.enhydra.shark.xpdl.elements.Activity fromActDef,
java.lang.String exceptionName)
|
protected java.lang.String |
getNextWorkItemId(WMSessionHandle shandle,
java.lang.String aDefId)
Get the next work item ID. |
protected org.enhydra.shark.xpdl.elements.WorkflowProcess |
getProcessDefinition(WMSessionHandle shandle)
|
java.lang.String |
getResourceRequesterId(WMSessionHandle shandle)
|
long |
getStartTime(WMSessionHandle shandle)
|
protected java.util.List |
getTransFrom(WMSessionHandle shandle,
WfActivityInternal fromActivity,
org.enhydra.shark.xpdl.elements.Activity fromActDef)
|
protected java.lang.String |
getUnsatisfiedSplitConditionHandlingMode(WMSessionHandle shandle)
|
protected org.enhydra.shark.xpdl.XMLCollectionElement |
getXPDLObject(WMSessionHandle shandle)
|
protected void |
handleBrokenAsyncDeadlines(WMSessionHandle shandle,
java.util.Map actToExcNames)
|
int |
hashCode()
|
int |
how_many_step(WMSessionHandle shandle)
Retrieve the no of activities in this process. |
protected void |
initializeProcessContext(WMSessionHandle shandle)
Puts the workflow relevant data and formal parameters into process context. |
protected boolean |
isActivityDefinitionActive(WMSessionHandle shandle,
org.enhydra.shark.xpdl.elements.Activity aDef,
WfActivityInternal ba)
Returns if there is an active activity for given definition. |
boolean |
isReadOnly()
|
protected void |
joinTransition(WMSessionHandle shandle,
WfActivityInternal fromActivity,
org.enhydra.shark.xpdl.elements.Activity toActivityDef)
|
java.lang.String |
manager_name(WMSessionHandle shandle)
|
java.lang.String |
manager_version(WMSessionHandle shandle)
|
WfProcessMgrInternal |
manager(WMSessionHandle shandle)
Retrieve the WfProcessMgr of this process. |
void |
mandatoryDelete(WMSessionHandle shandle)
|
protected void |
notifyRequester(WMSessionHandle shandle,
WfEventAudit event)
|
java.lang.String |
package_id(WMSessionHandle shandle)
|
void |
persist(WMSessionHandle shandle)
|
protected void |
persistActivityToFollowedTransitions(WMSessionHandle shandle)
|
protected void |
persistProcessContext(WMSessionHandle shandle)
|
java.lang.String |
process_definition_id(WMSessionHandle shandle)
|
java.lang.String |
process_definition_name(WMSessionHandle shandle)
|
protected void |
queueNext(WMSessionHandle shandle,
WfActivityInternal fromActivity)
|
WfRequesterInternal |
requester(WMSessionHandle shandle)
Retrieve the requestor of this process. |
protected WfRequesterInternal |
requester(WMSessionHandle shandle,
int mode)
|
protected void |
restore(ProcessPersistenceObject po)
|
protected int |
restoreActivityToFollowedTransitionsMap(WMSessionHandle shandle,
org.enhydra.shark.AndJoinHelperStruct ajhs)
|
java.util.Map |
result(WMSessionHandle shandle)
Retrieve the result for this process. |
void |
resume(WMSessionHandle shandle)
Resume this process. |
protected void |
run(WMSessionHandle shandle,
WfActivityInternal lastFinishedActivity)
|
protected void |
runBlock(WMSessionHandle shandle,
org.enhydra.shark.xpdl.elements.Activity bActivity,
WfActivityInternal blockActivity)
|
void |
set_process_context(WMSessionHandle shandle,
java.util.Map newValue)
Asignes the new values to some process context variables. |
void |
setExternalRequesterClassName(WMSessionHandle shandle,
java.lang.String extReqClassName)
|
protected void |
setProcessVariables(WMSessionHandle shandle)
|
void |
setReadOnly(boolean ro)
|
protected void |
setXPDLAttribs()
|
void |
start_activity(WMSessionHandle shandle,
java.lang.String actDefId,
java.lang.String blockActId)
Activates an activity object |
void |
start(WMSessionHandle shandle)
Starts the process. |
protected void |
startActivity(WMSessionHandle shandle,
org.enhydra.shark.xpdl.elements.Activity activity,
WfActivityInternal ba)
|
void |
suspend(WMSessionHandle shandle)
Suspend this process. |
protected void |
synchronizeProcess(WMSessionHandle shandle)
|
void |
terminate(WMSessionHandle shandle)
Terminate this process. |
void |
terminateFromActivity(WMSessionHandle shandle)
|
java.lang.String |
toString()
|
Methods inherited from class org.enhydra.shark.WfExecutionObjectImpl |
calculateLimit, description, duplicateContext, getLimitTime, key, last_state_time, name, priority, process_context, set_description, set_name, set_priority, state |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.enhydra.shark.api.internal.working.WfExecutionObjectInternal |
calculateLimit, description, getLimitTime, key, last_state_time, name, priority, process_context, set_description, set_name, set_priority, state |
Field Detail |
protected java.lang.String actRequesterId
protected java.lang.String actRequestersProcessId
protected java.lang.String resRequesterId
protected java.lang.String managerName
protected java.lang.String pkgId
protected java.lang.String pDefId
protected java.lang.String mgrVer
protected java.util.Map processContext
protected boolean contextInitialized
protected Evaluator evaluator
protected java.util.List lastFinishedActivities
protected WfProcessMgrInternal manager
protected ActivityCache activityCache
protected boolean isRunning
protected long creationTime
protected long startTime
protected org.enhydra.shark.xpdl.elements.WorkflowProcess xpdlProcess
protected java.util.Set variableIdsToPersist
protected java.util.Map activityToFollowedTransitions
protected java.util.Map newActivityToFollowedTransitions
protected TxSynchronization initialTransaction
protected java.lang.Thread startingThread
protected WfActivityInternal actRequester
protected boolean terminateOrAbortFromActivity
protected java.lang.String externalRequesterClassName
protected boolean justCreated
protected boolean justCreatedVariables
protected boolean isReadOnly
Constructor Detail |
protected WfProcessImpl(WMSessionHandle shandle, WfProcessMgrInternal manager, WfRequesterInternal requester, java.lang.String key) throws java.lang.Exception
manager
- a WfProcessMgrInternalrequester
- a WfRequesterkey
- a String
java.lang.Exception
protected WfProcessImpl(ProcessPersistenceObject po)
Method Detail |
public WfRequesterInternal requester(WMSessionHandle shandle) throws java.lang.Exception
requester
in interface WfProcessInternal
java.lang.Exception
protected WfRequesterInternal requester(WMSessionHandle shandle, int mode) throws java.lang.Exception
java.lang.Exception
public void setExternalRequesterClassName(WMSessionHandle shandle, java.lang.String extReqClassName) throws java.lang.Exception
setExternalRequesterClassName
in interface WfProcessInternal
java.lang.Exception
public int how_many_step(WMSessionHandle shandle) throws java.lang.Exception
how_many_step
in interface WfProcessInternal
java.lang.Exception
public WfProcessMgrInternal manager(WMSessionHandle shandle) throws java.lang.Exception
manager
in interface WfProcessInternal
java.lang.Exception
public java.util.Map result(WMSessionHandle shandle) throws java.lang.Exception, ResultNotAvailable
result
in interface WfProcessInternal
java.lang.Exception
ResultNotAvailable
public void start(WMSessionHandle shandle) throws java.lang.Exception, CannotStart, AlreadyRunning, ToolAgentGeneralException
start
in interface WfProcessInternal
java.lang.Exception
CannotStart
AlreadyRunning
ToolAgentGeneralException
protected void change_state(WMSessionHandle shandle, java.lang.String new_state) throws java.lang.Exception, InvalidState, TransitionNotAllowed
new_state
- a String
java.lang.Exception
InvalidState
TransitionNotAllowed
public void set_process_context(WMSessionHandle shandle, java.util.Map newValue) throws java.lang.Exception, InvalidData, UpdateNotAllowed
set_process_context
in interface WfExecutionObjectInternal
set_process_context
in class WfExecutionObjectImpl
newValue
- a Map
java.lang.Exception
InvalidData
UpdateNotAllowed
public void resume(WMSessionHandle shandle) throws java.lang.Exception, CannotResume, NotSuspended
resume
in interface WfExecutionObjectInternal
resume
in class WfExecutionObjectImpl
java.lang.Exception
CannotResume
NotSuspended
public void suspend(WMSessionHandle shandle) throws java.lang.Exception, CannotSuspend, NotRunning, AlreadySuspended
suspend
in interface WfExecutionObjectInternal
suspend
in class WfExecutionObjectImpl
java.lang.Exception
CannotSuspend
NotRunning
AlreadySuspended
public void terminateFromActivity(WMSessionHandle shandle) throws java.lang.Exception, CannotStop, NotRunning
terminateFromActivity
in interface WfProcessInternal
java.lang.Exception
CannotStop
NotRunning
public void terminate(WMSessionHandle shandle) throws java.lang.Exception, CannotStop, NotRunning
terminate
in interface WfExecutionObjectInternal
terminate
in class WfExecutionObjectImpl
java.lang.Exception
CannotStop
NotRunning
public void abortFromActivity(WMSessionHandle shandle) throws java.lang.Exception, CannotStop, NotRunning
abortFromActivity
in interface WfProcessInternal
java.lang.Exception
CannotStop
NotRunning
public void abort(WMSessionHandle shandle) throws java.lang.Exception, CannotStop, NotRunning
abort
in interface WfExecutionObjectInternal
abort
in class WfExecutionObjectImpl
java.lang.Exception
CannotStop
NotRunning
protected void run(WMSessionHandle shandle, WfActivityInternal lastFinishedActivity) throws java.lang.Exception, ToolAgentGeneralException
java.lang.Exception
ToolAgentGeneralException
public void start_activity(WMSessionHandle shandle, java.lang.String actDefId, java.lang.String blockActId) throws java.lang.Exception, ToolAgentGeneralException
start_activity
in interface WfProcessInternal
actDefId
- a StringblockActId
- a String
java.lang.Exception
ToolAgentGeneralException
public WfActivityInternal activateBlockActivity(WMSessionHandle shandle, java.lang.String blockActDefId) throws java.lang.Exception
activateBlockActivity
in interface WfProcessInternal
java.lang.Exception
public java.lang.String process_definition_id(WMSessionHandle shandle) throws java.lang.Exception
process_definition_id
in interface WfProcessInternal
java.lang.Exception
public java.lang.String process_definition_name(WMSessionHandle shandle) throws java.lang.Exception
process_definition_name
in interface WfProcessInternal
java.lang.Exception
public java.lang.String manager_name(WMSessionHandle shandle) throws java.lang.Exception
manager_name
in interface WfProcessInternal
java.lang.Exception
public java.lang.String manager_version(WMSessionHandle shandle) throws java.lang.Exception
manager_version
in interface WfProcessInternal
java.lang.Exception
protected void startActivity(WMSessionHandle shandle, org.enhydra.shark.xpdl.elements.Activity activity, WfActivityInternal ba) throws java.lang.Exception, ToolAgentGeneralException
java.lang.Exception
ToolAgentGeneralException
public void activity_complete(WMSessionHandle shandle, WfActivityInternal activity) throws java.lang.Exception
activity_complete
in interface WfProcessInternal
java.lang.Exception
public void activity_terminate(WMSessionHandle shandle, WfActivityInternal activity) throws java.lang.Exception
activity_terminate
in interface WfProcessInternal
java.lang.Exception
public void activity_abort(WMSessionHandle shandle, WfActivityInternal activity) throws java.lang.Exception
activity_abort
in interface WfProcessInternal
java.lang.Exception
protected void queueNext(WMSessionHandle shandle, WfActivityInternal fromActivity) throws java.lang.Exception, ToolAgentGeneralException
java.lang.Exception
ToolAgentGeneralException
protected void joinTransition(WMSessionHandle shandle, WfActivityInternal fromActivity, org.enhydra.shark.xpdl.elements.Activity toActivityDef) throws java.lang.Exception, ToolAgentGeneralException
java.lang.Exception
ToolAgentGeneralException
protected java.util.List getTransFrom(WMSessionHandle shandle, WfActivityInternal fromActivity, org.enhydra.shark.xpdl.elements.Activity fromActDef) throws java.lang.Exception
java.lang.Exception
protected java.util.List getExceptionTransFrom(WMSessionHandle shandle, WfActivityInternal fromActivity, org.enhydra.shark.xpdl.elements.Activity fromActDef, java.lang.String exceptionName) throws java.lang.Exception
java.lang.Exception
protected void notifyRequester(WMSessionHandle shandle, WfEventAudit event) throws java.lang.Exception
java.lang.Exception
protected void initializeProcessContext(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
protected java.lang.String getNextWorkItemId(WMSessionHandle shandle, java.lang.String aDefId) throws java.lang.Exception
java.lang.Exception
public java.lang.String toString()
public boolean equals(java.lang.Object obj)
public int hashCode()
protected boolean isActivityDefinitionActive(WMSessionHandle shandle, org.enhydra.shark.xpdl.elements.Activity aDef, WfActivityInternal ba) throws java.lang.Exception
java.lang.Exception
protected void setProcessVariables(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
protected org.enhydra.shark.xpdl.elements.WorkflowProcess getProcessDefinition(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
public void persist(WMSessionHandle shandle) throws java.lang.Exception
persist
in interface PersistenceInterface
java.lang.Exception
protected void persistProcessContext(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
public void delete(WMSessionHandle shandle) throws java.lang.Exception
delete
in interface PersistenceInterface
java.lang.Exception
public void mandatoryDelete(WMSessionHandle shandle) throws java.lang.Exception
mandatoryDelete
in interface WfProcessInternal
java.lang.Exception
protected void synchronizeProcess(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
protected org.enhydra.shark.xpdl.XMLCollectionElement getXPDLObject(WMSessionHandle shandle) throws java.lang.Exception
getXPDLObject
in class WfExecutionObjectImpl
java.lang.Exception
public java.util.Map getContext(WMSessionHandle shandle) throws java.lang.Exception
getContext
in interface WfExecutionObjectInternal
java.lang.Exception
public Evaluator evaluator(WMSessionHandle shandle) throws java.lang.Exception
evaluator
in interface WfProcessInternal
java.lang.Exception
protected ProcessPersistenceObject createAndFillPersistentObject()
protected void fillPersistentObject(ProcessPersistenceObject po)
protected void restore(ProcessPersistenceObject po)
public java.lang.String package_id(WMSessionHandle shandle) throws java.lang.Exception
package_id
in interface WfProcessInternal
java.lang.Exception
public WfActivityInternal getActiveActivity(WMSessionHandle shandle, java.lang.String actId) throws java.lang.Exception
getActiveActivity
in interface WfProcessInternal
java.lang.Exception
public java.util.List getActiveActivities(WMSessionHandle shandle) throws java.lang.Exception
getActiveActivities
in interface WfProcessInternal
java.lang.Exception
public java.util.List getAllActivities(WMSessionHandle shandle) throws java.lang.Exception
getAllActivities
in interface WfProcessInternal
java.lang.Exception
public WfActivityInternal getActivity(WMSessionHandle shandle, java.lang.String actId) throws java.lang.Exception
getActivity
in interface WfProcessInternal
java.lang.Exception
public long getCreationTime(WMSessionHandle shandle) throws java.lang.Exception
getCreationTime
in interface WfExecutionObjectInternal
getCreationTime
in class WfExecutionObjectImpl
java.lang.Exception
public long getStartTime(WMSessionHandle shandle) throws java.lang.Exception
getStartTime
in interface WfExecutionObjectInternal
getStartTime
in class WfExecutionObjectImpl
java.lang.Exception
public java.lang.String getResourceRequesterId(WMSessionHandle shandle) throws java.lang.Exception
getResourceRequesterId
in interface WfProcessInternal
java.lang.Exception
public java.lang.String getActivityRequesterId(WMSessionHandle shandle) throws java.lang.Exception
getActivityRequesterId
in interface WfProcessInternal
java.lang.Exception
public java.lang.String getActivityRequesterProcessId(WMSessionHandle shandle) throws java.lang.Exception
getActivityRequesterProcessId
in interface WfProcessInternal
java.lang.Exception
protected void setXPDLAttribs()
protected int restoreActivityToFollowedTransitionsMap(WMSessionHandle shandle, org.enhydra.shark.AndJoinHelperStruct ajhs) throws java.lang.Exception
java.lang.Exception
protected void persistActivityToFollowedTransitions(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
protected void runBlock(WMSessionHandle shandle, org.enhydra.shark.xpdl.elements.Activity bActivity, WfActivityInternal blockActivity) throws java.lang.Exception, ToolAgentGeneralException
java.lang.Exception
ToolAgentGeneralException
public WfActivityInternal[] checkDeadlines(WMSessionHandle shandle) throws java.lang.Exception
checkDeadlines
in interface WfProcessInternal
java.lang.Exception
public boolean checkDeadline(WMSessionHandle shandle, java.lang.String actId) throws java.lang.Exception
checkDeadline
in interface WfProcessInternal
java.lang.Exception
protected void handleBrokenAsyncDeadlines(WMSessionHandle shandle, java.util.Map actToExcNames) throws java.lang.Exception
java.lang.Exception
public java.util.List getAllActiveActivitiesForBlockActivity(WMSessionHandle shandle, java.lang.String blockActivityId) throws java.lang.Exception
getAllActiveActivitiesForBlockActivity
in interface WfProcessInternal
java.lang.Exception
public boolean isReadOnly()
isReadOnly
in interface WfProcessInternal
public void setReadOnly(boolean ro)
setReadOnly
in interface WfProcessInternal
public WfProcessInternal duplicate() throws java.lang.Exception
duplicate
in interface WfProcessInternal
java.lang.Exception
protected void checkReadOnly() throws java.lang.Exception
checkReadOnly
in class WfExecutionObjectImpl
java.lang.Exception
protected java.lang.String getUnsatisfiedSplitConditionHandlingMode(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |