We have a use case where we have our workflow definitions stored in a database and would like to use Temporal to execute them. Since they’re in a database, that requires that they be retrieved in a Temporal Activity. In order to execute them, we would have to have the Activity kick off a Workflow. Is this supported?
Activity can host any code including a code that starts workflows using WorkflowClient. But in your case, I would recommend passing your workflow definition Id as a parameter to the workflow. Then assuming that the definition is immutable you can share it across all the workflow instances on that host. This would avoid passing large DSL documents as activity or workflow arguments.
See Java DSL Sample that uses that pattern.