Hi,
i am trying to execute an workflow through webservices development API for vCenter Orchestrator.
could you please advise me how can i pass a virtualy machine of typ VC:VirtualMachine as an input param through API.
right now i am doing it in this way and its giving error on workflow side "invalid vm parameter"
please advise
FinderResult finderResult =
vmo.findForId("VC:VirtualMachine", "aspvc.ap.vspp/vm-199",username, password);
WorkflowTokenAttribute[] inputParameters =
new WorkflowTokenAttribute[workflow.getInParameters().length];
// in our workflow, we only have one parameter. inputParameters[0] =
new WorkflowTokenAttribute(); inputParameters[0].setName(workflow.getInParameters()[0].getName()); inputParameters[0].setType(workflow.getInParameters()[0].getType());
// and put our serialized Virtual Machines values
// #{#finderResult.getType() +#+finderResult.getDunesUri()+#}#
inputParameters[0].setValue(" #{#VC:VirtualMachine#dunes://service.dunes.ch/CustomSDKObject?id='aspvc.ap.vspp/vm-199'&dunesName='VC:VirtualMachine'#}#")
// Now, start the workflow. Here, we don't need to wait the workflow ends
vmo.executeWorkflow(workflow.getId(), username, password
, inputParameters);