4.1

Table Of Contents
Setting Action Parameters in a URL
You pass input parameters to the action by setting the actionParameters property in the URL. Depending on
the action, you might need to declare the input parameters for the action as Web view attributes. If the action
parameters are Web view attributes, you must prefix the Web view attribute name of the parameter with
attribute:, as the following example shows.
http://
orchestrator_server
:8280/vmo/
web_view_url_folder
/system/execute/action/action.html?
action=
action_attribute_name
&actionParameters=attribute:
parameter_attribute_name
&actionParameters
=
parameter_value
Writing Action Results to a File
You can use a URL to run an action that returns its results as a MimeAttachment file. You provide the name and
type of the file to which to write the results in the URL. You must define the action to run as a Web view
attribute.
Web views access actions that you have defined as Web view attributes and obtain their results as
MimeAttachment files at the following URL:
http://
orchestrator_server
:8280/vmo/
web_view_url_folder
/system/execute/action/
action_attribute_name
/
filename
.
file_extension
?actionParameters=
parameter_value
&mimetype=
mime_type
The
filename
.
file_extension
file you specify for the output file can be any type of file. If you set the optional
mimeType property, the file type must be a valid MimeAttachment file, for example an EML or PDF file.
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/execute/action/generateReport/annualReport.pdf?actionParameters="Annual
Report"&mimetype=application/pdf"></a>
The preceding example URL performs the following tasks:
n
Runs an action that you have declared as the Web view attribute generateReport, which returns a
MimeAttachment object.
n
Creates a PDF file called annualReport.pdf
n
Returns the PDF file
Run an Action from a URL
You can add URLs to Web view pages to run actions in the Orchestrator server. Running actions by using
direct URLs rather than by using Web view components allows you to specify the parameters with which to
run the action in the URL, and allows you to provide your own formatting to the action results.
Prerequisites
You have created a Web view in the Orchestrator client and have Web view page in which to insert a URL to
run an action.
Procedure
1 In the Web views view of the Orchestrator client, right-click the Web view to which to add the URL and
select Edit.
You must unpublish a running Web view to edit it.
2 Right-click in the Attributes tab of the Web view editor and select Add attribute.
3 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.
Chapter 9 Developing Web Views
VMware, Inc. 311