If a nested workflow has some of its input ports not connected in the parent workflow, the execution of that nested workflow will never finish.
In some cases this is because the workflow is waiting for data on the disconnected port, but even with such execution paths not leading to a workflow output port, the execution never finishes.
When executing a workflow in the workbench, if an input port is not filled in from the Run dialogue, we insert an Error Document instead. This ensures completion of the workflow, and for the path where no input was provided, typically error documents will flow instead.
The suggestion is to also provide such error documents when a nested workflow is executed, so the DataflowActivity will fill in any missing input ports with such error documents (of correct depth).
In this way, a nested workflow can also be said to support optional input ports.