Class CallSubflowTask

  extended byorg.openemcee.microflow.tasks.CallSubflowTask
All Implemented Interfaces:

public class CallSubflowTask
extends java.lang.Object
implements MicroflowTask

This task is called to execute a Microflow from another Microflow. Only flows launched using an org.openemcee.microflow.frontend.MicroflowRunner created by an org.openemcee.microflow.frontend.MicroflowFactory can use this task. Please see this example task config:

  <task name="SubflowTask"
        <outcome name="terminate"
        <outcome name="fail2"
        <outcome name="default"
              <value>comps, num_tasks</value>
"subflow_name" is required to determine which flow to execute. The Microflow XML is assumed to be relative to the URL which was used to create the MicroflowRunner which launched the parent flow. A comma separated list of MicroflowData names is required to pass information between Microflows. All data is considered "in-out". If the Microflow executes successfully, the last outcome of the last task is assumed to be the outcome of this class. If the microflow fails, the following will be the outcome.
 | OUTCOME_NAME             | REASON
 | illegal_sys_state        | Microflow internal state was invalid
 | microflow_not_found      | Microflow XML was not found
 | data_integrity_exception | Subflow terminated with a data integrity exception.
 | microflow_failure        | The Microflow failed due to config problems, or unchecked exceptions.
 | ANYTHING ELSE            | The last task terminated with this outcome.
If any of the above errors occur, the source exception chain will be available in the Microflow data under "org.openemcee.microflow.impl.MicroflowExecutor.SUBFLOW_EXCEPTION_KEY"

Scott Schenkein

Field Summary
Fields inherited from interface org.openemcee.microflow.usercore.MicroflowTask
Constructor Summary
          Creates a new instance of CallSubflowTask
Method Summary
 MicroflowTaskOutcome executeTask(MicroflowData data)
          See class description.
 boolean init(MicroflowParameters params)
          This method is called once, and only once, prior to calling execute task.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public CallSubflowTask()
Creates a new instance of CallSubflowTask

Method Detail


public MicroflowTaskOutcome executeTask(MicroflowData data)
See class description.

Specified by:
executeTask in interface MicroflowTask
data - This parameter provides access to the data associated with the current Microflow.
This method returns a MicroflowTask explaining the outcome, perhaps "success", "failure", "communication_error", etc...


public boolean init(MicroflowParameters params)
Description copied from interface: MicroflowTask
This method is called once, and only once, prior to calling execute task. It provides access to the parameters specified in the task definition in the Microflow job defintion XML document. If the initialization fails, the executeTask will not be called, and the calling Microflow will fail.

Specified by:
init in interface MicroflowTask
params - A MicroflowParameters object which contains any parameters specified in the microflow XML.
True on successful initialization, false on failure.

OpenEmcee Microflow Engine for Java: All software and content contained herein is subject to the Mozilla public license v1.1. Logo