Announcement Announcement Module
No announcement yet.
subflow question Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • subflow question


    is it right that the subflow feature is only a feature to go into a other process without losing the flow data?

    because when calling subflows directly which are depending on data input from the main flow, the user will get a error. so for this i can't use subflows.

    is it right, so when i will use subflows because some flows repeates, i have to create a transition on this first which catch the error and finish the flow.

    or are there any other solutions?

    thanks mfg Gideon

  • #2
    A subflow may be passed input data from its parent flow when it is spawned.

    Also, a subflow may pass back output data to its parent flow when it ends.

    The FlowAttributeMapper strategy does this, and is used by the SubFlowState that manages spawning a subflow and resuming the parent flow when the subflow ends.

    So with that said, a Flow has a contract. It is like a black box--a component. It should be self-contained, but may require input data to work and may produce output data other flows can take and do stuff with. If a Flow that requires some input doesn't get it, it needs to take an appropriate action: either throw a exception if it's a programmer error, or immediately end the flow with a error result if it's recoverable.


    • #3
      If you grab the latest & greatest from CVS you will see that there is a new sample application 'FlowLauncher' that demonstrates launching flows with input parameters:

      * as stand-alone top-level flows
      * as sub-flows
      * from the end state of an ending flow