oracle工作流错误,工作流错误处理 - Oracle® ZFS Storage Appliance 客户服务手册
工作流錯誤處理
如果在執(zhí)行工作流期間發(fā)生錯誤,則會引發(fā)異常。如果異常未由工作流自身所捕獲(或者如果工作流引發(fā)的異常未以其他方式捕獲),則工作流將失敗,并向用戶顯示有關異常的信息。要正確處理錯誤,應該捕獲并處理異常。例如,在前面的示例中,嘗試在不存在的項目中創(chuàng)建共享資源會導致未捕獲的異常。此示例可以修改以捕獲違例錯誤,并在項目不存在的情況下創(chuàng)建該項目:
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) {
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);
run('commit');
run('shares select ' + params.unit);
}
run('filesystem ' + params.name);
run('commit');
return ('Created new share "' + params.name + '"');
}
};
總結
以上是生活随笔為你收集整理的oracle工作流错误,工作流错误处理 - Oracle® ZFS Storage Appliance 客户服务手册的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: bootstrap 学习网址
- 下一篇: 深度学习笔记2:关于LSTM神经网络输入