Workflows can certainly be invoked by workflows. Each workflow is associated with a Class and optionally an Event on that Class. To start a workflow, you either invoke the class event that the workflow is associated with (on an instance of that class), or call (SysWorkflow’start with the appropriate parameters.
; Starts a named flow for a given instance.
; @param object The instance for which to start the flow.
; @param name The flow name.
; @param global True to instantiate a unique flow for the instance.
; @return The flow instance.
So to call a “sub” workflow from a “parent” workflow, all you need to do is call (this’start… or (this’myEvent in a script step. The “sub” workflow that you called or triggered with myEvent will then start in parallel.
If you want to synchronize the workflows and pass control back to the parent it is a bit more complicated, but not by much. It just means you need to put a wait state in the “parent” and trigger that wait state from the child (potentially with a correlation id argument, if deemed necessary) when it is done.