Generic plv8 function to generate a documents workflow from its source document
For example create Sales Order WF from Sales Type WF / create Quality Test WF from
Quality Plan WF
Merge pull request #1935 from andersdd/workflow_func

Generic plv8 function to generate a documents workflow from its source doc