SubFlows

SubFlow in cosmocloud provides modular approach to build reusable piece of flow. It helps you to build a piece of code once and plug it in existing flow.

Create SubFlow

  • Navigate to Application Layer -> SubFlows in your Cosmocloud project.

  • Click on Create SubFlow button

  • Add your SubFlow name as well as add the Arguments your SubFlow will receive from the calling Flow (an API or other SubFlow).

Understanding Arguments

  • Toggle : This is used to mark if argument is required or optional

  • Argument key : argument name to be received

  • Argument type : It specify what type of value is expected

  • Default : It specify default value if user didn't enter value. (optional)

How to use SubFlow

SubFlow in cosmocloud is an isolated component which means every value that you want to access in SubFlow needs to passed as an argument.

Understanding SubFlow node

  • To execute this SubFlow in an existing API, you can use Execute SubFlow node

  • You need to select the SubFlow which you need to execute and also pass required arguments.

  • Arguments will be passed in as keys and values. These values are case sensitive so make sure enter correct terms.

Last updated