5.5

Table Of Contents
4 Create a Web view attribute, of type Action with the value set to the action of your choice.
For example, name the Web view attribute MyAction.
5 Create Web view attributes for each of the input parameters that the action requires.
For example, name a Web view attribute ActionParameterAttribute.
6 Click Save and close to exit the Web view editor.
7 Open the HTML page in which to insert the URL in an HTML editor.
8 Add a link to https://orchestrator_server:
8280/vco/vmo/web_view_url_folder/system/vmo/pages/action.html at the appropriate place in the
HTML file.
Add a relative link to the action URL, that starts below the Web view URL folder value, rather than
hard-coding the address of the Orchestrator server in the URL, as the following example shows:
<a href="./system/vmo/pages/action.html?action=myAction
&actionParameters=attribute:ActionParameterAttribute
&actionParameters=action_parameter_value">
Click here to run an action</a>
The URL uses the Web view attributes you set in the Orchestrator client to start the action myAction and
to set the ActionParameterAttributeparameter. The second parameter, ActionParameterValue, is not a
Web view attribute so you add the parameter value directly in the URL.
You added a link to run an action from a URL. When users click the link in the published Web view, the
action runs with the parameters you reference in the URL. JavaScript functions that you define can process
the results of running the action.
Accessing Resource Elements from URLs
Workflows and Web views can require as attributes objects that you create independently of Orchestrator.
To use external objects as attributes in workflows or Web views, you import them into the Orchestrator
server as resource elements.
You can add URLs to Web view pages to retrieve resource elements from the Orchestrator server. You can
then add JavaScript functions to the Web view to process the resource elements. To access a resource
element from a URL in a Web view, you must declare that resource element as a Web view attribute and
reference the attribute in the URL.
Web views access resource elements at the following URL:
https://orchestrator_server:
8280/vco/vmo/web_view_url_folder/system/resources/attributes/resource_attribute_name.att
To avoid hard-coding the orchestrator_server address into the URL, you can provide relative paths to the
action that start from the directory below the Web view URL folder, as the following path shows:
<a href="./system/resources/attributes/resource_attribute_name.att"></a>
Obtain a Resource Element from a URL
Resource elements are files that are imported into the Orchestrator server for use by Orchestrator
applications. By accessing a resource element from a URL in a Web view, you make that resource element
available to processing that you define in the Web view.
Objects that workflows and Web views can use as resource elements include image files, scripts, XML
templates, HTML files, and so on. Any workflows or Web views that run in the Orchestrator server can use
any resource elements that you import into Orchestrator.
Chapter 7 Accessing Server Objects from URLs
VMware, Inc. 45