|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
net.kwfgrid.gwes.GenericWorkflowHandler
net.kwfgrid.gwes.GWorkflowDLHandler
public class GWorkflowDLHandler
The GWorkflowDLHandler is the dynamic and interactive workflow enactment machine for workflows described with the Generic Workflow Description Language (GWorkflowDL).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static int |
FAULT_MANAGEMENT_ABORT_ON_ACTIVITY_TERMINATED
Abort the whole workflow if a single activity terminates (0). |
static int |
FAULT_MANAGEMENT_CONTINUE_ON_ACTIVITY_TERMINATED
Continue to execute the workflow, even if one or more activities terminate (1). |
static int |
FAULT_MANAGEMENT_SUSPEND_ON_ACTIVITY_TERMINATED
Suspend the workflow if an activity terminates (2). |
static int |
WORKFLOW_PERSISTENCE_FALSE
Do not store workflows in database automatically (0). |
static int |
WORKFLOW_PERSISTENCE_TRUE
Store workflows in database automatically (1). |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
GWorkflowDLHandler(GWESEngine engine,
String originalWorkflowDescriptionType,
String workflowDescription,
String userIdCredential)
Constructor. |
|
| Method Summary | |
|---|---|
void |
abortWorkflow()
Abort this workflow. |
void |
abortWorkflowAsync()
Abort this workflow asynchonously. |
List<net.kwfgrid.gworkflowdl.structure.Transition> |
getConflictTransitions()
|
CredentialManager |
getCredentialManager(Activity activity)
|
Map<String,net.kwfgrid.gworkflowdl.analysis.Decision> |
getCurrentDecisions()
|
String[] |
getData(String placeID)
Get specific data that is hold inside the workflow and that is referenced by a data place identifier. |
String |
getDescription()
Get the human-readable description of the workflow. |
net.kwfgrid.gworkflowdl.structure.Workflow |
getWorkflow()
get the workflow. |
String |
getWorkflowDescription()
Get the current workflow description of this workflow. |
void |
incrementCompletedActivities(int completedActivities)
Overrides method of GenericWorkflowHandler and writes property to workflow document |
void |
incrementTerminatedActivities(int terminatedActivities)
Overrides method of GenericWorkflowHandler and writes property to workflow document |
void |
initiateWorkflow()
K-Wf Grid specific implementation of GenericWorkflowHandler.initiateWorkflow() |
protected void |
logStatistics()
Overrides method of GenericWorkflowHandler in order to include statistics in the workflow description files as well. |
void |
resumeWorkflow()
Resume this workflow. |
void |
run()
************************************************************************************************************* This is the run method of the Thread, invoked by start(). |
void |
setDescription(String description)
Set the human-readable description of the workflow. |
void |
setFaultManagementPolicy(int faultManagementPolicy)
Set the policy for the fault management. |
protected void |
setStatus(int status)
Set status of the workflow and notify threads that wait for a status change. |
void |
setWorkflowDescription(String workflowDescription)
Set the current workflow description of this workflow. |
void |
setWorkflowPersistence(int workflowPersistence)
Set the policy for the workflow persistence. |
void |
setWorkflowPersistence(String workflowPersistence)
Set the policy for the workflow persistence. |
void |
startWorkflow()
K-Wf Grid specific implementation of GenericWorkflowHandler.startWorkflow(). |
String |
storeWorkflow()
Stores this workflow. |
void |
suspendWorkflow()
Suspend this workflow. |
void |
suspendWorkflowAsync()
Suspend this workflow asynchonously. |
void |
workflowErrorAndAbort(String error)
|
void |
workflowErrorAndAbort(String error,
Throwable e)
|
void |
workflowWarn(String warning)
|
void |
workflowWarnAndSuspend(String warning)
|
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int FAULT_MANAGEMENT_ABORT_ON_ACTIVITY_TERMINATED
public static final int FAULT_MANAGEMENT_CONTINUE_ON_ACTIVITY_TERMINATED
public static final int FAULT_MANAGEMENT_SUSPEND_ON_ACTIVITY_TERMINATED
public static final int WORKFLOW_PERSISTENCE_FALSE
public static final int WORKFLOW_PERSISTENCE_TRUE
| Constructor Detail |
|---|
public GWorkflowDLHandler(GWESEngine engine,
String originalWorkflowDescriptionType,
String workflowDescription,
String userIdCredential)
throws WorkflowSecurityException,
LoggingException
engine - The parent GWES EngineoriginalWorkflowDescriptionType - The original type of workflow description, e.g., "GWorkflowDL version 2.0"workflowDescription - The workflow description in GWorkflowDL formatuserIdCredential - user identifier
WorkflowSecurityException
LoggingException| Method Detail |
|---|
public void initiateWorkflow()
throws net.kwfgrid.gworkflowdl.structure.WorkflowFormatException,
StateTransitionException
GenericWorkflowHandler.initiateWorkflow()
initiateWorkflow in class GenericWorkflowHandlernet.kwfgrid.gworkflowdl.structure.WorkflowFormatException
StateTransitionException
public void startWorkflow()
throws StateTransitionException
GenericWorkflowHandler.startWorkflow(). Calls
Thread.start().
startWorkflow in class GenericWorkflowHandlerStateTransitionException
public void suspendWorkflow()
throws StateTransitionException
GenericWorkflowHandler
suspendWorkflow in class GenericWorkflowHandlerStateTransitionException
public void suspendWorkflowAsync()
throws StateTransitionException
GenericWorkflowHandler
suspendWorkflowAsync in class GenericWorkflowHandlerStateTransitionException
public void resumeWorkflow()
throws StateTransitionException
GenericWorkflowHandler
resumeWorkflow in class GenericWorkflowHandlerStateTransitionException
public void abortWorkflow()
throws StateTransitionException
GenericWorkflowHandler
abortWorkflow in class GenericWorkflowHandlerStateTransitionException
public void abortWorkflowAsync()
throws StateTransitionException
GenericWorkflowHandler
abortWorkflowAsync in class GenericWorkflowHandlerStateTransitionException
public String storeWorkflow()
throws DatabaseException
storeWorkflow in class GenericWorkflowHandlerDatabaseExceptionpublic String[] getData(String placeID)
getData in class GenericWorkflowHandlerplaceID - The place identifier that refers to the data
null if place ID is not valid.public String getDescription()
getDescription in class GenericWorkflowHandlerpublic void setDescription(String description)
setDescription in class GenericWorkflowHandlerdescription - The description.public String getWorkflowDescription()
getWorkflowDescription in class GenericWorkflowHandler
public void setWorkflowDescription(String workflowDescription)
throws net.kwfgrid.gworkflowdl.structure.WorkflowFormatException,
StateTransitionException
setWorkflowDescription in class GenericWorkflowHandlerworkflowDescription - The new workflow description.
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException - If the workflow format is wrong.
StateTransitionException - If status of workflow is in final status STATUS_COMPLETED or STATUS_TERMINATED.protected void setStatus(int status)
setStatus in class GenericWorkflowHandlerWorkflowStatus.STATUS_UNDEFINED,
WorkflowStatus.STATUS_INITIATED,
WorkflowStatus.STATUS_RUNNING,
WorkflowStatus.STATUS_SUSPENDED,
WorkflowStatus.STATUS_ACTIVE,
WorkflowStatus.STATUS_TERMINATED,
WorkflowStatus.STATUS_COMPLETED,
GenericWorkflowHandler.waitForStatusChangeTo(int),
GenericWorkflowHandler.waitForStatusChangeFrom(int)public void run()
run in interface Runnablerun in class GenericWorkflowHandlerpublic void workflowErrorAndAbort(String error)
public void workflowErrorAndAbort(String error,
Throwable e)
public void workflowWarn(String warning)
public void workflowWarnAndSuspend(String warning)
public net.kwfgrid.gworkflowdl.structure.Workflow getWorkflow()
getWorkflow in class GenericWorkflowHandlerpublic Map<String,net.kwfgrid.gworkflowdl.analysis.Decision> getCurrentDecisions()
public List<net.kwfgrid.gworkflowdl.structure.Transition> getConflictTransitions()
public CredentialManager getCredentialManager(Activity activity)
throws LoggingException,
GSSException
LoggingException
GSSExceptionpublic void setFaultManagementPolicy(int faultManagementPolicy)
faultManagementPolicy - The integer code of the fault management policy.FAULT_MANAGEMENT_ABORT_ON_ACTIVITY_TERMINATED,
FAULT_MANAGEMENT_CONTINUE_ON_ACTIVITY_TERMINATED,
FAULT_MANAGEMENT_SUSPEND_ON_ACTIVITY_TERMINATEDpublic void setWorkflowPersistence(int workflowPersistence)
workflowPersistence - The integer code of the workflow persistence policy.WORKFLOW_PERSISTENCE_FALSE,
WORKFLOW_PERSISTENCE_TRUE
public void setWorkflowPersistence(String workflowPersistence)
throws net.kwfgrid.gworkflowdl.structure.WorkflowFormatException
workflowPersistence - The string of the workflow persistence policy.
net.kwfgrid.gworkflowdl.structure.WorkflowFormatExceptionpublic void incrementTerminatedActivities(int terminatedActivities)
incrementTerminatedActivities in class GenericWorkflowHandlerterminatedActivities - public void incrementCompletedActivities(int completedActivities)
incrementCompletedActivities in class GenericWorkflowHandlerprotected void logStatistics()
logStatistics in class GenericWorkflowHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||