Rasa train mistakes a child flow for an action

When I run ‘rasa train’ with a flows.yml file flows.yml (927 Bytes) that contains a parent flow calling a child flow, I get an error as follows:

ERROR rasa.validator - [error ] The action ‘finalize_plan’ is used in the step ‘1_finalize_plan’ of flow id ‘defect_remediation’, but it is not listed in the domain file. You should add it to your domain file! action=finalize_plan event_key=validator.verify_flows_steps_against_domain.action_not_in_domain flow=defect_remediation step=1_finalize_plan

Here ‘finalize_plan’ is not an action. It is a child flow. So why is the verifier assuming it is an action??

Figured it out! Looks like you have to put the child flows first BEFORE the parent flow

The order of flow definitions does not affect the trained model.

flows:
  defect_remediation:
    description: This flow helps users remediate identity defects
    steps:
      - action: finalize_scope
      - action: finalize_plan
      - action: execute_plan

The action steps in the flow correspond to either custom actions or utterances, which need to be defined in your domain.