Reusable Flows - SubFlows
Last updated
Last updated
Many a times we need a common business logic to be implemented in multiple APIs and places, and we do not want to build this common logic from scratch every single time.
That's where come into the picture, allowing you to define your custom common logic just once and then reuse it in multiple APIs or other SubFlows (just like a reusable function).
You can build SubFlows in Cosmocloud, which accepts multiple arguments and can return a single JSON object - you can use different keys in the JSON object to return multiple objects at once.
You can then use the Execute SubFlow
node in Cosmocloud's Flow Builder, to call any created SubFlow in the system. You can also pass your arguments to this SubFlow call, as mentioned in the SubFlow documentation.