VMware Cloud Community
Danco74
Enthusiast
Enthusiast

Email interactions

Hey guys,

I'm looking for a way to interact with vRO via emails.

For example, sending approval message with links to accept/reject.

Is there a way to trigger an event with a simple URI?

0 Kudos
1 Reply
ChrisMueller85
Enthusiast
Enthusiast

There are several ways to implement such a solution.

The old way working in previous releases (generating an Answer url to the Orchestrator web interface and setting the workflow token to wait for a user input) wasn't really a well working solution.

Furthermore the Orchestrator web interface isn't existing anymore in current versions.

But the Orchestrator's strength is the interaction with other systems.

I would prefer one of the following roughly described solutions:

1) Sending a email with a link to a custom build website storing the answer within a database. Orchestrator can look scheduled into the database for new answers.

2) Sending a email with a link to a custom build website starting an second Orchestrator workflow over a rest call.

Both solutions having the advantage that you have not running workflows in you Orchestrators which may never been answered. And of course you can fully customize the look of the answer Url.

Here is a code samples for starting a Orchestrator workflow from a classic ASP website over SOAP (Used in my company... beware the SOAP interface is deprecated). I think this could be easily adopted to other languages or you may find such samples in the wides of the internet.

<%@Language="VBScript" CodePage = 65001 %>

<%

     Set http = CreateObject("Microsoft.XmlHttp")

     Set xml = CreateObject("Microsoft.XMLDOM")

     url = "https://{your-orchestrator}:8281/vco/vmware-vmo-webcontrol/webservice"

     soap = "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:web=""http://webservice.vso.dunes.ch""><soapenv:Header/><soapenv:Body><web:executeWorkflow><web:workflowId>8796e06d-dbd4-4992-a3d6-a6571e05555d</web:workflowId><web:username>vcouser</web:username><web:password>{your_password}</web:password><web:workflowInputs><web:name>id</web:name><web:type>String</web:type><web:value>" & Request.Form("id") & "</web:value></web:workflowInputs></web:executeWorkflow></soapenv:Body></soapenv:Envelope>"

     http.open "POST", url, FALSE

     http.setRequestHeader "SOAPAction", "executeWorkflow"

     http.send soap

     xml.async = "false"

     xml.loadXml(http.responseText)

     Set node = xml.selectSingleNode("/soapenv:Envelope/soapenv:Body/executeWorkflowResponse/executeWorkflowReturn/id")

     Response.Write "OK:" & node.text

%>

0 Kudos