I would like to build a workflow that creates a new workflow.
We have a need for a workflow to prompt the user for a large number of values of different types - strings, securestrings, REST:RESTHost, etc.). We would then save these values in Config Element attributes. The list of values that we need to prompt for can change over time and I don't want to have to manually hand-code the inputs and types in the workflow designer.
Ideally, I would like to have a workflow that we could run during development that would iterate over the set of Config Elements and their attributes, determine their name, type, and description, and create a new workflow that would have all those attributes as inputs, of the proper type, hooked up to a task that writes them into their respective attributes. Hope that makes sense. I can do the iteration over the config elements and the writing of values back in - I just can't figure out how to create a workflow programatically.
I see that there is a workflow under HTTP-REST called Generate a new workflow from a REST operation. I ran this and it indeed created a new workflow with an input and a scriptable task with code to make the REST call. Very cool but all of that magic is hidden behind the REST plug-in (I think) and I can't really figure out how it does it.
I also thought about writing some sort of text file representation of a workflow but didn't get very far on that. I know there is Maven that is used for version control of packages but I'm not totally clear on whether that would be a good route to take - and I'd rather avoid extra tools if possible.
Is there a way to do this?
Thanks.
Currently, there is no public scripting API to create workflows.
Few vRO plug-ins (HTTP-REST, DynamicTypes, etc.) are able to create new workflows using Java API, but this API is internal and not available in the public SDK.
Currently, there is no public scripting API to create workflows.
Few vRO plug-ins (HTTP-REST, DynamicTypes, etc.) are able to create new workflows using Java API, but this API is internal and not available in the public SDK.
Thanks for the reply.