I'm wondering is it possible to have tokens outputs created dynamically when running a Run Script Rule activity? It looks like all of the outputs need to be defined in the Workflow Designer explicitly even though in the script I can return whatever I want.
Essentially what I want to do is dynamically determine metadata for a document and assign these values as fields to the document.
On a similar note, is there any way to assign the fields to a document dynamically? Looks like they need to be created up front.
Currently, I need to create a separate Run Script Rule with explicit outputs for each document type, and with a separate workflow for each assign field values to fields that are already created.
The only way I see to do this all dynamically is by using the SDK in the script, creating fields if they don't exist and assigning values to the fields in the script. The only reason I don't want to do this is because I wanted the script to be more flexible allowing users to do what they wanted with the dynamic fields in the workflow.
So, I take it my options are either 1. Dynamically do everything through script or 2. Statically define everything through multiple script rules and multiple workflows.