Running actions from URLs rather than by implementing Web view components allows you to run operations directly in the Orchestrator server without requiring any input parameters from the Web view user. Running actions from URLs also allows you to define how to process the action results.

When you run a workflow from a Web view component, the Web view prompts you for input parameters before it runs. Web view components also apply formatting to any data they receive from the server. If you retrieve objects from the server from a URL rather than from a Web view component, you can apply your own formatting or processing to the data that the URL retrieves.

For example, certain actions return JavaScript Object Notation (JSON) data. If you call such an action from a URL in a Web view, you can write Ajax functions to process and format the action results. Similarly, if the action returns an object from the Orchestrator server, you can write JavaScript functions to act on this object in the Web view.

To run an action from a URL in a Web view, you must declare that action as a Web view attribute and reference the attribute in the URL.

Web views access actions that you have defined as Web view attributes at the following URL:

https://orchestrator_server:8280/vco/vmo/web_view_url_folder/system/execute/action/action.html?
action=action_attribute_name

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/action.html?action=attribute_name"></a>

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.

https://orchestrator_server:8280/vco/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:

https://orchestrator_server:8280/vco/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:

  • Runs an action that you have declared as the Web view attribute generateReport, which returns a MimeAttachment object.

  • Creates a PDF file called annualReport.pdf

  • Returns the PDF file