Symptoms
After deploying a workflow that uses Document Set wizards and attempting to initiate the workflow manually, the following error is observed:
Cannot invoke method or retrieve property from null object. Object returned by the following call stack is null. "File "
(Alternative error message: A Document Set cannot be used in this context. Retry the operation on a Document in the Document Set.)
Diagnoses
The Document Set wizards within the workflow designer must reference a document within a document set (within a document set library), instead of the document set itself. The workflow in question was being initiated within the context of the document set, so an error was being thrown.
Resolution
Workflows utilizing the Document Set wizards must be designed to reference a document within the set in order to properly execute. When setting up a document set reference or filtering to a specific document set, use properties of a specific document, instead of the document set in which it is contained.