|
||||||||||
| 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 java.lang.String |
NODE_VAR_SEPARATOR
Separator to qualify variables belonging to a node. |
| Method Summary | |
|---|---|
void |
fail(java.lang.String nodeName)
Fail the instance. |
java.util.Map<java.lang.String,java.lang.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. |
java.lang.String |
getId()
Return the ID of the instance. |
WorkflowInstance.Status |
getStatus()
Return the current status of the instance. |
java.lang.Object |
getTransientVar(java.lang.String name)
Return a transient variable from the context of the instance. |
java.lang.String |
getTransition(java.lang.String node)
Return the transition a node did. |
java.lang.String |
getVar(java.lang.String name)
Return a variable from the context of the instance. |
void |
kill()
Kill the instance. |
void |
resume()
Resume the instance. |
void |
setAllVars(java.util.Map<java.lang.String,java.lang.String> varMap)
Add a set of variables in the context of the instance. |
void |
setTransientVar(java.lang.String name,
java.lang.Object value)
Set a transient variable in the context of the instance. |
void |
setVar(java.lang.String name,
java.lang.String value)
Set a variable in the context of the instance. |
boolean |
signal(java.lang.String path,
java.lang.String signaValue)
Signal the instance that a node has completed. |
boolean |
start()
Start the instance. |
void |
suspend()
Suspend the instance. |
| Field Detail |
|---|
static final java.lang.String NODE_VAR_SEPARATOR
nodeName +
NODE_VAR_SEPARATOR + varName.
| Method Detail |
|---|
org.apache.hadoop.conf.Configuration getConf()
java.lang.String getId()
WorkflowApp getApp()
boolean start()
throws WorkflowException
WorkflowException - thrown if the instance could not be started.
boolean signal(java.lang.String path,
java.lang.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(java.lang.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(java.lang.String name,
java.lang.String value)
name - variable name.value - variable value, setting a null value removes the variable.java.lang.String getVar(java.lang.String name)
name - name of the variable.
null if the variable is not in the context.java.util.Map<java.lang.String,java.lang.String> getAllVars()
void setAllVars(java.util.Map<java.lang.String,java.lang.String> varMap)
varMap - map with the variables to add.
void setTransientVar(java.lang.String name,
java.lang.Object value)
name - transient variable name.value - transient variable value, setting a null value removes the variable.java.lang.Object getTransientVar(java.lang.String name)
name - name of the transient variable.
null if the variable is not in the context.java.lang.String getTransition(java.lang.String node)
node - the node name.
null if the node didn't execute yet.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||