Oracle ZFS Storage Appliance Administration Manual page 595

Hide thumbs Also See for ZFS Storage Appliance:
Table of Contents

Advertisement

Required Members for Execution Reporting
TABLE 130
Required Member
step
execute
As with the execute function on the workflow as a whole, the execute member of each step
takes as its argument an object that contains the parameters to the workflow.
EXAMPLE 24
Workflow Execution Reporting
As an example, the following is a workflow that creates a new project, share, and audit record
over three steps:
var steps = [ {
step: 'Checking for associated project',
execute: function (params) {
try {
run('shares select ' + params.unit);
} catch (err) {
if (err.code != EAKSH_ENTITY_BADSELECT)
throw (err);
/*
* We haven't yet created a project that corresponds to
* this business unit; create it now.
*/
run('shares project ' + params.unit);
set('mountpoint', '/export/' + params.unit);
run('commit');
run('shares select ' + params.unit);
}
}
}, {
step: 'Creating share',
execute: function (params) {
run('filesystem ' + params.name);
run('commit');
}
}, {
step: 'Creating audit record',
execute: function (params) {
audit('created "' + params.name + '" in "' + params.unit);
}
} ];
Type
String
Function
Workflow Execution Auditing and Reporting
Description
String that denotes the name of the
execution step
Function that executes the step of the
workflow
Maintenance Workflows
595

Advertisement

Table of Contents
loading

Table of Contents