I noticed that the "Relocate VM" workflow as shipped with vCO 4.0 is broken. A simple workflow that includes it and nothing else results in:
Cannot convert ch.dunes.model.sdk.FinderResult@19adc90 to com.vmware.vim.vi4.VirtualMachineRelocateTransformation (Workflow:Relocate VM / Relocate VM (item0)#5)
I took a look at its implementation and made a new workflow consisting of the same two elements (a scriptable task and vim3WaitTaskEnd), but changed the scriptable task to use:
/* begin script */
var my_transform = VcVirtualMachineRelocateTransformation.fromString(dst_transform.name);
var relocateSpec = new VcVirtualMachineRelocateSpec();
relocateSpec.datastore = dst_datastore.reference;
relocateSpec.disk = null;
relocateSpec.host = dst_host.reference;
relocateSpec.pool = dst_pool.reference;
relocateSpec.transform = my_transform;
var priority = VcVirtualMachineMovePriority.fromString(dst_priority.name);
var task = vm.relocateVM_Task(relocateSpec, priority);
/*end script */
I had to add an extra input for 'priority' as well.
I recall encountering a few other default workflows in the past that don't work - I believe the one that corresponds to VMotion of a running guest needs a similar fixup.