public interface WorkflowInstance
WorkflowApp.| Modifier and Type | Interface and Description |
|---|---|
static class |
WorkflowInstance.Status
Defines the possible stati of a
WorkflowInstance. |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NODE_VAR_SEPARATOR
Separator to qualify variables belonging to a node.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
NodeDef |
getNodeDef(java.lang.String executionPath)
Get NodeDef from workflow 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.
|
static final java.lang.String NODE_VAR_SEPARATOR
nodeName +
NODE_VAR_SEPARATOR + varName.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.WorkflowExceptionvoid 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.NodeDef getNodeDef(java.lang.String executionPath)
executionPath - execution pathCopyright © 2018 Apache Software Foundation. All Rights Reserved.