|
||||||||||
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.WfActivityImpl
WfActivityImpl - Workflow Activity Object implementation
Field Summary | |
protected boolean |
accepted
|
protected long |
acceptedTime
|
protected long |
activatedTime
|
protected java.util.Map |
activitiesProcessContext
|
protected org.enhydra.shark.xpdl.elements.Activity |
activityDefinition
|
protected java.lang.String |
activityDefinitionId
|
protected java.lang.String |
activitySetDefinitionId
|
protected java.util.List |
assignmentResourceIds
|
protected WfActivityInternal |
blockActivity
|
protected java.lang.String |
blockActivityId
|
protected boolean |
contextInitialized
|
protected java.util.List |
deadlinesInfo
|
protected Evaluator |
evaluator
|
protected java.lang.Exception |
exc
|
protected java.lang.String |
exceptionName
|
protected boolean |
isSubflowSynchronous
|
protected boolean |
justCreated
|
protected boolean |
justCreatedDeadlines
|
protected boolean |
justCreatedVariables
|
protected java.lang.String |
mgrName
|
protected java.lang.String |
performerId
|
protected WfProcessInternal |
process
|
protected org.enhydra.shark.xpdl.elements.WorkflowProcess |
processDefinition
|
protected java.lang.String |
processId
|
protected java.lang.String |
resourceUsername
|
protected java.util.Set |
resultVariableIds
|
protected java.lang.Thread |
startSubflowThread
|
protected java.util.Set |
variableIdsToPersist
|
Fields inherited from class org.enhydra.shark.WfExecutionObjectImpl |
description, key, lastStateEventAudit, lastStateTime, limitTime, name, priority, state |
Constructor Summary | |
protected |
WfActivityImpl(ActivityPersistenceObject po,
WfProcessInternal proc)
Used to create object when restoring it from database. |
protected |
WfActivityImpl(WMSessionHandle shandle,
WfProcessInternal process,
java.lang.String key,
java.lang.String activityDefId,
WfActivityInternal blockActivity)
Create a new WfActivityImpl |
Method Summary | |
void |
abort(WMSessionHandle shandle)
Abort the execution of this process or activity. |
protected void |
abortActivity(WMSessionHandle shandle,
boolean fromProcess)
|
void |
abortFromProcess(WMSessionHandle shandle)
|
boolean |
accepted_status(WMSessionHandle shandle)
|
void |
activate(WMSessionHandle shandle)
Activates this activity. |
java.lang.String |
activity_definition_id(WMSessionHandle shandle)
|
java.lang.String |
activity_definition_name(WMSessionHandle shandle)
|
java.lang.String |
activity_set_definition_id(WMSessionHandle shandle)
|
java.lang.String |
block_activity_id(WMSessionHandle shandle)
|
WfActivityInternal |
block_activity(WMSessionHandle shandle)
|
protected boolean |
canCreateAssignments(WMSessionHandle shandle)
|
protected void |
change_state(WMSessionHandle shandle,
java.lang.String new_state)
|
boolean |
checkDeadlines(WMSessionHandle shandle,
long timeLimitBoundary,
java.util.Map actsToAsyncExcNames)
|
protected PerformerData |
checkParticipant(WMSessionHandle shandle,
org.enhydra.shark.xpdl.elements.Participant p,
int activityType)
|
protected void |
checkReadOnly()
|
void |
complete(WMSessionHandle shandle)
|
WfProcessInternal |
container(WMSessionHandle shandle)
Getter for the process of this activity. |
protected ActivityPersistenceObject |
createAndFillPersistentObject()
|
protected boolean |
createAssignments(WMSessionHandle shandle)
|
protected boolean |
createDefaultAssignment(WMSessionHandle shandle)
|
void |
delete(WMSessionHandle shandle)
|
protected boolean |
deleteOtherAssignments(WMSessionHandle shandle)
|
WfActivityInternal |
duplicate(WfProcessInternal proc)
|
boolean |
equals(java.lang.Object obj)
It is assumed that there can't be two or more activities having the same key. |
protected java.lang.String |
evaluateParticipantExpression(WMSessionHandle shandle,
java.lang.String expr)
|
protected Evaluator |
evaluator(WMSessionHandle shandle)
|
protected void |
fillPersistentObject(ActivityPersistenceObject po)
|
protected org.enhydra.shark.xpdl.elements.Participant |
findParticipant(WMSessionHandle shandle,
java.lang.String performerExpr)
|
void |
finish(WMSessionHandle shandle)
Complete this activity. |
protected void |
finishImproperlyAndNotifyProcess(WMSessionHandle shandle,
java.lang.String excName)
Complete this activity. |
protected org.enhydra.shark.xpdl.elements.Activity |
getActivityDefinition(WMSessionHandle shandle)
|
protected AssignmentManager |
getAssignmentManager(WMSessionHandle shandle)
|
java.util.List |
getAssignmentResourceIds(WMSessionHandle shandle)
|
java.util.Map |
getContext(WMSessionHandle shandle)
|
long |
getCreationTime(WMSessionHandle shandle)
|
java.util.List |
getDeadlineInfo(WMSessionHandle shandle)
|
int |
getDefinitionType(WMSessionHandle shandle)
|
java.lang.Exception |
getException(WMSessionHandle shandle)
|
java.lang.String |
getExceptionName(WMSessionHandle shandle)
|
WfRequester |
getExternalRequester(WMSessionHandle shandle)
|
protected WfProcessInternal |
getPerformer(WMSessionHandle shandle)
|
java.lang.String |
getPerformerId(WMSessionHandle shandle)
|
protected org.enhydra.shark.xpdl.elements.WorkflowProcess |
getProcessDefinition(WMSessionHandle shandle)
|
java.lang.String |
getResourceRequesterUsername(WMSessionHandle shandle)
|
java.lang.String |
getResourceUsername(WMSessionHandle shandle)
|
protected java.util.Set |
getResultVariableIds(WMSessionHandle shandle)
|
long |
getStartTime(WMSessionHandle shandle)
|
protected org.enhydra.shark.xpdl.XMLCollectionElement |
getXPDLObject(WMSessionHandle shandle)
|
int |
hashCode()
|
protected void |
initializeActivityContext(WMSessionHandle shandle)
Initializes the context of the given activity. |
boolean |
isPerformerSynchronous(WMSessionHandle shandle)
|
java.lang.String |
manager_name(WMSessionHandle shandle)
|
protected boolean |
performDeadlineReevaluation()
|
void |
persist(WMSessionHandle shandle)
|
protected void |
persistActivityContext(WMSessionHandle shandle)
Method persistActivityContext stores content of the workflow relevant data of this activity, either all of them, or modified only. |
protected void |
persistDeadlines(WMSessionHandle shandle)
|
protected void |
persistExecutedDeadline(WMSessionHandle shandle,
java.lang.String uniqueId)
|
java.lang.String |
process_id(WMSessionHandle shandle)
|
void |
receive_event(WMSessionHandle shandle,
WfEventAudit event,
WfProcessInternal performer)
Receives notice of event status changes. |
int |
reevaluateAssignments(WMSessionHandle shandle)
|
protected java.util.List |
reevaluateDeadlines(WMSessionHandle shandle)
|
protected void |
removeAssignments(WMSessionHandle shandle,
boolean removeActiveOne,
boolean deleteOtherAssignments)
|
protected void |
restore(ActivityPersistenceObject po)
|
java.util.Map |
result(WMSessionHandle shandle)
Retrieve the Result map of this activity. |
protected java.util.Map |
resultMap(WMSessionHandle shandle)
|
void |
resume(WMSessionHandle shandle)
Resume this process or activity. |
protected void |
runBlock(WMSessionHandle shandle)
|
protected void |
runNo(WMSessionHandle shandle)
|
protected void |
runSubFlow(WMSessionHandle shandle)
|
protected void |
runTool(WMSessionHandle shandle)
|
void |
set_accepted_status(WMSessionHandle shandle,
boolean accept,
java.lang.String resourceUname)
|
void |
set_process_context(WMSessionHandle shandle,
java.util.Map new_value)
|
void |
set_result(WMSessionHandle shandle,
java.util.Map results)
Assign Result for this activity. |
protected void |
setActivityVariables(WMSessionHandle shandle)
|
protected void |
setAssignmentStatus(WMSessionHandle shandle,
java.lang.String resUsername,
boolean isValid,
boolean isAccepted)
|
void |
setException(WMSessionHandle shandle,
java.lang.Exception tage)
|
void |
setExceptionName(WMSessionHandle shandle,
java.lang.String excName)
|
protected void |
setProcessContext(WMSessionHandle shandle,
java.util.Map newValue,
java.lang.String eventType)
|
protected void |
startActivity(WMSessionHandle shandle)
|
void |
suspend(WMSessionHandle shandle)
Suspend this process or activity. |
void |
terminate(WMSessionHandle shandle)
Terminate this process or activity. |
protected void |
terminateActivity(WMSessionHandle shandle,
boolean fromProcess)
|
void |
terminateFromProcess(WMSessionHandle shandle)
Terminate this process or activity. |
java.lang.String |
toString()
|
void |
updateAssignmentResourceIds(WMSessionHandle shandle,
java.lang.String oldResUname,
java.lang.String newResUname)
|
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 mgrName
protected java.lang.String processId
protected org.enhydra.shark.xpdl.elements.Activity activityDefinition
protected org.enhydra.shark.xpdl.elements.WorkflowProcess processDefinition
protected java.lang.String activitySetDefinitionId
protected java.lang.String activityDefinitionId
protected java.lang.String blockActivityId
protected boolean accepted
protected java.lang.String resourceUsername
protected java.util.Map activitiesProcessContext
protected boolean contextInitialized
protected java.lang.String performerId
protected boolean isSubflowSynchronous
protected java.util.Set resultVariableIds
protected Evaluator evaluator
protected WfProcessInternal process
protected long acceptedTime
protected long activatedTime
protected java.util.List assignmentResourceIds
protected java.util.Set variableIdsToPersist
protected java.lang.Thread startSubflowThread
protected WfActivityInternal blockActivity
protected java.lang.Exception exc
protected java.lang.String exceptionName
protected java.util.List deadlinesInfo
protected boolean justCreated
protected boolean justCreatedVariables
protected boolean justCreatedDeadlines
Constructor Detail |
protected WfActivityImpl(WMSessionHandle shandle, WfProcessInternal process, java.lang.String key, java.lang.String activityDefId, WfActivityInternal blockActivity) throws java.lang.Exception
protected WfActivityImpl(ActivityPersistenceObject po, WfProcessInternal proc)
Method Detail |
public void activate(WMSessionHandle shandle) throws java.lang.Exception, CannotStart, AlreadyRunning
activate
in interface WfActivityInternal
java.lang.Exception
CannotStart
AlreadyRunning
public java.util.List getAssignmentResourceIds(WMSessionHandle shandle) throws java.lang.Exception
getAssignmentResourceIds
in interface WfActivityInternal
java.lang.Exception
public WfProcessInternal container(WMSessionHandle shandle) throws java.lang.Exception
container
in interface WfActivityInternal
java.lang.Exception
public java.util.Map result(WMSessionHandle shandle) throws java.lang.Exception, ResultNotAvailable
result
in interface WfActivityInternal
java.lang.Exception
ResultNotAvailable
protected java.util.Map resultMap(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
public void set_result(WMSessionHandle shandle, java.util.Map results) throws java.lang.Exception, InvalidData
set_result
in interface WfActivityInternal
java.lang.Exception
InvalidData
public void complete(WMSessionHandle shandle) throws java.lang.Exception, CannotComplete
complete
in interface WfActivityInternal
java.lang.Exception
CannotComplete
public void finish(WMSessionHandle shandle) throws java.lang.Exception, CannotComplete
finish
in interface WfActivityInternal
java.lang.Exception
CannotComplete
protected void change_state(WMSessionHandle shandle, java.lang.String new_state) throws java.lang.Exception, InvalidState, TransitionNotAllowed
java.lang.Exception
InvalidState
TransitionNotAllowed
public void set_process_context(WMSessionHandle shandle, java.util.Map new_value) throws java.lang.Exception, InvalidData, UpdateNotAllowed
set_process_context
in interface WfExecutionObjectInternal
set_process_context
in class WfExecutionObjectImpl
java.lang.Exception
InvalidData
UpdateNotAllowed
protected void setProcessContext(WMSessionHandle shandle, java.util.Map newValue, java.lang.String eventType) throws java.lang.Exception, InvalidData, UpdateNotAllowed, java.lang.Exception
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 terminateFromProcess(WMSessionHandle shandle) throws java.lang.Exception, CannotStop, NotRunning
terminateFromProcess
in interface WfActivityInternal
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
protected void terminateActivity(WMSessionHandle shandle, boolean fromProcess) throws java.lang.Exception, CannotStop, NotRunning
java.lang.Exception
CannotStop
NotRunning
public void abortFromProcess(WMSessionHandle shandle) throws java.lang.Exception, CannotStop, NotRunning
abortFromProcess
in interface WfActivityInternal
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 abortActivity(WMSessionHandle shandle, boolean fromProcess) throws java.lang.Exception, CannotStop, NotRunning
java.lang.Exception
CannotStop
NotRunning
public void receive_event(WMSessionHandle shandle, WfEventAudit event, WfProcessInternal performer) throws java.lang.Exception, InvalidPerformer
receive_event
in interface WfRequesterInternal
java.lang.Exception
InvalidPerformer
public java.lang.String activity_set_definition_id(WMSessionHandle shandle) throws java.lang.Exception
activity_set_definition_id
in interface WfActivityInternal
java.lang.Exception
public java.lang.String activity_definition_id(WMSessionHandle shandle) throws java.lang.Exception
activity_definition_id
in interface WfActivityInternal
java.lang.Exception
public java.lang.String activity_definition_name(WMSessionHandle shandle) throws java.lang.Exception
activity_definition_name
in interface WfActivityInternal
java.lang.Exception
public java.lang.String block_activity_id(WMSessionHandle shandle) throws java.lang.Exception
block_activity_id
in interface WfActivityInternal
java.lang.Exception
public WfActivityInternal block_activity(WMSessionHandle shandle) throws java.lang.Exception
block_activity
in interface WfActivityInternal
java.lang.Exception
public java.lang.String manager_name(WMSessionHandle shandle) throws java.lang.Exception
manager_name
in interface WfActivityInternal
java.lang.Exception
public java.lang.String process_id(WMSessionHandle shandle) throws java.lang.Exception
process_id
in interface WfActivityInternal
java.lang.Exception
public int getDefinitionType(WMSessionHandle shandle) throws java.lang.Exception
getDefinitionType
in interface WfActivityInternal
java.lang.Exception
protected void initializeActivityContext(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
public int reevaluateAssignments(WMSessionHandle shandle) throws java.lang.Exception
reevaluateAssignments
in interface WfActivityInternal
java.lang.Exception
protected boolean createAssignments(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
protected PerformerData checkParticipant(WMSessionHandle shandle, org.enhydra.shark.xpdl.elements.Participant p, int activityType) throws java.lang.Exception
java.lang.Exception
protected org.enhydra.shark.xpdl.elements.Participant findParticipant(WMSessionHandle shandle, java.lang.String performerExpr) throws java.lang.Exception
java.lang.Exception
protected void startActivity(WMSessionHandle shandle) throws java.lang.Exception, CannotStart, ToolAgentGeneralException
java.lang.Exception
CannotStart
ToolAgentGeneralException
protected void runNo(WMSessionHandle shandle) throws java.lang.Exception, CannotStart
java.lang.Exception
CannotStart
protected void runTool(WMSessionHandle shandle) throws java.lang.Exception, CannotStart, ToolAgentGeneralException
java.lang.Exception
CannotStart
ToolAgentGeneralException
protected void runSubFlow(WMSessionHandle shandle) throws java.lang.Exception, ToolAgentGeneralException
java.lang.Exception
ToolAgentGeneralException
protected void runBlock(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
protected void finishImproperlyAndNotifyProcess(WMSessionHandle shandle, java.lang.String excName) throws java.lang.Exception
java.lang.Exception
public void set_accepted_status(WMSessionHandle shandle, boolean accept, java.lang.String resourceUname) throws java.lang.Exception, CannotAcceptSuspended
set_accepted_status
in interface WfActivityInternal
java.lang.Exception
CannotAcceptSuspended
public java.lang.String getResourceUsername(WMSessionHandle shandle) throws java.lang.Exception
getResourceUsername
in interface WfActivityInternal
java.lang.Exception
protected org.enhydra.shark.xpdl.elements.Activity getActivityDefinition(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 java.lang.String toString()
protected void setActivityVariables(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
public boolean equals(java.lang.Object obj)
public int hashCode()
protected java.lang.String evaluateParticipantExpression(WMSessionHandle shandle, java.lang.String expr) throws java.lang.Exception
java.lang.Exception
protected Evaluator evaluator(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
protected WfProcessInternal getPerformer(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
public java.lang.String getResourceRequesterUsername(WMSessionHandle shandle) throws java.lang.Exception
getResourceRequesterUsername
in interface WfRequesterInternal
java.lang.Exception
public WfRequester getExternalRequester(WMSessionHandle shandle) throws java.lang.Exception
getExternalRequester
in interface WfRequesterInternal
java.lang.Exception
public boolean accepted_status(WMSessionHandle shandle) throws java.lang.Exception
accepted_status
in interface WfActivityInternal
java.lang.Exception
public void persist(WMSessionHandle shandle) throws java.lang.Exception
persist
in interface PersistenceInterface
java.lang.Exception
protected void persistActivityContext(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
protected void persistDeadlines(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
protected void persistExecutedDeadline(WMSessionHandle shandle, java.lang.String uniqueId) throws java.lang.Exception
java.lang.Exception
public void delete(WMSessionHandle shandle) throws java.lang.Exception
delete
in interface PersistenceInterface
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
protected java.util.Set getResultVariableIds(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
protected ActivityPersistenceObject createAndFillPersistentObject()
protected void fillPersistentObject(ActivityPersistenceObject po)
protected void restore(ActivityPersistenceObject po)
public java.lang.String getPerformerId(WMSessionHandle shandle)
getPerformerId
in interface WfActivityInternal
public boolean isPerformerSynchronous(WMSessionHandle shandle)
isPerformerSynchronous
in interface WfActivityInternal
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 void updateAssignmentResourceIds(WMSessionHandle shandle, java.lang.String oldResUname, java.lang.String newResUname) throws java.lang.Exception
updateAssignmentResourceIds
in interface WfActivityInternal
java.lang.Exception
protected void removeAssignments(WMSessionHandle shandle, boolean removeActiveOne, boolean deleteOtherAssignments) throws java.lang.Exception
java.lang.Exception
protected void setAssignmentStatus(WMSessionHandle shandle, java.lang.String resUsername, boolean isValid, boolean isAccepted) throws java.lang.Exception
java.lang.Exception
public java.util.List getDeadlineInfo(WMSessionHandle shandle) throws java.lang.Exception
getDeadlineInfo
in interface WfActivityInternal
java.lang.Exception
public boolean checkDeadlines(WMSessionHandle shandle, long timeLimitBoundary, java.util.Map actsToAsyncExcNames) throws java.lang.Exception
checkDeadlines
in interface WfActivityInternal
java.lang.Exception
protected java.util.List reevaluateDeadlines(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
public java.lang.Exception getException(WMSessionHandle shandle)
getException
in interface WfActivityInternal
public void setException(WMSessionHandle shandle, java.lang.Exception tage)
setException
in interface WfActivityInternal
public java.lang.String getExceptionName(WMSessionHandle shandle)
getExceptionName
in interface WfActivityInternal
public void setExceptionName(WMSessionHandle shandle, java.lang.String excName)
setExceptionName
in interface WfActivityInternal
protected boolean performDeadlineReevaluation()
public WfActivityInternal duplicate(WfProcessInternal proc) throws java.lang.Exception
duplicate
in interface WfActivityInternal
java.lang.Exception
protected void checkReadOnly() throws java.lang.Exception
checkReadOnly
in class WfExecutionObjectImpl
java.lang.Exception
protected boolean canCreateAssignments(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
protected boolean createDefaultAssignment(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
protected boolean deleteOtherAssignments(WMSessionHandle shandle) throws java.lang.Exception
java.lang.Exception
protected AssignmentManager getAssignmentManager(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 |