Core Triggers and Actions - Flow Chart 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.

At the end of the Flow Chart Action, the current database transaction is committed implicitly. 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.

By default, the newly spun-off workflow runs synchronously, until it completes, before this workflow action finishes. However, the Flow Chart Action can be configured to create the new workflow and continue executing immediately, without waiting for the new workflow to finish running first.

Properties

Asynchronous

Indicates whether this Flow Chart Action waits synchronously — or does not wait (asynchronous) — for the newly spun-off workflow to finish running before this Flow Chart Action completes. By default, the newly spun-off workflow runs synchronously, until it completes, before this workflow action finishes.

Overwrite

Indicates 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 workflow using the properties of the new workflow.

By default, the overwrite property is enabled.

Namespace

The namespace that the new workflow will use when it runs. When the Flow Chart Action executes, it will create the new workflow, assign it a name according to this property, and export the workflow.

For example:

/MyBranch/MyWorkflow

Note that the namespace is not used to look up the workflow that will be executed — it is only used to assign a name to the workflow after it has already been loaded (from either the file system or the repository). This property is not required. If you do not set a namespace, the namespace of the new workflow will be taken instead from the name of the workflow as retrieved from the file system or the repository.

Filename

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 classpath for the workflow XML file. If it cannot be found, then the file system is checked next.

Typically your workflow XML file will have the extension .ffc, for example: MyWorkflow.ffc.

You must set either this property or the repository namespace property for this action to execute (to instruct Flux on where to find the workflow that this action will run).

Repository Namespace

The repository location of the workflow to use when exporting a new workflow to an engine. This should be the full namespace (including the workflow name) of a workflow that is stored in the repository. For example:

/MyWorkflow

or

/MyNamespace/MySubNamespace/MyWorkflow

You must set either this property or the filename property for this action to execute (to instruct Flux on where to find the workflow that this action will run).

Variables

The variables used to initialize the workflow variables of the created workflow. In the created workflow, the variables are placed in the Flow Chart Variable Manager.

Initialize From Flow Context

Indicates whether flow context variables should be copied into the Flow Chart Variable Manager of the created workflow.

Results

The Flow Chart Action returns its result in the flow context variable “result”. The result contains the name of the workflow that was invoked. You can access the result from the following field:

Flow Context Variable Field Java Type Description Prescript / Postscript Example
RESULT result String The fully-qualified namespace of the new workflow that this Flow Chart Action exported to an engine. String namespace = flowContext.get(“RESULT”).result; System.out.println(“Workflow Name: “ + namespace);

Passing Results with a Runtime Data Map

You can use a Runtime Data Map to copy the result field into a new variable (for future reference or to reuse the data later in the workflow).

To copy the result, you can use a data map like:

Instruction 1 of 1