Workflow Execution Auditing and Reporting
try {
run('shares select ' + params.unit);
run('select ' + params.name);
} catch (err) {
if (err.code == EAKSH_ENTITY_BADSELECT)
return;
}
return ({ name: 'share already exists' });
},
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);
}
run('filesystem ' + params.name);
run('commit');
return ('Created new share "' + params.name + '"');
}
};
Workflow Execution Auditing and Reporting
Workflows may emit audit records by calling the audit function. The audit function's only
argument is a string that is to be placed into the audit log.
For complicated workflows that may require some time to execute, it can be useful to provide
clear progress to the user executing the workflow. To allow the execution of a workflow to be
reported in this way, the execute member should return an array of steps. Each array element
must contain the following members:
594
Oracle ZFS Storage Appliance Administration Guide, Release OS8.6.x • September 2016
Need help?
Do you have a question about the ZFS Storage Appliance and is the answer not in the manual?
Questions and answers