Having a task type of “workflow” would enable the Morpheus workflow engine to execute nested sub-workflows.
Potentially, choosing the workflow name in the task, would bring up a form with the workflow inputs for the chosen workflow. Being able to to consume <%= variables %> in the form inputs would further make it more dynamic and enable the sub-workflow to inherit values from the parent workflow.
This would be ideal for scenarios where operational workflows, that contain bits of common logic, can be re-used during provision time phases. For example, a “create CMDB entry” workflow might contain tasks like:
- Get API token
- Check existing and raise error
- Insert entry
- Release token
This logic could be captured in a workflow, then the workflow gets added to the parent workflow to avoid repetition and lengthy workflows.