@nocobase/plugin-workflow-notification 2.0.0-alpha.5 → 2.0.0-alpha.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/NotificationInstruction.d.ts +6 -0
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +4 -4
- package/dist/locale/de-DE.json +4 -3
- package/dist/locale/en-US.json +3 -0
- package/dist/locale/es-ES.json +7 -0
- package/dist/locale/fr-FR.json +7 -0
- package/dist/locale/hu-HU.json +7 -0
- package/dist/locale/id-ID.json +7 -0
- package/dist/locale/it-IT.json +4 -1
- package/dist/locale/ja-JP.json +7 -0
- package/dist/locale/ko-KR.json +7 -0
- package/dist/locale/nl-NL.json +5 -2
- package/dist/locale/pt-BR.json +7 -0
- package/dist/locale/ru-RU.json +7 -0
- package/dist/locale/tr-TR.json +7 -0
- package/dist/locale/uk-UA.json +7 -0
- package/dist/locale/vi-VN.json +7 -0
- package/dist/locale/zh-CN.json +4 -1
- package/dist/locale/zh-TW.json +7 -0
- package/dist/server/NotificationInstruction.d.ts +7 -1
- package/dist/server/NotificationInstruction.js +23 -22
- package/package.json +5 -2
|
@@ -19,6 +19,12 @@ export default class extends Instruction {
|
|
|
19
19
|
type: string;
|
|
20
20
|
'x-component': string;
|
|
21
21
|
};
|
|
22
|
+
ignoreFail: {
|
|
23
|
+
type: string;
|
|
24
|
+
'x-content': string;
|
|
25
|
+
'x-decorator': string;
|
|
26
|
+
'x-component': string;
|
|
27
|
+
};
|
|
22
28
|
};
|
|
23
29
|
components: {
|
|
24
30
|
LocalProvider: () => React.JSX.Element;
|
package/dist/client/index.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("@nocobase/plugin-notification-manager/client"),require("@ant-design/icons"),require("@nocobase/client"),require("@nocobase/plugin-workflow/client"),require("react-i18next")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-notification",["react","@nocobase/plugin-notification-manager/client","@ant-design/icons","@nocobase/client","@nocobase/plugin-workflow/client","react-i18next"],e):"object"==typeof exports?exports["@nocobase/plugin-workflow-notification"]=e(require("react"),require("@nocobase/plugin-notification-manager/client"),require("@ant-design/icons"),require("@nocobase/client"),require("@nocobase/plugin-workflow/client"),require("react-i18next")):t["@nocobase/plugin-workflow-notification"]=e(t.react,t["@nocobase/plugin-notification-manager/client"],t["@ant-design/icons"],t["@nocobase/client"],t["@nocobase/plugin-workflow/client"],t["react-i18next"])}(self,function(t,e,n,o,r,i){return function(){"use strict";var c={482:function(t){t.exports=n},772:function(t){t.exports=o},786:function(t){t.exports=e},433:function(t){t.exports=r},156:function(e){e.exports=t},238:function(t){t.exports=i}},u={};function a(t){var e=u[t];if(void 0!==e)return e.exports;var n=u[t]={exports:{}};return c[t](n,n.exports,a),n.exports}a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},a.d=function(t,e){for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var f={};return!function(){a.r(f),a.d(f,{default:function(){return j}});var t=a(772),e=a(156),n=a.n(e),o=a(482),r=a(433),i=a(786);a(238);var c="workflow-notification";function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}var b=function(){var t=(0,r.useWorkflowVariableOptions)();return n().createElement(i.MessageConfigForm,{variableOptions:t})},y=function(t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");function e(){var t,r,i;if(!(this instanceof e))throw TypeError("Cannot call a class as a function");return r=e,i=arguments,r=l(r),u(t=function(t,e){var n;if(e&&("object"==((n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof e))return e;if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(this,p()?Reflect.construct(r,i||[],l(this).constructor):r.apply(this,i)),"title",'{{t("Notification", { ns: "'.concat(c,'" })}}')),u(t,"type","notification"),u(t,"group","extended"),u(t,"description",'{{t("Send notification. You can use the variables in the upstream nodes as content and ohter config.", { ns: "'.concat(c,'" })}}')),u(t,"icon",n().createElement(o.NotificationOutlined,null)),u(t,"fieldset",{message:{type:"void","x-component":"LocalProvider"}}),u(t,"components",{LocalProvider:b}),u(t,"testable",!0),t}return e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t),e}(r.Instruction);function d(t,e,n,o,r,i,c){try{var u=t[i](c),a=u.value}catch(t){n(t);return}u.done?e(a):Promise.resolve(a).then(o,r)}function v(t){return function(){var e=this,n=arguments;return new Promise(function(o,r){var i=t.apply(e,n);function c(t){d(i,o,r,c,u,"next",t)}function u(t){d(i,o,r,c,u,"throw",t)}c(void 0)})}}function h(t,e,n){return(h=
|
|
10
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("@nocobase/plugin-notification-manager/client"),require("@ant-design/icons"),require("@nocobase/client"),require("@nocobase/plugin-workflow/client"),require("react-i18next")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-notification",["react","@nocobase/plugin-notification-manager/client","@ant-design/icons","@nocobase/client","@nocobase/plugin-workflow/client","react-i18next"],e):"object"==typeof exports?exports["@nocobase/plugin-workflow-notification"]=e(require("react"),require("@nocobase/plugin-notification-manager/client"),require("@ant-design/icons"),require("@nocobase/client"),require("@nocobase/plugin-workflow/client"),require("react-i18next")):t["@nocobase/plugin-workflow-notification"]=e(t.react,t["@nocobase/plugin-notification-manager/client"],t["@ant-design/icons"],t["@nocobase/client"],t["@nocobase/plugin-workflow/client"],t["react-i18next"])}(self,function(t,e,n,o,r,i){return function(){"use strict";var c={482:function(t){t.exports=n},772:function(t){t.exports=o},786:function(t){t.exports=e},433:function(t){t.exports=r},156:function(e){e.exports=t},238:function(t){t.exports=i}},u={};function a(t){var e=u[t];if(void 0!==e)return e.exports;var n=u[t]={exports:{}};return c[t](n,n.exports,a),n.exports}a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},a.d=function(t,e){for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var f={};return!function(){a.r(f),a.d(f,{default:function(){return j}});var t=a(772),e=a(156),n=a.n(e),o=a(482),r=a(433),i=a(786);a(238);var c="workflow-notification";function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}var b=function(){var t=(0,r.useWorkflowVariableOptions)();return n().createElement(i.MessageConfigForm,{variableOptions:t})},y=function(t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");function e(){var t,r,i;if(!(this instanceof e))throw TypeError("Cannot call a class as a function");return r=e,i=arguments,r=l(r),u(t=function(t,e){var n;if(e&&("object"==((n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof e))return e;if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(this,p()?Reflect.construct(r,i||[],l(this).constructor):r.apply(this,i)),"title",'{{t("Notification", { ns: "'.concat(c,'" })}}')),u(t,"type","notification"),u(t,"group","extended"),u(t,"description",'{{t("Send notification. You can use the variables in the upstream nodes as content and ohter config.", { ns: "'.concat(c,'" })}}')),u(t,"icon",n().createElement(o.NotificationOutlined,null)),u(t,"fieldset",{message:{type:"void","x-component":"LocalProvider"},ignoreFail:{type:"boolean","x-content":'{{t("Ignore failure and continue workflow", { ns: "'.concat(c,'" })}}'),"x-decorator":"FormItem","x-component":"Checkbox"}}),u(t,"components",{LocalProvider:b}),u(t,"testable",!0),t}return e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t),e}(r.Instruction);function d(t,e,n,o,r,i,c){try{var u=t[i](c),a=u.value}catch(t){n(t);return}u.done?e(a):Promise.resolve(a).then(o,r)}function v(t){return function(){var e=this,n=arguments;return new Promise(function(o,r){var i=t.apply(e,n);function c(t){d(i,o,r,c,u,"next",t)}function u(t){d(i,o,r,c,u,"throw",t)}c(void 0)})}}function h(t,e,n){return(h=x()?Reflect.construct:function(t,e,n){var o=[null];o.push.apply(o,e);var r=new(Function.bind.apply(t,o));return n&&w(r,n.prototype),r}).apply(null,arguments)}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function w(t,e){return(w=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function m(t){var e="function"==typeof Map?new Map:void 0;return(m=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return h(t,arguments,g(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),w(n,t)})(t)}function x(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(x=function(){return!!t})()}function O(t,e){var n,o,r,i,c={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var a=[i,u];if(n)throw TypeError("Generator is already executing.");for(;c;)try{if(n=1,o&&(r=2&a[0]?o.return:a[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;switch(o=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return c.label++,{value:a[1],done:!1};case 5:c.label++,o=a[1],a=[0];continue;case 7:a=c.ops.pop(),c.trys.pop();continue;default:if(!(r=(r=c.trys).length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){c=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){c.label=a[1];break}if(6===a[0]&&c.label<r[1]){c.label=r[1],r=a;break}if(r&&c.label<r[2]){c.label=r[2],c.ops.push(a);break}r[2]&&c.ops.pop(),c.trys.pop();continue}a=e.call(t,c)}catch(t){a=[6,t],o=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}}var j=function(t){var e;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");function n(){var t,e;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,e=arguments,t=g(t),function(t,e){var n;if(e&&("object"==((n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof e))return e;if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(this,x()?Reflect.construct(t,e||[],g(this).constructor):t.apply(this,e))}return n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&w(n,t),e=[{key:"afterAdd",value:function(){return v(function(){return O(this,function(t){return[2]})})()}},{key:"beforeLoad",value:function(){return v(function(){return O(this,function(t){return[2]})})()}},{key:"load",value:function(){var t=this;return v(function(){return O(this,function(e){return t.app.pm.get("workflow").registerInstruction("notification",y),[2]})})()}}],function(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}(n.prototype,e),n}(m(t.Plugin))}(),f}()});
|
package/dist/externalVersion.js
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
"react": "18.2.0",
|
|
12
12
|
"@ant-design/icons": "5.6.1",
|
|
13
|
-
"@nocobase/plugin-workflow": "2.0.0-alpha.
|
|
14
|
-
"@nocobase/plugin-notification-manager": "2.0.0-alpha.
|
|
15
|
-
"@nocobase/client": "2.0.0-alpha.
|
|
13
|
+
"@nocobase/plugin-workflow": "2.0.0-alpha.50",
|
|
14
|
+
"@nocobase/plugin-notification-manager": "2.0.0-alpha.50",
|
|
15
|
+
"@nocobase/client": "2.0.0-alpha.50",
|
|
16
16
|
"react-i18next": "11.18.6",
|
|
17
|
-
"@nocobase/server": "2.0.0-alpha.
|
|
17
|
+
"@nocobase/server": "2.0.0-alpha.50"
|
|
18
18
|
};
|
package/dist/locale/de-DE.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Ignore failed sending and continue workflow": "Fehlgeschlagenen Versand ignorieren und Workflow fortsetzen",
|
|
3
|
+
"Ignore failure and continue workflow": "Ignore failure and continue workflow",
|
|
2
4
|
"Notification": "Benachrichtigung",
|
|
3
|
-
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "Benachrichtigung senden. Sie können die Variablen in den vorgelagerten Knoten als Inhalt und andere Konfiguration verwenden.",
|
|
4
5
|
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "E-Mail senden durch Aufruf des SMTP-Dienstes. Sie können die Variablen in den vorgelagerten Knoten als Empfänger, Betreff und Inhalt der E-Mail verwenden.",
|
|
5
|
-
"
|
|
6
|
-
}
|
|
6
|
+
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "Benachrichtigung senden. Sie können die Variablen in den vorgelagerten Knoten als Inhalt und andere Konfiguration verwenden."
|
|
7
|
+
}
|
package/dist/locale/en-US.json
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Ignore failed sending and continue workflow": "Ignore failed sending and continue workflow",
|
|
3
|
+
"Ignore failure and continue workflow": "Ignore failure and continue workflow",
|
|
2
4
|
"Notification": "Notification",
|
|
5
|
+
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "Send email by calling SMTP service. You can use the variables in the upstream nodes as receivers, subject and content of the email.",
|
|
3
6
|
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "Send notification. You can use the variables in the upstream nodes as content and ohter config."
|
|
4
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Ignore failed sending and continue workflow": "Ignore failed sending and continue workflow",
|
|
3
|
+
"Ignore failure and continue workflow": "Ignore failure and continue workflow",
|
|
4
|
+
"Notification": "Notification",
|
|
5
|
+
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "Send email by calling SMTP service. You can use the variables in the upstream nodes as receivers, subject and content of the email.",
|
|
6
|
+
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "Send notification. You can use the variables in the upstream nodes as content and ohter config."
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Ignore failed sending and continue workflow": "Ignore failed sending and continue workflow",
|
|
3
|
+
"Ignore failure and continue workflow": "Ignore failure and continue workflow",
|
|
4
|
+
"Notification": "Notification",
|
|
5
|
+
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "Send email by calling SMTP service. You can use the variables in the upstream nodes as receivers, subject and content of the email.",
|
|
6
|
+
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "Send notification. You can use the variables in the upstream nodes as content and ohter config."
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Ignore failed sending and continue workflow": "Sikertelen küldés figyelmen kívül hagyása és a munkafolyamat folytatása",
|
|
3
|
+
"Ignore failure and continue workflow": "Ignore failure and continue workflow",
|
|
4
|
+
"Notification": "Értesítés",
|
|
5
|
+
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "E-mail küldése SMTP szolgáltatás hívásával. A felsőbb csomópontokban lévő változókat használhatja a címzettek, tárgy és e-mail tartalom értékeiként.",
|
|
6
|
+
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "Értesítés küldése. A felsőbb csomópontokban lévő változókat használhatja tartalomként és egyéb konfigurációként."
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Ignore failed sending and continue workflow": "Abaikan pengiriman yang gagal dan lanjutkan alur kerja",
|
|
3
|
+
"Ignore failure and continue workflow": "Ignore failure and continue workflow",
|
|
4
|
+
"Notification": "Notifikasi",
|
|
5
|
+
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "Kirim email dengan memanggil layanan SMTP. Anda dapat menggunakan variabel di node hulu sebagai penerima, subjek, dan konten email.",
|
|
6
|
+
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "Kirim notifikasi. Anda dapat menggunakan variabel di node hulu sebagai konten dan konfigurasi lainnya."
|
|
7
|
+
}
|
package/dist/locale/it-IT.json
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Ignore failed sending and continue workflow": "Ignore failed sending and continue workflow",
|
|
3
|
+
"Ignore failure and continue workflow": "Ignore failure and continue workflow",
|
|
2
4
|
"Notification": "Notifiche",
|
|
5
|
+
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "Send email by calling SMTP service. You can use the variables in the upstream nodes as receivers, subject and content of the email.",
|
|
3
6
|
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "Invia notifica. Puoi usare le variabili nei nodi upstream come contenuto e altre configurazioni"
|
|
4
|
-
}
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Ignore failed sending and continue workflow": "送信失敗を無視してワークフローを継続",
|
|
3
|
+
"Ignore failure and continue workflow": "Ignore failure and continue workflow",
|
|
4
|
+
"Notification": "通知",
|
|
5
|
+
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "SMTPサービスを呼び出してメールを送信。上流ノードの変数を宛先・件名・本文として使用可能です。",
|
|
6
|
+
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "通知を送信。上流ノードの変数を通知内容やその他の設定として使用可能です。"
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Ignore failed sending and continue workflow": "전송 실패 시 무시하고 워크플로 계속",
|
|
3
|
+
"Ignore failure and continue workflow": "Ignore failure and continue workflow",
|
|
4
|
+
"Notification": "알림",
|
|
5
|
+
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "SMTP 서비스를 호출하여 이메일을 보냅니다. 상위 노드의 변수를 수신자, 제목, 내용으로 사용할 수 있습니다.",
|
|
6
|
+
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "알림을 보냅니다. 상위 노드의 변수를 내용 및 기타 설정에 사용할 수 있습니다."
|
|
7
|
+
}
|
package/dist/locale/nl-NL.json
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
"Ignore failed sending and continue workflow": "Ignore failed sending and continue workflow",
|
|
3
|
+
"Ignore failure and continue workflow": "Ignore failure and continue workflow",
|
|
4
|
+
"Notification": "Notification",
|
|
5
|
+
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "Send email by calling SMTP service. You can use the variables in the upstream nodes as receivers, subject and content of the email.",
|
|
6
|
+
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "Send notification. You can use the variables in the upstream nodes as content and ohter config."
|
|
4
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Ignore failed sending and continue workflow": "Ignore failed sending and continue workflow",
|
|
3
|
+
"Ignore failure and continue workflow": "Ignore failure and continue workflow",
|
|
4
|
+
"Notification": "Notification",
|
|
5
|
+
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "Send email by calling SMTP service. You can use the variables in the upstream nodes as receivers, subject and content of the email.",
|
|
6
|
+
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "Send notification. You can use the variables in the upstream nodes as content and ohter config."
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Ignore failed sending and continue workflow": "Игнорировать неудачную отправку и продолжить рабочий процесс",
|
|
3
|
+
"Ignore failure and continue workflow": "Ignore failure and continue workflow",
|
|
4
|
+
"Notification": "Уведомление",
|
|
5
|
+
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "Отправить email, вызвав SMTP-сервис. Вы можете использовать переменные из предыдущих узлов в качестве получателей, темы и содержания письма.",
|
|
6
|
+
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "Отправить уведомление. Вы можете использовать переменные из предыдущих узлов в качестве содержания и других настроек."
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Ignore failed sending and continue workflow": "Ignore failed sending and continue workflow",
|
|
3
|
+
"Ignore failure and continue workflow": "Ignore failure and continue workflow",
|
|
4
|
+
"Notification": "Notification",
|
|
5
|
+
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "Send email by calling SMTP service. You can use the variables in the upstream nodes as receivers, subject and content of the email.",
|
|
6
|
+
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "Send notification. You can use the variables in the upstream nodes as content and ohter config."
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Ignore failed sending and continue workflow": "Ignore failed sending and continue workflow",
|
|
3
|
+
"Ignore failure and continue workflow": "Ignore failure and continue workflow",
|
|
4
|
+
"Notification": "Notification",
|
|
5
|
+
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "Send email by calling SMTP service. You can use the variables in the upstream nodes as receivers, subject and content of the email.",
|
|
6
|
+
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "Send notification. You can use the variables in the upstream nodes as content and ohter config."
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Ignore failed sending and continue workflow": "Bỏ qua gửi thất bại và tiếp tục quy trình",
|
|
3
|
+
"Ignore failure and continue workflow": "Ignore failure and continue workflow",
|
|
4
|
+
"Notification": "Thông báo",
|
|
5
|
+
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "Gửi email bằng cách gọi dịch vụ SMTP. Bạn có thể sử dụng các biến trong các nút phía trước làm người nhận, chủ đề và nội dung của email.",
|
|
6
|
+
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "Gửi thông báo. Bạn có thể sử dụng các biến trong các nút phía trước làm nội dung và cấu hình khác."
|
|
7
|
+
}
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Ignore failed sending and continue workflow": "Ignore failed sending and continue workflow",
|
|
3
|
+
"Ignore failure and continue workflow": "忽略失败并继续工作流",
|
|
2
4
|
"Notification": "通知",
|
|
5
|
+
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "Send email by calling SMTP service. You can use the variables in the upstream nodes as receivers, subject and content of the email.",
|
|
3
6
|
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "发送通知。您可以使用上游节点中的变量作为通知的内容和其他配置。"
|
|
4
|
-
}
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Ignore failed sending and continue workflow": "Ignore failed sending and continue workflow",
|
|
3
|
+
"Ignore failure and continue workflow": "Ignore failure and continue workflow",
|
|
4
|
+
"Notification": "Notification",
|
|
5
|
+
"Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.": "Send email by calling SMTP service. You can use the variables in the upstream nodes as receivers, subject and content of the email.",
|
|
6
|
+
"Send notification. You can use the variables in the upstream nodes as content and ohter config.": "Send notification. You can use the variables in the upstream nodes as content and ohter config."
|
|
7
|
+
}
|
|
@@ -8,7 +8,13 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { Processor, Instruction, FlowNodeModel } from '@nocobase/plugin-workflow';
|
|
10
10
|
export default class extends Instruction {
|
|
11
|
-
run(node: FlowNodeModel, prevJob: any, processor: Processor): Promise<
|
|
11
|
+
run(node: FlowNodeModel, prevJob: any, processor: Processor): Promise<{
|
|
12
|
+
status: 1 | -1;
|
|
13
|
+
result: any;
|
|
14
|
+
} | {
|
|
15
|
+
status: 1 | -2;
|
|
16
|
+
result: any;
|
|
17
|
+
}>;
|
|
12
18
|
resume(node: FlowNodeModel, job: any, processor: Processor): Promise<any>;
|
|
13
19
|
test(config: any): Promise<{
|
|
14
20
|
status: 1;
|
|
@@ -43,11 +43,12 @@ var import_plugin_notification_manager = __toESM(require("@nocobase/plugin-notif
|
|
|
43
43
|
var import_plugin_workflow = require("@nocobase/plugin-workflow");
|
|
44
44
|
class NotificationInstruction_default extends import_plugin_workflow.Instruction {
|
|
45
45
|
async run(node, prevJob, processor) {
|
|
46
|
-
const
|
|
46
|
+
const { ignoreFail, ...config } = node.config;
|
|
47
|
+
const options = processor.getParsedValue(config, node.id);
|
|
47
48
|
const scope = processor.getScope(node.id);
|
|
48
49
|
const sendParams = {
|
|
49
50
|
channelName: options.channelName,
|
|
50
|
-
message: { ...options, content:
|
|
51
|
+
message: { ...options, content: config.content },
|
|
51
52
|
triggerFrom: "workflow",
|
|
52
53
|
data: scope
|
|
53
54
|
};
|
|
@@ -64,51 +65,51 @@ class NotificationInstruction_default extends import_plugin_workflow.Instruction
|
|
|
64
65
|
};
|
|
65
66
|
} else {
|
|
66
67
|
return {
|
|
67
|
-
status: import_plugin_workflow.JOB_STATUS.FAILED,
|
|
68
|
+
status: ignoreFail ? import_plugin_workflow.JOB_STATUS.RESOLVED : import_plugin_workflow.JOB_STATUS.FAILED,
|
|
68
69
|
result
|
|
69
70
|
};
|
|
70
71
|
}
|
|
71
72
|
} catch (error) {
|
|
72
73
|
return {
|
|
73
|
-
status: import_plugin_workflow.JOB_STATUS.
|
|
74
|
+
status: ignoreFail ? import_plugin_workflow.JOB_STATUS.RESOLVED : import_plugin_workflow.JOB_STATUS.ERROR,
|
|
74
75
|
result: error
|
|
75
76
|
};
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
|
-
const
|
|
79
|
+
const { id } = processor.saveJob({
|
|
79
80
|
status: import_plugin_workflow.JOB_STATUS.PENDING,
|
|
80
81
|
nodeId: node.id,
|
|
81
82
|
nodeKey: node.key,
|
|
82
83
|
upstreamId: (prevJob == null ? void 0 : prevJob.id) ?? null
|
|
83
84
|
});
|
|
84
|
-
|
|
85
|
+
await processor.exit();
|
|
86
|
+
const jobDone = { status: import_plugin_workflow.JOB_STATUS.PENDING };
|
|
87
|
+
try {
|
|
88
|
+
processor.logger.info(`notification (#${node.id}) sent, waiting for response...`);
|
|
89
|
+
const result = await notificationServer.send(sendParams);
|
|
85
90
|
if (result.status === "success") {
|
|
86
91
|
processor.logger.info(`notification (#${node.id}) sent successfully.`);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
result
|
|
90
|
-
});
|
|
92
|
+
jobDone.status = import_plugin_workflow.JOB_STATUS.RESOLVED;
|
|
93
|
+
jobDone.result = result;
|
|
91
94
|
} else {
|
|
92
95
|
processor.logger.info(`notification (#${node.id}) sent failed.`);
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
result
|
|
96
|
-
});
|
|
96
|
+
jobDone.status = ignoreFail ? import_plugin_workflow.JOB_STATUS.RESOLVED : import_plugin_workflow.JOB_STATUS.FAILED;
|
|
97
|
+
jobDone.result = result;
|
|
97
98
|
}
|
|
98
|
-
}
|
|
99
|
+
} catch (error) {
|
|
99
100
|
processor.logger.warn(`notification (#${node.id}) sent failed: ${error.message}`);
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
jobDone.status = ignoreFail ? import_plugin_workflow.JOB_STATUS.RESOLVED : import_plugin_workflow.JOB_STATUS.FAILED;
|
|
102
|
+
jobDone.result = error;
|
|
103
|
+
} finally {
|
|
104
|
+
const job = await this.workflow.app.db.getRepository("jobs").findOne({
|
|
105
|
+
filterByTk: id
|
|
103
106
|
});
|
|
104
|
-
|
|
107
|
+
job.set(jobDone);
|
|
105
108
|
processor.logger.debug(`notification (#${node.id}) sending ended, resume workflow...`);
|
|
106
109
|
setImmediate(() => {
|
|
107
110
|
this.workflow.resume(job);
|
|
108
111
|
});
|
|
109
|
-
}
|
|
110
|
-
processor.logger.info(`notification (#${node.id}) sent, waiting for response...`);
|
|
111
|
-
return processor.exit();
|
|
112
|
+
}
|
|
112
113
|
}
|
|
113
114
|
async resume(node, job, processor) {
|
|
114
115
|
return job;
|
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-workflow-notification",
|
|
3
3
|
"displayName": "Workflow: notification node",
|
|
4
|
+
"displayName.ru-RU": "Рабочий процесс: Узел уведомлений",
|
|
4
5
|
"displayName.zh-CN": "工作流:通知节点",
|
|
5
6
|
"description": "Send notification in workflow.",
|
|
7
|
+
"description.ru-RU": "Отправляет уведомления в рамках рабочего процесса.",
|
|
6
8
|
"description.zh-CN": "可用于在工作流中发送各类通知。",
|
|
7
|
-
"version": "2.0.0-alpha.
|
|
9
|
+
"version": "2.0.0-alpha.50",
|
|
8
10
|
"license": "AGPL-3.0",
|
|
9
11
|
"main": "./dist/server/index.js",
|
|
10
12
|
"homepage": "https://docs.nocobase.com/handbook/workflow-smtp-mailer",
|
|
13
|
+
"homepage.ru-RU": "https://docs-ru.nocobase.com/handbook/workflow-smtp-mailer",
|
|
11
14
|
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/workflow-smtp-mailer",
|
|
12
15
|
"devDependencies": {
|
|
13
16
|
"antd": "5.x",
|
|
@@ -23,5 +26,5 @@
|
|
|
23
26
|
"keywords": [
|
|
24
27
|
"Workflow"
|
|
25
28
|
],
|
|
26
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "a6eb64abf3632e116ad0b295a7f410270a1059d1"
|
|
27
30
|
}
|