VMware Cloud Community
jmgriffes
Enthusiast
Enthusiast
Jump to solution

Changing Default Web View in vCenter Orchestrator

I have been dev testing vCenter Orchestrator for BYU and have been running into an issue. I recently ran through a tutorial posted on the vCO team's website (http://www.vcoteam.info/learn-vco/create-a-simple-vco-self-service-vm-provisioning-portal-part-2.html). I also created a Web View that I can customize myself (as you can't do this to weboperator).

The problem I'm running into is this. I run through MY CUSTOM web view to run a workflow (in this case to provision a VM), and it e-mails the request to my e-mail account. Upon clicking to review and approve the request, it automatically tries to call the weboperator web view (which I do not have published, and don't want to have published).

What I would like to know is how to have Orchestrator call MY web view for these interactions, as I intend to do quite a bit of customization on my web view.

Thanks!

0 Kudos
1 Solution

Accepted Solutions
Burke-
VMware Employee
VMware Employee
Jump to solution

Part 3 of our series has been published today and walks you step by step through the process.

Visit me at for vCenter Orchestrator tips and tutorials Smiley Happy

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter

View solution in original post

0 Kudos
4 Replies
Burke-
VMware Employee
VMware Employee
Jump to solution

Hello jmgriffes,

I'm happy to see you finding our blog informative. I'm currently in the process of writing part 3 of this article which focuses on what you have started on your own. I will be addressing your request in particular as part of the article (hope to be completed within the few days.) If you wish to attempt to resolve this on your own, I can point you in a general direction (but my article will have step-by-step instructions.) In general, you need to duplicate the "Send Interaction" workflow, then modify the Script within your customised version to do a search and replace on the "urlAnswer" string. The search will be for vmo/weboperator/webform.html, and the replace will be /vmo/YourWebview/yourForm.html.

If you are able to wait for my article to be completed and published, you may be better off... however, I encourage you to continue working with it on your own if needed.

Visit me at for vCenter Orchestrator tips and tutorials Smiley Happy

Message was edited by: Burke-updated time frame of part 3 of article.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos
Burke-
VMware Employee
VMware Employee
Jump to solution

Let me go ahead and give you a headstart... in your custom "Send notification" workflow, the top part of your scripting box should be changed to the following:

<pre>

var message = new EmailMessage();

var urlAnswer = workflow.getAnswerUrl().url ;

urlAnswer = urlAnswer.replace(new RegExp("weboperator", "g"),webviewName);

urlAnswer = urlAnswer.replace(new RegExp("webform.html", "g"),formFile);

content = "<p>You may respond to the request via the web interface by clicking the link below: <a href=\"" urlAnswer "\">CLICK HERE TO RESPOND VIA WEB</a>.</p>"+"<p> " content "</p>";

// Override default settings if and only if input parameter is set

</pre>

Note, that from the // Override default settings... line down should remain untouched. In order for the content above to work, you will need to add two custom Inputs/Attributes to your custom Send Notification workflow:

webviewName (String) -- set this value to the name of your custom webview folder

formFile (String) -- set this value to the name of your custom form.html file - in my tutorial, I place the form.html in the root of my custom webview folder. The content of the form.html file is pretty simple:

<pre>

<vco jwcid="@layout/MyBorder" section="literal: home" title="Request VM">

<vco jwcid="@vmo:WebformContainer" />

</vco>

</pre>

Note that in the code above, you will want to change "@layout/MyBorder" to match what you have specified as your own border file.

The resulting link in the e-mail generated should take you right to the workflow interaction Smiley Happy

Good Luck!

Visit me at for vCenter Orchestrator tips and tutorials Smiley Happy

Message was edited by: Burke- It looks like the forum software doesn't like some of the HTML code and doesn't care much for the

tags -- hopefully you get the idea...

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
Burke-
VMware Employee
VMware Employee
Jump to solution

Part 3 of our series has been published today and walks you step by step through the process.

Visit me at for vCenter Orchestrator tips and tutorials Smiley Happy

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos
jmgriffes
Enthusiast
Enthusiast
Jump to solution

First, thank you so much for posting an answer to this question. I figured there had to be a way to do it, but was rather at a loss as to how to procede. Props to you for finding and answering my question.

Also, I noticed you hadn't included a direct link to it, so for anyone who's interested:

0 Kudos