|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WorkflowInstance
A workflow instance is an executable instance of a WorkflowApp.
| Nested Class Summary | |
|---|---|
static class |
WorkflowInstance.Status
Defines the possible stati of a WorkflowInstance. |
| Field Summary | |
|---|---|
static String |
NODE_VAR_SEPARATOR
Separator to qualify variables belonging to a node. |
| Method Summary | |
|---|---|
void |
fail(String nodeName)
Fail the instance. |
Map<String,String> |
getAllVars()
Return a map with all the variables in the context of the instance. |
WorkflowApp |
getApp()
Return the workflow application that defines the instance. |
org.apache.hadoop.conf.Configuration |
getConf()
Return the configuration of the instance. |
String |
getId()
Return the ID of the instance. |
NodeDef |
getNodeDef(String executionPath)
Get NodeDef from workflow instance |
WorkflowInstance.Status |
getStatus()
Return the current status of the instance. |
Object |
getTransientVar(String name)
Return a transient variable from the context of the instance. |
String |
getTransition(String node)
Return the transition a node did. |
String |
getVar(String name)
Return a variable from the context of the instance. |
void |
kill()
Kill the instance. |
void |
resume()
Resume the instance. |
void |
setAllVars(Map<String,String> varMap)
Add a set of variables in the context of the instance. |
void |
setTransientVar(String name,
Object value)
Set a transient variable in the context of the instance. |
void |
setVar(String name,
String value)
Set a variable in the context of the instance. |
boolean |
signal(String path,
String signaValue)
Signal the instance that a node has completed. |
boolean |
start()
Start the instance. |
void |
suspend()
Suspend the instance. |
| Field Detail |
|---|
static final String NODE_VAR_SEPARATOR
nodeName +
NODE_VAR_SEPARATOR + varName.
| Method Detail |
|---|
org.apache.hadoop.conf.Configuration getConf()
String getId()
WorkflowApp getApp()
boolean start()
throws WorkflowException
WorkflowException - thrown if the instance could not be started.
boolean signal(String path,
String signaValue)
throws WorkflowException
path - execution path of the node that has completed.signaValue - signal value for the node.
true if the instance has completed its execution, false otherwise.
WorkflowException
void fail(String nodeName)
throws WorkflowException
nodeName - the name of the node to be failed.
WorkflowException - thrown if the instance could not be failed.
void kill()
throws WorkflowException
WorkflowException - thrown if the instance could not be killed.
void suspend()
throws WorkflowException
WorkflowException - thrown if the instance could not be suspended.
void resume()
throws WorkflowException
WorkflowException - thrown if the instance could not be resume.WorkflowInstance.Status getStatus()
void setVar(String name,
String value)
name - variable name.value - variable value, setting a null value removes the variable.String getVar(String name)
name - name of the variable.
null if the variable is not in the context.Map<String,String> getAllVars()
void setAllVars(Map<String,String> varMap)
varMap - map with the variables to add.
void setTransientVar(String name,
Object value)
name - transient variable name.value - transient variable value, setting a null value removes the variable.Object getTransientVar(String name)
name - name of the transient variable.
null if the variable is not in the context.String getTransition(String node)
node - the node name.
null if the node didn't execute yet.NodeDef getNodeDef(String executionPath)
executionPath - execution path
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||