EasyManua.ls Logo

Oracle ZFS Storage Appliance

Oracle ZFS Storage Appliance
650 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Optional Workflow Parameters
EXAMPLE 21
Using the Workflow ChooseOne Parameter
Using the ChooseOne parameter type, we can enhance the previous example to limit the
business unit to be one of a small number of predefined values:
var workflow = {
name: 'Create share',
description: 'Creates a new share in a business unit',
parameters: {
name: {
label: 'Name of new share',
type: 'String'
},
unit: {
label: 'Business unit',
type: 'ChooseOne',
options: [ 'development', 'finance', 'qa', 'sales' ],
optionlabels: [ 'Development', 'Finance',
'Quality Assurance', 'Sales/Administrative' ],
}
},
execute: function (params) {
run('shares select ' + params.unit);
run('filesystem ' + params.name);
run('commit');
return ('Created new share "' + params.name + '"');
}
};
When this workflow is executed, the unit parameter will not be entered by hand -- it will be
selected from the specified list of possible options.
Optional Workflow Parameters
Some parameters may be considered optional in that the UI should not mandate that these
parameters are set to any value to allow execution of the workflow. Such a parameter is denoted
via the optional field of the parameters member:
TABLE 129
Required Members for Optional Parameters
Optional Member Type Description
optional
Boolean
If set to true, denotes that the
parameter need not be set; the UI
may allow the workflow to be
Maintenance Workflows 591

Table of Contents

Other manuals for Oracle ZFS Storage Appliance

Related product manuals