flux
Interface FlowChartAction
- All Superinterfaces:
- Action, java.lang.Cloneable, RuntimeDataMap, java.io.Serializable
public interface FlowChartAction
- extends Action
Exports a new workflow to an engine. The workflow can be loaded from a
workflow XML file or the repository. The newly created workflow can be
populated with workflow variables. The newly created workflow overwrites
any existing workflow with the same name that may already exist.
It is an error to specify both a filename and a repository namespace. One or
the other must be specified.
There is an implicit transaction break at the end of the Flow Chart Action.
Assuming a fatal error does not occur, the new workflow is committed to the
database at the end of execution of the Flow Chart Action. Once committed to
the database, the newly exported workflow is eligible for execution by an
engine.
The Flow Chart Action returns its result in the flow context variable "RESULT". The
following table contains more information on accessing and using the result.
Flow Context Variable |
Field |
Java Type |
Description |
RESULT | result | java.lang.String | The fully-qualified namespace of the new workflow that this Flow Chart Action exported to an engine. |
- Author:
- Copyright 2014 Flux Corporation. All rights reserved.
Method Summary |
java.lang.String |
getFilename()
Returns the filename of a workflow XML file to use when exporting a new
workflow to an engine. |
java.lang.String |
getNamespace()
Returns the namespace where the new workflow will be exported to an engine. |
java.lang.String |
getRepositoryNamespace()
Returns the repository location of the workflow to use when exporting a
new workflow to an engine. |
java.util.Map<java.lang.String,java.lang.Object> |
getVariables()
Returns the variables used to initialize the workflow variables of the
created workflow. |
boolean |
isAsynchronous()
Returns whether this workflow action waits synchronously — or does
not wait (asynchronous) — for the newly spun off workflow to finish
running before this workflow action completes. |
boolean |
isInitializeFromFlowContext()
Returns whether this action's Variables property will be initialized from
the flow context. |
boolean |
isOverwrite()
Returns whether the new workflow exported to an engine will overwrite an
existing workflow or simply modify an existing workflow. |
void |
setAsynchronous(boolean enabled)
Sets whether this workflow action waits synchronously — or does not
wait (asynchronous) — for the newly spun off workflow to finish
running before this workflow action completes. |
void |
setFilename(java.lang.String filename)
Sets the filename of a workflow XML file to use when exporting a new flow
chart to an engine. |
void |
setInitializeFromFlowContext(boolean initializeFromFlowContext)
Sets whether this action's Variables property will be initialized from the
flow context. |
void |
setNamespace(java.lang.String namespace)
Sets the namespace where the new workflow will be exported to an engine. |
void |
setOverwrite(boolean enabled)
Sets whether the new workflow exported to an engine will overwrite an
existing workflow or simply modify an existing workflow. |
void |
setRepositoryNamespace(java.lang.String namespace)
Sets the repository location of the workflow to use when exporting a new
workflow to an engine. |
void |
setVariables(java.util.Map<java.lang.String,java.lang.Object> variables)
Sets the variables used to initialize the workflow variables of the
created workflow. |
Methods inherited from interface flux.Action |
addFlow, addFlow, addSignalFlow, clone, execute, getDescription, getFlows, getHiddenVariableNames, getJoinExpression, getName, getPostscript, getPostscriptLanguage, getPrescript, getPrescriptLanguage, getResultInfo, getSignalsToMonitor, getTimeoutBusinessInterval, getTimeoutBusinessIntervalNamespace, getTimeoutExpression, getVariableManager, isEndOfRun, isJoinPoint, isSkippable, isStartAction, isStartOfRun, isTransactionBreak, removeFlow, reset, setDescription, setElseFlow, setEndOfRun, setErrorFlow, setErrorFlowWithoutRollback, setErrorFlowWithRollback, setJoinExpression, setJoinPoint, setName, setPostscript, setPostscriptLanguage, setPrescript, setPrescriptLanguage, setSignalsToMonitor, setSkippable, setStartAction, setStartOfRun, setTimeoutBusinessInterval, setTimeoutBusinessIntervalNamespace, setTimeoutExpression, setTimeoutFlow, setTransactionBreak, verify, verifyOnClient |
getFilename
java.lang.String getFilename()
- Returns the filename of a workflow XML file to use when exporting a new
workflow to an engine. The filename can be an absolute or relative
pathname to a file. At runtime, the engine first checks the class path for
the workflow XML file. If it cannot be found, then the file system is
checked next.
- Returns:
- The filename of a workflow XML file to use when exporting a new
workflow to an engine.
getNamespace
java.lang.String getNamespace()
- Returns the namespace where the new workflow will be exported to an engine.
If the namespace is null, the name of the new workflow is taken from the
name of the workflow retrieved from the file system or the repository, as
appropriate. Setting a namespace indicates the complete name of the new
workflow.
- Returns:
- The namespace where the new workflow will be exported to
an engine.
getRepositoryNamespace
java.lang.String getRepositoryNamespace()
- Returns the repository location of the workflow to use when exporting a
new workflow to an engine.
- Returns:
- The repository location of the workflow to use when exporting a
new workflow to an engine.
getVariables
java.util.Map<java.lang.String,java.lang.Object> getVariables()
- Returns the variables used to initialize the workflow variables of the
created workflow.
- Returns:
- The variables used to initialize the workflow variables of the
created workflow.
isAsynchronous
boolean isAsynchronous()
- Returns whether this workflow action waits synchronously — or does
not wait (asynchronous) — for the newly spun off workflow to finish
running before this workflow action completes.
By default, the newly spun off workflow runs synchronously, until it
completes, before this workflow action finishes. In other words, this
property defaults to false.
- Returns:
- Whether this workflow action waits synchronously — or does
not wait (asynchronous) — for the newly spun off workflow
to finish running before this workflow action completes.
isInitializeFromFlowContext
boolean isInitializeFromFlowContext()
- Returns whether this action's Variables property will be initialized from
the flow context.
By default, this property is set to false.
- Returns:
- Whether this action's Variables property will be initialized from
the flow context.
isOverwrite
boolean isOverwrite()
- Returns whether the new workflow exported to an engine will overwrite an
existing workflow or simply modify an existing workflow.
If no workflow exists at the location where the new workflow will be
exported, this property has no effect.
However, if such a workflow does exist and overwrite is enabled, this
Flow Chart Action first removes that workflow before exporting the new
workflow.
On the other hand, if such a workflow does exist and overwrite is
disabled, this Flow Chart Action attempts to modify that existing flow
chart using the properties of the new workflow.
By default, the overwrite property is enabled.
- Returns:
- Whether the new workflow exported to an engine will overwrite an
existing workflow or simply modify an existing workflow.
setAsynchronous
void setAsynchronous(boolean enabled)
- Sets whether this workflow action waits synchronously — or does not
wait (asynchronous) — for the newly spun off workflow to finish
running before this workflow action completes.
By default, the newly spun off workflow runs synchronously, until it
completes, before this workflow action finishes. In other words, this
property defaults to false.
- Parameters:
enabled
- Whether this workflow action waits synchronously —
or does not wait (asynchronous) — for the newly spun
off workflow to finish running before this workflow
action completes.
setFilename
void setFilename(java.lang.String filename)
- Sets the filename of a workflow XML file to use when exporting a new flow
chart to an engine. The filename can be an absolute or relative pathname to
a file. At runtime, the engine first checks the class path for the flow
chart XML file. If it cannot be found, then the file system is checked
next.
- Parameters:
filename
- The filename of a workflow XML file to use when exporting
a new workflow to an engine.
setInitializeFromFlowContext
void setInitializeFromFlowContext(boolean initializeFromFlowContext)
- Sets whether this action's Variables property will be initialized from the
flow context.
If true, all flow context variables at the time the action is invoked will
be set as workflow variables on the newly created workflow (see
setVariables(java.util.Map)
for information on how these variables
are stored.
By default, this property is set to false.
- Parameters:
initializeFromFlowContext
- Whether this action's Variables property
will be initialized from the flow context.
setNamespace
void setNamespace(java.lang.String namespace)
throws java.lang.IllegalArgumentException
- Sets the namespace where the new workflow will be exported to an engine.
If the namespace is null, the name of the new workflow is taken from the
name of the workflow retrieved from the file system or the repository, as
appropriate. Setting a namespace indicates the complete name of the new
workflow. If the namespace does not start with a leading "/" character,
a "/" character is automatically prepended to the namespace. Finally, the
namespace cannot end with a "/" character.
- Parameters:
namespace
- The namespace where the new workflow will be exported to
an engine.
- Throws:
java.lang.IllegalArgumentException
- If the namespace ends with a "/" character.
setOverwrite
void setOverwrite(boolean enabled)
- Sets whether the new workflow exported to an engine will overwrite an
existing workflow or simply modify an existing workflow.
If no workflow exists at the location where the new workflow will be
exported, this property has no effect.
However, if such a workflow does exist and overwrite is enabled, this
Flow Chart Action first removes that workflow before exporting the new
workflow.
On the other hand, if such a workflow does exist and overwrite is
disabled, this Flow Chart Action attempts to modify that existing flow
chart using the properties of the new workflow.
By default, the overwrite property is enabled.
- Parameters:
enabled
- Indicates whether the new workflow exported to an engine
will overwrite an existing workflow or simply modify an
existing workflow.
setRepositoryNamespace
void setRepositoryNamespace(java.lang.String namespace)
- Sets the repository location of the workflow to use when exporting a new
workflow to an engine. If the namespace does not start with a leading "/" character,
a "/" character is automatically prepended to the namespace.
- Parameters:
namespace
- The repository location of the workflow to use when
exporting a new workflow to an engine.
setVariables
void setVariables(java.util.Map<java.lang.String,java.lang.Object> variables)
- Sets the variables used to initialize the workflow variables of the
created workflow.
This data is passed into the workflow variable manager for the newly created
workflow. The variables specified here can be accessed by any action or
trigger within the newly created workflow using the workflow variable manager.
The key of the map is the name of the variable, and the value is the value
that the variable is initialized with.
- Parameters:
variables
- The variables used to initialize the workflow variables
of the created workflow.
© 2014 Flux Corporation. All rights reserved.