org.enhydra.shark
Class WfActivityImpl

java.lang.Object
  extended by org.enhydra.shark.WfExecutionObjectImpl
      extended by org.enhydra.shark.WfActivityImpl
All Implemented Interfaces:
PersistenceInterface, WfActivityInternal, WfExecutionObjectInternal, WfRequesterInternal

public class WfActivityImpl
extends WfExecutionObjectImpl
implements WfActivityInternal

WfActivityImpl - Workflow Activity Object implementation

Author:
Sasa Bojanic, Vladimir Puskas

Field Summary
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 oid
           
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
           
protected  int version
           
 
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)
           
 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  void createAssignments(WMSessionHandle shandle)
           
protected  void createAssignments(WMSessionHandle shandle, java.util.List users)
           
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  int[] execution_status(WMSessionHandle shandle)
           
protected  void fillPersistentObject(ActivityPersistenceObject po)
           
protected  org.enhydra.shark.xpdl.elements.Participant findParticipant(WMSessionHandle shandle, java.lang.String performerExpr)
           
protected  PerformerData findPerformerData(WMSessionHandle shandle)
           
protected  java.util.List findUsers(WMSessionHandle shandle, PerformerData xpdlParticipant)
           
 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)
           
 java.lang.String getOid()
           
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)
           
 int getVersion()
           
protected  org.enhydra.shark.xpdl.XMLCollectionElement getXPDLObject(WMSessionHandle shandle)
           
protected  boolean handleAllAssignments(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)
           
 void migrateActivity(WMSessionHandle shandle, WfProcessMgrInternal processMgr, java.util.Map newVariables)
           
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 removeAssignment(WMSessionHandle shandle, java.lang.String resUsername, boolean delete, boolean assStat)
           
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)
           
 void setExternalRequester(WMSessionHandle shandle, WfRequester extReq)
           
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, setLimitTime, 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, setLimitTime, state
 

Field Detail

oid

protected java.lang.String oid

version

protected int version

mgrName

protected java.lang.String mgrName

processId

protected java.lang.String processId

activityDefinition

protected org.enhydra.shark.xpdl.elements.Activity activityDefinition

processDefinition

protected org.enhydra.shark.xpdl.elements.WorkflowProcess processDefinition

activitySetDefinitionId

protected java.lang.String activitySetDefinitionId

activityDefinitionId

protected java.lang.String activityDefinitionId

blockActivityId

protected java.lang.String blockActivityId

resourceUsername

protected java.lang.String resourceUsername

activitiesProcessContext

protected java.util.Map activitiesProcessContext

contextInitialized

protected boolean contextInitialized

performerId

protected java.lang.String performerId

isSubflowSynchronous

protected boolean isSubflowSynchronous

resultVariableIds

protected java.util.Set resultVariableIds

evaluator

protected Evaluator evaluator

process

protected WfProcessInternal process

acceptedTime

protected long acceptedTime

activatedTime

protected long activatedTime

assignmentResourceIds

protected java.util.List assignmentResourceIds

variableIdsToPersist

protected java.util.Set variableIdsToPersist

startSubflowThread

protected java.lang.Thread startSubflowThread

blockActivity

protected WfActivityInternal blockActivity

exc

protected java.lang.Exception exc

exceptionName

protected java.lang.String exceptionName

deadlinesInfo

protected java.util.List deadlinesInfo

justCreated

protected boolean justCreated

justCreatedVariables

protected boolean justCreatedVariables

justCreatedDeadlines

protected boolean justCreatedDeadlines
Constructor Detail

WfActivityImpl

protected WfActivityImpl(WMSessionHandle shandle,
                         WfProcessInternal process,
                         java.lang.String key,
                         java.lang.String activityDefId,
                         WfActivityInternal blockActivity)
                  throws java.lang.Exception
Create a new WfActivityImpl

Throws:
java.lang.Exception

WfActivityImpl

protected WfActivityImpl(ActivityPersistenceObject po,
                         WfProcessInternal proc)
Used to create object when restoring it from database.

Method Detail

activate

public void activate(WMSessionHandle shandle)
              throws java.lang.Exception,
                     CannotStart,
                     AlreadyRunning
Activates this activity.

Specified by:
activate in interface WfActivityInternal
Throws:
java.lang.Exception
CannotStart
AlreadyRunning

getAssignmentResourceIds

public java.util.List getAssignmentResourceIds(WMSessionHandle shandle)
                                        throws java.lang.Exception
Specified by:
getAssignmentResourceIds in interface WfActivityInternal
Throws:
java.lang.Exception

container

public WfProcessInternal container(WMSessionHandle shandle)
                            throws java.lang.Exception
Getter for the process of this activity.

Specified by:
container in interface WfActivityInternal
Throws:
java.lang.Exception

result

public java.util.Map result(WMSessionHandle shandle)
                     throws java.lang.Exception,
                            ResultNotAvailable
Retrieve the Result map of this activity.

Specified by:
result in interface WfActivityInternal
Returns:
Map of results from this activity
Throws:
java.lang.Exception
ResultNotAvailable

resultMap

protected java.util.Map resultMap(WMSessionHandle shandle)
                           throws java.lang.Exception
Throws:
java.lang.Exception

set_result

public void set_result(WMSessionHandle shandle,
                       java.util.Map results)
                throws java.lang.Exception,
                       InvalidData
Assign Result for this activity.

Specified by:
set_result in interface WfActivityInternal
Throws:
java.lang.Exception
InvalidData

complete

public void complete(WMSessionHandle shandle)
              throws java.lang.Exception,
                     CannotComplete
Specified by:
complete in interface WfActivityInternal
Throws:
java.lang.Exception
CannotComplete

finish

public void finish(WMSessionHandle shandle)
            throws java.lang.Exception,
                   CannotComplete
Complete this activity.

Specified by:
finish in interface WfActivityInternal
Throws:
java.lang.Exception
CannotComplete

change_state

protected void change_state(WMSessionHandle shandle,
                            java.lang.String new_state)
                     throws java.lang.Exception,
                            InvalidState,
                            TransitionNotAllowed
Throws:
java.lang.Exception
InvalidState
TransitionNotAllowed

set_process_context

public void set_process_context(WMSessionHandle shandle,
                                java.util.Map new_value)
                         throws java.lang.Exception,
                                InvalidData,
                                UpdateNotAllowed
Specified by:
set_process_context in interface WfExecutionObjectInternal
Specified by:
set_process_context in class WfExecutionObjectImpl
Throws:
java.lang.Exception
InvalidData
UpdateNotAllowed

setProcessContext

protected void setProcessContext(WMSessionHandle shandle,
                                 java.util.Map newValue,
                                 java.lang.String eventType)
                          throws java.lang.Exception,
                                 InvalidData,
                                 UpdateNotAllowed,
                                 java.lang.Exception
Throws:
java.lang.Exception
InvalidData
UpdateNotAllowed

resume

public void resume(WMSessionHandle shandle)
            throws java.lang.Exception,
                   CannotResume,
                   NotSuspended
Resume this process or activity.

Specified by:
resume in interface WfExecutionObjectInternal
Specified by:
resume in class WfExecutionObjectImpl
Throws:
java.lang.Exception
CannotResume
NotSuspended

suspend

public void suspend(WMSessionHandle shandle)
             throws java.lang.Exception,
                    CannotSuspend,
                    NotRunning,
                    AlreadySuspended
Suspend this process or activity.

Specified by:
suspend in interface WfExecutionObjectInternal
Specified by:
suspend in class WfExecutionObjectImpl
Throws:
java.lang.Exception
CannotSuspend
NotRunning
AlreadySuspended

terminateFromProcess

public void terminateFromProcess(WMSessionHandle shandle)
                          throws java.lang.Exception,
                                 CannotStop,
                                 NotRunning
Terminate this process or activity.

Specified by:
terminateFromProcess in interface WfActivityInternal
Throws:
java.lang.Exception
CannotStop
NotRunning

terminate

public void terminate(WMSessionHandle shandle)
               throws java.lang.Exception,
                      CannotStop,
                      NotRunning
Terminate this process or activity.

Specified by:
terminate in interface WfExecutionObjectInternal
Specified by:
terminate in class WfExecutionObjectImpl
Throws:
java.lang.Exception
CannotStop
NotRunning

terminateActivity

protected void terminateActivity(WMSessionHandle shandle,
                                 boolean fromProcess)
                          throws java.lang.Exception,
                                 CannotStop,
                                 NotRunning
Throws:
java.lang.Exception
CannotStop
NotRunning

abortFromProcess

public void abortFromProcess(WMSessionHandle shandle)
                      throws java.lang.Exception,
                             CannotStop,
                             NotRunning
Specified by:
abortFromProcess in interface WfActivityInternal
Throws:
java.lang.Exception
CannotStop
NotRunning

abort

public void abort(WMSessionHandle shandle)
           throws java.lang.Exception,
                  CannotStop,
                  NotRunning
Abort the execution of this process or activity.

Specified by:
abort in interface WfExecutionObjectInternal
Specified by:
abort in class WfExecutionObjectImpl
Throws:
java.lang.Exception
CannotStop
NotRunning

abortActivity

protected void abortActivity(WMSessionHandle shandle,
                             boolean fromProcess)
                      throws java.lang.Exception,
                             CannotStop,
                             NotRunning
Throws:
java.lang.Exception
CannotStop
NotRunning

receive_event

public void receive_event(WMSessionHandle shandle,
                          WfEventAudit event,
                          WfProcessInternal performer)
                   throws java.lang.Exception,
                          InvalidPerformer
Receives notice of event status changes. This is called when some subflow process has finished its execution.

Specified by:
receive_event in interface WfRequesterInternal
Throws:
java.lang.Exception
InvalidPerformer

activity_set_definition_id

public java.lang.String activity_set_definition_id(WMSessionHandle shandle)
                                            throws java.lang.Exception
Specified by:
activity_set_definition_id in interface WfActivityInternal
Throws:
java.lang.Exception

activity_definition_id

public java.lang.String activity_definition_id(WMSessionHandle shandle)
                                        throws java.lang.Exception
Specified by:
activity_definition_id in interface WfActivityInternal
Throws:
java.lang.Exception

activity_definition_name

public java.lang.String activity_definition_name(WMSessionHandle shandle)
                                          throws java.lang.Exception
Specified by:
activity_definition_name in interface WfActivityInternal
Throws:
java.lang.Exception

block_activity_id

public java.lang.String block_activity_id(WMSessionHandle shandle)
                                   throws java.lang.Exception
Specified by:
block_activity_id in interface WfActivityInternal
Throws:
java.lang.Exception

block_activity

public WfActivityInternal block_activity(WMSessionHandle shandle)
                                  throws java.lang.Exception
Specified by:
block_activity in interface WfActivityInternal
Throws:
java.lang.Exception

manager_name

public java.lang.String manager_name(WMSessionHandle shandle)
                              throws java.lang.Exception
Specified by:
manager_name in interface WfActivityInternal
Throws:
java.lang.Exception

process_id

public java.lang.String process_id(WMSessionHandle shandle)
                            throws java.lang.Exception
Specified by:
process_id in interface WfActivityInternal
Throws:
java.lang.Exception

getDefinitionType

public int getDefinitionType(WMSessionHandle shandle)
                      throws java.lang.Exception
Specified by:
getDefinitionType in interface WfActivityInternal
Throws:
java.lang.Exception

initializeActivityContext

protected void initializeActivityContext(WMSessionHandle shandle)
                                  throws java.lang.Exception
Initializes the context of the given activity. Currently, it returns the whole process context for the activities which type is not Route or Block.

Throws:
java.lang.Exception

reevaluateAssignments

public int reevaluateAssignments(WMSessionHandle shandle)
                          throws java.lang.Exception
Specified by:
reevaluateAssignments in interface WfActivityInternal
Throws:
java.lang.Exception

findPerformerData

protected PerformerData findPerformerData(WMSessionHandle shandle)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

findUsers

protected java.util.List findUsers(WMSessionHandle shandle,
                                   PerformerData xpdlParticipant)
                            throws java.lang.Exception
Throws:
java.lang.Exception

createAssignments

protected void createAssignments(WMSessionHandle shandle,
                                 java.util.List users)
                          throws java.lang.Exception
Throws:
java.lang.Exception

createAssignments

protected void createAssignments(WMSessionHandle shandle)
                          throws java.lang.Exception
Throws:
java.lang.Exception

checkParticipant

protected PerformerData checkParticipant(WMSessionHandle shandle,
                                         org.enhydra.shark.xpdl.elements.Participant p,
                                         int activityType)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

findParticipant

protected org.enhydra.shark.xpdl.elements.Participant findParticipant(WMSessionHandle shandle,
                                                                      java.lang.String performerExpr)
                                                               throws java.lang.Exception
Throws:
java.lang.Exception

startActivity

protected void startActivity(WMSessionHandle shandle)
                      throws java.lang.Exception,
                             CannotStart,
                             ToolAgentGeneralException
Throws:
java.lang.Exception
CannotStart
ToolAgentGeneralException

runNo

protected void runNo(WMSessionHandle shandle)
              throws java.lang.Exception,
                     CannotStart
Throws:
java.lang.Exception
CannotStart

runTool

protected void runTool(WMSessionHandle shandle)
                throws java.lang.Exception,
                       CannotStart,
                       ToolAgentGeneralException
Throws:
java.lang.Exception
CannotStart
ToolAgentGeneralException

runSubFlow

protected void runSubFlow(WMSessionHandle shandle)
                   throws java.lang.Exception,
                          ToolAgentGeneralException
Throws:
java.lang.Exception
ToolAgentGeneralException

runBlock

protected void runBlock(WMSessionHandle shandle)
                 throws java.lang.Exception
Throws:
java.lang.Exception

finishImproperlyAndNotifyProcess

protected void finishImproperlyAndNotifyProcess(WMSessionHandle shandle,
                                                java.lang.String excName)
                                         throws java.lang.Exception
Complete this activity.

Throws:
java.lang.Exception

set_accepted_status

public void set_accepted_status(WMSessionHandle shandle,
                                boolean accept,
                                java.lang.String resourceUname)
                         throws java.lang.Exception,
                                CannotAcceptSuspended
Specified by:
set_accepted_status in interface WfActivityInternal
Throws:
java.lang.Exception
CannotAcceptSuspended

getResourceUsername

public java.lang.String getResourceUsername(WMSessionHandle shandle)
                                     throws java.lang.Exception
Specified by:
getResourceUsername in interface WfActivityInternal
Throws:
java.lang.Exception

getActivityDefinition

protected org.enhydra.shark.xpdl.elements.Activity getActivityDefinition(WMSessionHandle shandle)
                                                                  throws java.lang.Exception
Throws:
java.lang.Exception

getProcessDefinition

protected org.enhydra.shark.xpdl.elements.WorkflowProcess getProcessDefinition(WMSessionHandle shandle)
                                                                        throws java.lang.Exception
Throws:
java.lang.Exception

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setActivityVariables

protected void setActivityVariables(WMSessionHandle shandle)
                             throws java.lang.Exception
Throws:
java.lang.Exception

equals

public boolean equals(java.lang.Object obj)
It is assumed that there can't be two or more activities having the same key.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

evaluateParticipantExpression

protected java.lang.String evaluateParticipantExpression(WMSessionHandle shandle,
                                                         java.lang.String expr)
                                                  throws java.lang.Exception
Throws:
java.lang.Exception

evaluator

protected Evaluator evaluator(WMSessionHandle shandle)
                       throws java.lang.Exception
Throws:
java.lang.Exception

getPerformer

protected WfProcessInternal getPerformer(WMSessionHandle shandle)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

getResourceRequesterUsername

public java.lang.String getResourceRequesterUsername(WMSessionHandle shandle)
                                              throws java.lang.Exception
Specified by:
getResourceRequesterUsername in interface WfRequesterInternal
Throws:
java.lang.Exception

getExternalRequester

public WfRequester getExternalRequester(WMSessionHandle shandle)
                                 throws java.lang.Exception
Specified by:
getExternalRequester in interface WfRequesterInternal
Throws:
java.lang.Exception

setExternalRequester

public void setExternalRequester(WMSessionHandle shandle,
                                 WfRequester extReq)
                          throws java.lang.Exception
Specified by:
setExternalRequester in interface WfRequesterInternal
Throws:
java.lang.Exception

execution_status

protected int[] execution_status(WMSessionHandle shandle)
                          throws java.lang.Exception
Throws:
java.lang.Exception

persist

public void persist(WMSessionHandle shandle)
             throws java.lang.Exception
Specified by:
persist in interface PersistenceInterface
Throws:
java.lang.Exception

persistActivityContext

protected void persistActivityContext(WMSessionHandle shandle)
                               throws java.lang.Exception
Method persistActivityContext stores content of the workflow relevant data of this activity, either all of them, or modified only.

Throws:
java.lang.Exception

persistDeadlines

protected void persistDeadlines(WMSessionHandle shandle)
                         throws java.lang.Exception
Throws:
java.lang.Exception

persistExecutedDeadline

protected void persistExecutedDeadline(WMSessionHandle shandle,
                                       java.lang.String uniqueId)
                                throws java.lang.Exception
Throws:
java.lang.Exception

delete

public void delete(WMSessionHandle shandle)
            throws java.lang.Exception
Specified by:
delete in interface PersistenceInterface
Throws:
java.lang.Exception

getXPDLObject

protected org.enhydra.shark.xpdl.XMLCollectionElement getXPDLObject(WMSessionHandle shandle)
                                                             throws java.lang.Exception
Specified by:
getXPDLObject in class WfExecutionObjectImpl
Throws:
java.lang.Exception

getContext

public java.util.Map getContext(WMSessionHandle shandle)
                         throws java.lang.Exception
Specified by:
getContext in interface WfExecutionObjectInternal
Throws:
java.lang.Exception

getResultVariableIds

protected java.util.Set getResultVariableIds(WMSessionHandle shandle)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

createAndFillPersistentObject

protected ActivityPersistenceObject createAndFillPersistentObject()

fillPersistentObject

protected void fillPersistentObject(ActivityPersistenceObject po)

restore

protected void restore(ActivityPersistenceObject po)

getPerformerId

public java.lang.String getPerformerId(WMSessionHandle shandle)
Specified by:
getPerformerId in interface WfActivityInternal

isPerformerSynchronous

public boolean isPerformerSynchronous(WMSessionHandle shandle)
Specified by:
isPerformerSynchronous in interface WfActivityInternal

getCreationTime

public long getCreationTime(WMSessionHandle shandle)
                     throws java.lang.Exception
Specified by:
getCreationTime in interface WfExecutionObjectInternal
Specified by:
getCreationTime in class WfExecutionObjectImpl
Throws:
java.lang.Exception

getStartTime

public long getStartTime(WMSessionHandle shandle)
                  throws java.lang.Exception
Specified by:
getStartTime in interface WfExecutionObjectInternal
Specified by:
getStartTime in class WfExecutionObjectImpl
Throws:
java.lang.Exception

updateAssignmentResourceIds

public void updateAssignmentResourceIds(WMSessionHandle shandle,
                                        java.lang.String oldResUname,
                                        java.lang.String newResUname)
                                 throws java.lang.Exception
Specified by:
updateAssignmentResourceIds in interface WfActivityInternal
Throws:
java.lang.Exception

removeAssignments

protected void removeAssignments(WMSessionHandle shandle,
                                 boolean removeActiveOne,
                                 boolean deleteOtherAssignments)
                          throws java.lang.Exception
Throws:
java.lang.Exception

removeAssignment

protected void removeAssignment(WMSessionHandle shandle,
                                java.lang.String resUsername,
                                boolean delete,
                                boolean assStat)
                         throws java.lang.Exception
Throws:
java.lang.Exception

setAssignmentStatus

protected void setAssignmentStatus(WMSessionHandle shandle,
                                   java.lang.String resUsername,
                                   boolean isValid,
                                   boolean isAccepted)
                            throws java.lang.Exception
Throws:
java.lang.Exception

getDeadlineInfo

public java.util.List getDeadlineInfo(WMSessionHandle shandle)
                               throws java.lang.Exception
Specified by:
getDeadlineInfo in interface WfActivityInternal
Throws:
java.lang.Exception

checkDeadlines

public boolean checkDeadlines(WMSessionHandle shandle,
                              long timeLimitBoundary,
                              java.util.Map actsToAsyncExcNames)
                       throws java.lang.Exception
Specified by:
checkDeadlines in interface WfActivityInternal
Throws:
java.lang.Exception

reevaluateDeadlines

protected java.util.List reevaluateDeadlines(WMSessionHandle shandle)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

getException

public java.lang.Exception getException(WMSessionHandle shandle)
Specified by:
getException in interface WfActivityInternal

setException

public void setException(WMSessionHandle shandle,
                         java.lang.Exception tage)
Specified by:
setException in interface WfActivityInternal

getExceptionName

public java.lang.String getExceptionName(WMSessionHandle shandle)
Specified by:
getExceptionName in interface WfActivityInternal

setExceptionName

public void setExceptionName(WMSessionHandle shandle,
                             java.lang.String excName)
Specified by:
setExceptionName in interface WfActivityInternal

performDeadlineReevaluation

protected boolean performDeadlineReevaluation()

duplicate

public WfActivityInternal duplicate(WfProcessInternal proc)
                             throws java.lang.Exception
Specified by:
duplicate in interface WfActivityInternal
Throws:
java.lang.Exception

checkReadOnly

protected void checkReadOnly()
                      throws java.lang.Exception
Specified by:
checkReadOnly in class WfExecutionObjectImpl
Throws:
java.lang.Exception

canCreateAssignments

protected boolean canCreateAssignments(WMSessionHandle shandle)
                                throws java.lang.Exception
Throws:
java.lang.Exception

createDefaultAssignment

protected boolean createDefaultAssignment(WMSessionHandle shandle)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

deleteOtherAssignments

protected boolean deleteOtherAssignments(WMSessionHandle shandle)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

getAssignmentManager

protected AssignmentManager getAssignmentManager(WMSessionHandle shandle)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

handleAllAssignments

protected boolean handleAllAssignments(WMSessionHandle shandle)
                                throws java.lang.Exception
Throws:
java.lang.Exception

migrateActivity

public void migrateActivity(WMSessionHandle shandle,
                            WfProcessMgrInternal processMgr,
                            java.util.Map newVariables)
                     throws java.lang.Exception
Specified by:
migrateActivity in interface WfActivityInternal
Throws:
java.lang.Exception

getOid

public java.lang.String getOid()
Specified by:
getOid in interface WfActivityInternal

getVersion

public int getVersion()
Specified by:
getVersion in interface WfActivityInternal