@nocobase/plugin-workflow 2.2.0-alpha.7 → 2.2.0-alpha.9
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/509.88792f5bd054b2af.js +10 -0
- package/dist/client/67.56a3d15a55ab7d5c.js +10 -0
- package/dist/client/719.f011fde3ad54571e.js +10 -0
- package/dist/client/782.47792ce10fc0d5fb.js +10 -0
- package/dist/client/{828.78ff0c90212276c0.js → 828.6880ab21513b1968.js} +1 -1
- package/dist/client/972.dd7f074d5f12e171.js +10 -0
- package/dist/client/index.js +1 -1
- package/dist/client-v2/142.a8c8df2a9abb43c5.js +10 -0
- package/dist/client-v2/276.7f746d899e221e2f.js +10 -0
- package/dist/client-v2/{387.fd0a379e808b069f.js → 387.5e61d648d16dbf1b.js} +1 -1
- package/dist/client-v2/513.617697f74783a611.js +10 -0
- package/dist/client-v2/635.14a6f21cf4f16345.js +10 -0
- package/dist/client-v2/677.7382807126d9621a.js +10 -0
- package/dist/client-v2/canvas/Node.d.ts +2 -2
- package/dist/client-v2/canvas/WorkflowTypedVariableInput.d.ts +1 -1
- package/dist/client-v2/components/FilterDynamicComponent.d.ts +2 -1
- package/dist/client-v2/index.js +1 -1
- package/dist/client-v2/pages/WorkflowFormDrawer.d.ts +1 -0
- package/dist/common/collections/workflows.d.ts +1 -3
- package/dist/common/collections/workflows.js +3 -3
- package/dist/externalVersion.js +13 -13
- package/dist/locale/de-DE.json +2 -0
- package/dist/locale/en-US.json +3 -0
- package/dist/locale/es-ES.json +2 -0
- package/dist/locale/fr-FR.json +2 -0
- package/dist/locale/hu-HU.json +2 -0
- package/dist/locale/id-ID.json +2 -0
- package/dist/locale/it-IT.json +2 -0
- package/dist/locale/ja-JP.json +2 -0
- package/dist/locale/ko-KR.json +2 -0
- package/dist/locale/nl-NL.json +2 -0
- package/dist/locale/pt-BR.json +2 -0
- package/dist/locale/ru-RU.json +2 -0
- package/dist/locale/tr-TR.json +2 -0
- package/dist/locale/uk-UA.json +2 -0
- package/dist/locale/vi-VN.json +2 -0
- package/dist/locale/zh-CN.json +3 -0
- package/dist/locale/zh-TW.json +2 -0
- package/dist/node_modules/cron-parser/package.json +1 -1
- package/dist/node_modules/joi/package.json +1 -1
- package/dist/node_modules/lru-cache/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/server/Dispatcher.d.ts +3 -2
- package/dist/server/Dispatcher.js +37 -17
- package/dist/server/Plugin.d.ts +1 -1
- package/dist/server/actions/workflows.js +12 -2
- package/dist/server/migrations/20260713000000-remove-workflow-validation.d.ts +13 -0
- package/dist/server/migrations/20260713000000-remove-workflow-validation.js +56 -0
- package/dist/server/triggers/CollectionTrigger.d.ts +1 -1
- package/dist/server/triggers/CollectionTrigger.js +3 -0
- package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.d.ts +1 -1
- package/dist/server/triggers/index.d.ts +1 -1
- package/dist/server/types/Workflow.d.ts +1 -1
- package/dist/server/utils.d.ts +1 -1
- package/dist/server/utils.js +14 -1
- package/dist/swagger/index.d.ts +1 -0
- package/dist/swagger/index.js +4 -2
- package/package.json +2 -2
- package/dist/client/509.e8d543f308a5823c.js +0 -10
- package/dist/client/67.ea0c78153b4842ef.js +0 -10
- package/dist/client/719.cd8ca7c9f00584be.js +0 -10
- package/dist/client/782.e058403fcb6b1750.js +0 -10
- package/dist/client/972.600a190e71978122.js +0 -10
- package/dist/client-v2/142.fe4f9b7869876ff1.js +0 -10
- package/dist/client-v2/276.8ca10542a0424df3.js +0 -10
- package/dist/client-v2/513.19fe2e75d7cb18f8.js +0 -10
- package/dist/client-v2/635.20680bb5710698d0.js +0 -10
- package/dist/client-v2/677.a8c841cd3c3a6f7d.js +0 -10
package/dist/externalVersion.js
CHANGED
|
@@ -11,33 +11,33 @@ module.exports = {
|
|
|
11
11
|
"react": "18.2.0",
|
|
12
12
|
"@formily/core": "2.3.7",
|
|
13
13
|
"@formily/react": "2.3.7",
|
|
14
|
-
"@nocobase/client": "2.2.0-alpha.
|
|
15
|
-
"@nocobase/utils": "2.2.0-alpha.
|
|
14
|
+
"@nocobase/client": "2.2.0-alpha.9",
|
|
15
|
+
"@nocobase/utils": "2.2.0-alpha.9",
|
|
16
16
|
"antd": "5.24.2",
|
|
17
17
|
"@ant-design/icons": "5.6.1",
|
|
18
|
-
"@nocobase/flow-engine": "2.2.0-alpha.
|
|
18
|
+
"@nocobase/flow-engine": "2.2.0-alpha.9",
|
|
19
19
|
"ahooks": "3.7.8",
|
|
20
20
|
"react-router-dom": "6.30.1",
|
|
21
21
|
"react-i18next": "11.18.6",
|
|
22
22
|
"lodash": "4.18.1",
|
|
23
23
|
"@dnd-kit/core": "6.1.0",
|
|
24
24
|
"@formily/shared": "2.3.7",
|
|
25
|
-
"@nocobase/plugin-mobile": "2.2.0-alpha.
|
|
26
|
-
"@nocobase/client-v2": "2.2.0-alpha.
|
|
25
|
+
"@nocobase/plugin-mobile": "2.2.0-alpha.9",
|
|
26
|
+
"@nocobase/client-v2": "2.2.0-alpha.9",
|
|
27
27
|
"sequelize": "6.35.2",
|
|
28
|
-
"@nocobase/server": "2.2.0-alpha.
|
|
29
|
-
"@nocobase/database": "2.2.0-alpha.
|
|
30
|
-
"@nocobase/data-source-manager": "2.2.0-alpha.
|
|
31
|
-
"@nocobase/logger": "2.2.0-alpha.
|
|
32
|
-
"@nocobase/evaluators": "2.2.0-alpha.
|
|
28
|
+
"@nocobase/server": "2.2.0-alpha.9",
|
|
29
|
+
"@nocobase/database": "2.2.0-alpha.9",
|
|
30
|
+
"@nocobase/data-source-manager": "2.2.0-alpha.9",
|
|
31
|
+
"@nocobase/logger": "2.2.0-alpha.9",
|
|
32
|
+
"@nocobase/evaluators": "2.2.0-alpha.9",
|
|
33
33
|
"@formily/antd-v5": "1.2.3",
|
|
34
34
|
"@formily/reactive": "2.3.7",
|
|
35
35
|
"@emotion/css": "11.13.0",
|
|
36
36
|
"@formily/json-schema": "2.3.7",
|
|
37
37
|
"antd-style": "3.7.1",
|
|
38
38
|
"dayjs": "1.11.13",
|
|
39
|
-
"@nocobase/actions": "2.2.0-alpha.
|
|
40
|
-
"@nocobase/plugin-workflow-test": "2.2.0-alpha.
|
|
41
|
-
"@nocobase/test": "2.2.0-alpha.
|
|
39
|
+
"@nocobase/actions": "2.2.0-alpha.9",
|
|
40
|
+
"@nocobase/plugin-workflow-test": "2.2.0-alpha.9",
|
|
41
|
+
"@nocobase/test": "2.2.0-alpha.9",
|
|
42
42
|
"@dnd-kit/sortable": "7.0.2"
|
|
43
43
|
};
|
package/dist/locale/de-DE.json
CHANGED
|
@@ -254,7 +254,9 @@
|
|
|
254
254
|
"When no condition matches": "When no condition matches",
|
|
255
255
|
"Will be executed in the background as a queued task.": "Wird im Hintergrund als Aufgabe in der Warteschlange ausgeführt.",
|
|
256
256
|
"Workflow": "Workflow",
|
|
257
|
+
"Workflow not executed": "Workflow nicht ausgeführt",
|
|
257
258
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow ausgeführt, der Ergebnisstatus ist <1>{{statusText}}</1><2>Ausführung anzeigen</2>",
|
|
259
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "Der Workflow wurde nicht ausgelöst, weil die aktuelle Anfrage die Auslöseanforderungen nicht erfüllt.",
|
|
258
260
|
"Workflow of execution is not existed": "Workflow of execution is not existed",
|
|
259
261
|
"Workflow tasks": "Workflow tasks",
|
|
260
262
|
"Workflow todos": "Workflow-Aufgaben",
|
package/dist/locale/en-US.json
CHANGED
|
@@ -279,9 +279,12 @@
|
|
|
279
279
|
"When no condition matches": "When no condition matches",
|
|
280
280
|
"Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
|
|
281
281
|
"Workflow": "Workflow",
|
|
282
|
+
"This workflow has configuration issues and may not work properly.": "This workflow has configuration issues and may not work properly.",
|
|
282
283
|
"Workflow title": "Workflow title",
|
|
283
284
|
"Workflow canvas editor is being migrated to the new UI.": "Workflow canvas editor is being migrated to the new UI.",
|
|
285
|
+
"Workflow not executed": "Workflow not executed",
|
|
284
286
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
|
|
287
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "Workflow was not triggered because the current request did not meet the trigger requirements.",
|
|
285
288
|
"Workflow of execution is not existed": "Workflow of execution is not existed",
|
|
286
289
|
"Workflow tasks": "Workflow tasks",
|
|
287
290
|
"Workflow todos": "Workflow todos",
|
package/dist/locale/es-ES.json
CHANGED
|
@@ -254,7 +254,9 @@
|
|
|
254
254
|
"When no condition matches": "When no condition matches",
|
|
255
255
|
"Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
|
|
256
256
|
"Workflow": "Flujo de trabajo",
|
|
257
|
+
"Workflow not executed": "Flujo de trabajo no ejecutado",
|
|
257
258
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
|
|
259
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "El flujo de trabajo no se activó porque la solicitud actual no cumplió los requisitos del desencadenador.",
|
|
258
260
|
"Workflow of execution is not existed": "Workflow of execution is not existed",
|
|
259
261
|
"Workflow tasks": "Workflow tasks",
|
|
260
262
|
"Workflow todos": "Workflow todos",
|
package/dist/locale/fr-FR.json
CHANGED
|
@@ -254,7 +254,9 @@
|
|
|
254
254
|
"When no condition matches": "When no condition matches",
|
|
255
255
|
"Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
|
|
256
256
|
"Workflow": "Workflow",
|
|
257
|
+
"Workflow not executed": "Workflow non exécuté",
|
|
257
258
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
|
|
259
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "Le workflow n’a pas été déclenché, car la requête actuelle ne répond pas aux exigences du déclencheur.",
|
|
258
260
|
"Workflow of execution is not existed": "Workflow of execution is not existed",
|
|
259
261
|
"Workflow tasks": "Workflow tasks",
|
|
260
262
|
"Workflow todos": "Workflow todos",
|
package/dist/locale/hu-HU.json
CHANGED
|
@@ -254,7 +254,9 @@
|
|
|
254
254
|
"When no condition matches": "When no condition matches",
|
|
255
255
|
"Will be executed in the background as a queued task.": "A háttérben sorba állított feladatként kerül végrehajtásra.",
|
|
256
256
|
"Workflow": "Munkafolyamat",
|
|
257
|
+
"Workflow not executed": "A munkafolyamat nem lett végrehajtva",
|
|
257
258
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Munkafolyamat végrehajtva, az eredmény állapota: <1>{{statusText}}</1><2>Végrehajtás megtekintése</2>",
|
|
259
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "A munkafolyamat nem indult el, mert az aktuális kérés nem felelt meg az indítási feltételeknek.",
|
|
258
260
|
"Workflow is not exists": "Workflow is not exists",
|
|
259
261
|
"Workflow tasks": "Workflow tasks",
|
|
260
262
|
"Workflow todos": "Munkafolyamat teendők",
|
package/dist/locale/id-ID.json
CHANGED
|
@@ -254,7 +254,9 @@
|
|
|
254
254
|
"When no condition matches": "When no condition matches",
|
|
255
255
|
"Will be executed in the background as a queued task.": "Akan dieksekusi di latar belakang sebagai tugas antrean.",
|
|
256
256
|
"Workflow": "Alur kerja",
|
|
257
|
+
"Workflow not executed": "Alur kerja tidak dieksekusi",
|
|
257
258
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Alur kerja dieksekusi, status hasilnya adalah <1>{{statusText}}</1><2>Lihat eksekusi</2>",
|
|
259
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "Alur kerja tidak dipicu karena permintaan saat ini tidak memenuhi persyaratan pemicu.",
|
|
258
260
|
"Workflow is not exists": "Workflow is not exists",
|
|
259
261
|
"Workflow tasks": "Workflow tasks",
|
|
260
262
|
"Workflow todos": "Tugas alur kerja",
|
package/dist/locale/it-IT.json
CHANGED
|
@@ -254,7 +254,9 @@
|
|
|
254
254
|
"When no condition matches": "When no condition matches",
|
|
255
255
|
"Will be executed in the background as a queued task.": "Verrà eseguito in background come attività in coda.",
|
|
256
256
|
"Workflow": "Workflow",
|
|
257
|
+
"Workflow not executed": "Workflow non eseguito",
|
|
257
258
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow eseguito, lo stato del risultato è <1>{{statusText}}</1><2>Visualizza l'esecuzione</2>",
|
|
259
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "Il workflow non è stato attivato perché la richiesta corrente non soddisfa i requisiti del trigger.",
|
|
258
260
|
"Workflow of execution is not existed": "Workflow of execution is not existed",
|
|
259
261
|
"Workflow tasks": "Workflow tasks",
|
|
260
262
|
"Workflow todos": "Da fare",
|
package/dist/locale/ja-JP.json
CHANGED
|
@@ -256,7 +256,9 @@
|
|
|
256
256
|
"When no condition matches": "When no condition matches",
|
|
257
257
|
"Will be executed in the background as a queued task.": "キュータスクとしてバックグラウンドで実行されます。",
|
|
258
258
|
"Workflow": "ワークフロー",
|
|
259
|
+
"Workflow not executed": "ワークフローは実行されませんでした",
|
|
259
260
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "ワークフローが実行されました。結果ステータス: <1>{{statusText}}</1><2>実行詳細を表示</2>",
|
|
261
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "現在のリクエストがトリガー要件を満たしていないため、ワークフローはトリガーされませんでした。",
|
|
260
262
|
"Workflow of execution is not existed": "Workflow of execution is not existed",
|
|
261
263
|
"Workflow tasks": "Workflow tasks",
|
|
262
264
|
"Workflow todos": "ワークフロー対応事項",
|
package/dist/locale/ko-KR.json
CHANGED
|
@@ -272,7 +272,9 @@
|
|
|
272
272
|
"When no condition matches": "When no condition matches",
|
|
273
273
|
"Will be executed in the background as a queued task.": "백그라운드에서 대기 작업으로 실행됩니다.",
|
|
274
274
|
"Workflow": "워크플로우",
|
|
275
|
+
"Workflow not executed": "워크플로우가 실행되지 않았습니다",
|
|
275
276
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "워크플로우가 실행되었습니다. 결과 상태는 <1>{{statusText}}</1><2>실행 보기</2>",
|
|
277
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "현재 요청이 트리거 요구 사항을 충족하지 않아 워크플로우가 트리거되지 않았습니다.",
|
|
276
278
|
"Workflow of execution is not existed": "Workflow of execution is not existed",
|
|
277
279
|
"Workflow tasks": "Workflow tasks",
|
|
278
280
|
"Workflow todos": "워크플로우 할 일",
|
package/dist/locale/nl-NL.json
CHANGED
|
@@ -254,7 +254,9 @@
|
|
|
254
254
|
"When no condition matches": "When no condition matches",
|
|
255
255
|
"Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
|
|
256
256
|
"Workflow": "Workflow",
|
|
257
|
+
"Workflow not executed": "Workflow niet uitgevoerd",
|
|
257
258
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
|
|
259
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "De workflow is niet geactiveerd omdat de huidige aanvraag niet aan de triggervereisten voldoet.",
|
|
258
260
|
"Workflow of execution is not existed": "Workflow of execution is not existed",
|
|
259
261
|
"Workflow tasks": "Workflow tasks",
|
|
260
262
|
"Workflow todos": "Workflow todos",
|
package/dist/locale/pt-BR.json
CHANGED
|
@@ -254,7 +254,9 @@
|
|
|
254
254
|
"When no condition matches": "When no condition matches",
|
|
255
255
|
"Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
|
|
256
256
|
"Workflow": "Fluxo de trabalho",
|
|
257
|
+
"Workflow not executed": "Fluxo de trabalho não executado",
|
|
257
258
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
|
|
259
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "O workflow não foi acionado porque a solicitação atual não atende aos requisitos do gatilho.",
|
|
258
260
|
"Workflow of execution is not existed": "Workflow of execution is not existed",
|
|
259
261
|
"Workflow tasks": "Workflow tasks",
|
|
260
262
|
"Workflow todos": "Workflow todos",
|
package/dist/locale/ru-RU.json
CHANGED
|
@@ -254,7 +254,9 @@
|
|
|
254
254
|
"When no condition matches": "When no condition matches",
|
|
255
255
|
"Will be executed in the background as a queued task.": "Будет выполнен в фоновом режиме как задача в очереди.",
|
|
256
256
|
"Workflow": "Рабочий процесс",
|
|
257
|
+
"Workflow not executed": "Рабочий процесс не выполнен",
|
|
257
258
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Рабочий процесс выполнен, статус результата: <1>{{statusText}}</1><2>Посмотреть выполнение</2>",
|
|
259
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "Рабочий процесс не был запущен, так как текущий запрос не соответствует требованиям триггера.",
|
|
258
260
|
"Workflow of execution is not existed": "Workflow of execution is not existed",
|
|
259
261
|
"Workflow tasks": "Workflow tasks",
|
|
260
262
|
"Workflow todos": "Задачи рабочего процесса",
|
package/dist/locale/tr-TR.json
CHANGED
|
@@ -254,7 +254,9 @@
|
|
|
254
254
|
"When no condition matches": "When no condition matches",
|
|
255
255
|
"Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
|
|
256
256
|
"Workflow": "İş Akışı",
|
|
257
|
+
"Workflow not executed": "İş akışı yürütülmedi",
|
|
257
258
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
|
|
259
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "Geçerli istek tetikleme gereksinimlerini karşılamadığı için iş akışı tetiklenmedi.",
|
|
258
260
|
"Workflow of execution is not existed": "Workflow of execution is not existed",
|
|
259
261
|
"Workflow tasks": "Workflow tasks",
|
|
260
262
|
"Workflow todos": "Workflow todos",
|
package/dist/locale/uk-UA.json
CHANGED
|
@@ -254,7 +254,9 @@
|
|
|
254
254
|
"When no condition matches": "When no condition matches",
|
|
255
255
|
"Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
|
|
256
256
|
"Workflow": "Workflow",
|
|
257
|
+
"Workflow not executed": "Робочий процес не виконано",
|
|
257
258
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
|
|
259
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "Робочий процес не було запущено, оскільки поточний запит не відповідає вимогам тригера.",
|
|
258
260
|
"Workflow of execution is not existed": "Workflow of execution is not existed",
|
|
259
261
|
"Workflow tasks": "Workflow tasks",
|
|
260
262
|
"Workflow todos": "Workflow todos",
|
package/dist/locale/vi-VN.json
CHANGED
|
@@ -254,7 +254,9 @@
|
|
|
254
254
|
"When no condition matches": "When no condition matches",
|
|
255
255
|
"Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
|
|
256
256
|
"Workflow": "Workflow",
|
|
257
|
+
"Workflow not executed": "Quy trình làm việc chưa được thực thi",
|
|
257
258
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
|
|
259
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "Quy trình làm việc không được kích hoạt vì yêu cầu hiện tại không đáp ứng các điều kiện kích hoạt.",
|
|
258
260
|
"Workflow is not exists": "Workflow is not exists",
|
|
259
261
|
"Workflow tasks": "Workflow tasks",
|
|
260
262
|
"Workflow todos": "Workflow todos",
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -287,9 +287,12 @@
|
|
|
287
287
|
"When no condition matches": "未满足任何条件时",
|
|
288
288
|
"Will be executed in the background as a queued task.": "将作为队列任务在后台执行。",
|
|
289
289
|
"Workflow": "工作流",
|
|
290
|
+
"This workflow has configuration issues and may not work properly.": "该工作流配置存在问题,可能无法正常使用",
|
|
290
291
|
"Workflow title": "工作流名称",
|
|
291
292
|
"Workflow canvas editor is being migrated to the new UI.": "工作流画布编辑器正在迁移到新版界面。",
|
|
293
|
+
"Workflow not executed": "工作流未执行",
|
|
292
294
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "工作流已执行,结果状态为 <1>{{statusText}}</1><2>查看执行详情</2>",
|
|
295
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "当前请求未满足触发要求,工作流未触发。",
|
|
293
296
|
"Workflow of execution is not existed": "执行计划对应的工作流不存在",
|
|
294
297
|
"Workflow tasks": "流程待办",
|
|
295
298
|
"Workflow todos": "流程待办",
|
package/dist/locale/zh-TW.json
CHANGED
|
@@ -257,7 +257,9 @@
|
|
|
257
257
|
"Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
|
|
258
258
|
"Workflow": "Workflow",
|
|
259
259
|
"Workflow title": "工作流名稱",
|
|
260
|
+
"Workflow not executed": "工作流未執行",
|
|
260
261
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
|
|
262
|
+
"Workflow was not triggered because the current request did not meet the trigger requirements.": "目前請求未滿足觸發要求,工作流未觸發。",
|
|
261
263
|
"Workflow of execution is not existed": "Workflow of execution is not existed",
|
|
262
264
|
"Workflow tasks": "Workflow tasks",
|
|
263
265
|
"Workflow todos": "Workflow todos",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2026-07-
|
|
1
|
+
{"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2026-07-16T13:02:54.958Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"joi","description":"Object schema validation","version":"17.13.3","repository":"git://github.com/hapijs/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause","_lastModified":"2026-07-
|
|
1
|
+
{"name":"joi","description":"Object schema validation","version":"17.13.3","repository":"git://github.com/hapijs/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause","_lastModified":"2026-07-16T13:02:54.726Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"11.3.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","prepare":"tshy && bash scripts/build.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig ./.tshy/esm.json ./src/*.ts","benchmark-results-typedoc":"bash scripts/benchmark-results-typedoc.sh","prebenchmark":"npm run prepare","benchmark":"make -C benchmark","preprofile":"npm run prepare","profile":"make -C benchmark profile","lint":"oxlint --fix src test","postsnap":"npm run lint","postlint":"npm run format"},"main":"./dist/commonjs/index.min.js","types":"./dist/commonjs/index.d.ts","tshy":{"esmDialects":["node","browser"],"exports":{"./raw":"./src/index.ts",".":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.min.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.min.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}},"selfLink":false},"repository":{"type":"git","url":"git+ssh://git@github.com/isaacs/node-lru-cache.git"},"devDependencies":{"benchmark":"^2.1.4","esbuild":"^0.25.9","marked":"^4.2.12","mkdirp":"^3.0.1","oxlint":"^1.58.0","oxlint-tsgolint":"^0.19.0","prettier":"^3.8.1","tap":"^21.6.3","tshy":"^4.1.1","typedoc":"^0.28.18"},"license":"BlueOak-1.0.0","files":["dist"],"engines":{"node":"20 || >=22"},"exports":{"./raw":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},".":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.min.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.min.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}},"type":"module","module":"./dist/esm/index.min.js","_lastModified":"2026-07-
|
|
1
|
+
{"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"11.3.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","prepare":"tshy && bash scripts/build.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig ./.tshy/esm.json ./src/*.ts","benchmark-results-typedoc":"bash scripts/benchmark-results-typedoc.sh","prebenchmark":"npm run prepare","benchmark":"make -C benchmark","preprofile":"npm run prepare","profile":"make -C benchmark profile","lint":"oxlint --fix src test","postsnap":"npm run lint","postlint":"npm run format"},"main":"./dist/commonjs/index.min.js","types":"./dist/commonjs/index.d.ts","tshy":{"esmDialects":["node","browser"],"exports":{"./raw":"./src/index.ts",".":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.min.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.min.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}},"selfLink":false},"repository":{"type":"git","url":"git+ssh://git@github.com/isaacs/node-lru-cache.git"},"devDependencies":{"benchmark":"^2.1.4","esbuild":"^0.25.9","marked":"^4.2.12","mkdirp":"^3.0.1","oxlint":"^1.58.0","oxlint-tsgolint":"^0.19.0","prettier":"^3.8.1","tap":"^21.6.3","tshy":"^4.1.1","typedoc":"^0.28.18"},"license":"BlueOak-1.0.0","files":["dist"],"engines":{"node":"20 || >=22"},"exports":{"./raw":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},".":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.min.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.min.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}},"type":"module","module":"./dist/esm/index.min.js","_lastModified":"2026-07-16T13:02:53.977Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"nodejs-snowflake","collaborators":["Utkarsh Srivastava <utkarsh@sagacious.dev>"],"description":"Generate time sortable 64 bits unique ids for distributed systems (inspired from twitter snowflake)","version":"2.0.1","license":"Apache 2.0","repository":{"type":"git","url":"https://github.com/utkarsh-pro/nodejs-snowflake.git"},"files":["nodejs_snowflake_bg.wasm","nodejs_snowflake.js","nodejs_snowflake.d.ts"],"main":"nodejs_snowflake.js","types":"nodejs_snowflake.d.ts","_lastModified":"2026-07-
|
|
1
|
+
{"name":"nodejs-snowflake","collaborators":["Utkarsh Srivastava <utkarsh@sagacious.dev>"],"description":"Generate time sortable 64 bits unique ids for distributed systems (inspired from twitter snowflake)","version":"2.0.1","license":"Apache 2.0","repository":{"type":"git","url":"https://github.com/utkarsh-pro/nodejs-snowflake.git"},"files":["nodejs_snowflake_bg.wasm","nodejs_snowflake.js","nodejs_snowflake.d.ts"],"main":"nodejs_snowflake.js","types":"nodejs_snowflake.d.ts","_lastModified":"2026-07-16T13:02:53.838Z"}
|
|
@@ -26,7 +26,7 @@ export type EventOptions = {
|
|
|
26
26
|
force?: boolean;
|
|
27
27
|
stack?: Array<number | string>;
|
|
28
28
|
parentExecutionId?: number | string;
|
|
29
|
-
onTriggerFail?:
|
|
29
|
+
onTriggerFail?: (workflow: WorkflowModel, context: object, options: EventOptions, error?: unknown) => void | Promise<void>;
|
|
30
30
|
[key: string]: any;
|
|
31
31
|
} & Transactionable;
|
|
32
32
|
export default class Dispatcher {
|
|
@@ -42,7 +42,7 @@ export default class Dispatcher {
|
|
|
42
42
|
readonly onQueueExecution: QueueEventOptions['process'];
|
|
43
43
|
setReady(ready: boolean): void;
|
|
44
44
|
getEventsCount(): number;
|
|
45
|
-
trigger(workflow: WorkflowModel, context: object, options?: EventOptions): void | Promise<Processor | null>;
|
|
45
|
+
trigger(workflow: WorkflowModel, context: object, options?: EventOptions): void | Promise<Processor | null | void>;
|
|
46
46
|
private saveEvent;
|
|
47
47
|
resume(job: JobModel): Promise<void>;
|
|
48
48
|
start(execution: ExecutionModel): Promise<void>;
|
|
@@ -51,6 +51,7 @@ export default class Dispatcher {
|
|
|
51
51
|
run(pending: Pending): Promise<void>;
|
|
52
52
|
private triggerSync;
|
|
53
53
|
private validateEvent;
|
|
54
|
+
private handleTriggerFail;
|
|
54
55
|
private createExecution;
|
|
55
56
|
private prepare;
|
|
56
57
|
private acquireExecution;
|
|
@@ -71,7 +71,7 @@ class Dispatcher {
|
|
|
71
71
|
if (!this.ready) {
|
|
72
72
|
logger.warn(`app is not ready, event of workflow ${workflow.id} will be ignored`);
|
|
73
73
|
logger.debug(`ignored event data:`, context);
|
|
74
|
-
return;
|
|
74
|
+
return this.handleTriggerFail(workflow, context, options, new Error("app is not ready"));
|
|
75
75
|
}
|
|
76
76
|
if (!options.force && !options.manually && !workflow.enabled) {
|
|
77
77
|
logger.warn(`workflow ${workflow.id} is not enabled, event will be ignored`);
|
|
@@ -88,7 +88,7 @@ class Dispatcher {
|
|
|
88
88
|
}
|
|
89
89
|
if (context == null) {
|
|
90
90
|
logger.warn(`workflow ${workflow.id} event data context is null, event will be ignored`);
|
|
91
|
-
return;
|
|
91
|
+
return this.handleTriggerFail(workflow, context, options, new Error("event context is null"));
|
|
92
92
|
}
|
|
93
93
|
if (options.manually || this.plugin.isWorkflowSync(workflow)) {
|
|
94
94
|
return this.triggerSync(workflow, context, options);
|
|
@@ -303,8 +303,15 @@ class Dispatcher {
|
|
|
303
303
|
}
|
|
304
304
|
return valid;
|
|
305
305
|
}
|
|
306
|
-
async
|
|
306
|
+
async handleTriggerFail(workflow, context, options, error) {
|
|
307
307
|
var _a;
|
|
308
|
+
try {
|
|
309
|
+
await ((_a = options.onTriggerFail) == null ? void 0 : _a.call(options, workflow, context, options, error));
|
|
310
|
+
} catch (triggerFailError) {
|
|
311
|
+
this.plugin.getLogger(workflow.id).error(`trigger failure callback failed`, { error: triggerFailError });
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
async createExecution(workflow, context, options) {
|
|
308
315
|
const { deferred } = options;
|
|
309
316
|
let stack = options.stack;
|
|
310
317
|
if (options.parentExecutionId && !stack) {
|
|
@@ -313,21 +320,34 @@ class Dispatcher {
|
|
|
313
320
|
});
|
|
314
321
|
stack = parentExecution ? [...parentExecution.stack ?? [], parentExecution.id] : [];
|
|
315
322
|
}
|
|
316
|
-
|
|
323
|
+
let valid;
|
|
324
|
+
try {
|
|
325
|
+
valid = await this.validateEvent(workflow, context, { ...options, stack });
|
|
326
|
+
} catch (error) {
|
|
327
|
+
await this.handleTriggerFail(workflow, context, options, error);
|
|
328
|
+
throw error;
|
|
329
|
+
}
|
|
317
330
|
if (!valid) {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
+
const error = new Error("event is not valid");
|
|
332
|
+
await this.handleTriggerFail(workflow, context, options, error);
|
|
333
|
+
throw error;
|
|
334
|
+
}
|
|
335
|
+
let execution;
|
|
336
|
+
try {
|
|
337
|
+
execution = await workflow.createExecution({
|
|
338
|
+
context,
|
|
339
|
+
key: workflow.key,
|
|
340
|
+
eventKey: options.eventKey ?? (0, import_node_crypto.randomUUID)(),
|
|
341
|
+
stack,
|
|
342
|
+
parentExecutionId: options.parentExecutionId ?? null,
|
|
343
|
+
dispatched: deferred ?? false,
|
|
344
|
+
status: deferred ? import_constants.EXECUTION_STATUS.STARTED : import_constants.EXECUTION_STATUS.QUEUEING,
|
|
345
|
+
manually: options.manually
|
|
346
|
+
});
|
|
347
|
+
} catch (error) {
|
|
348
|
+
await this.handleTriggerFail(workflow, context, options, error);
|
|
349
|
+
throw error;
|
|
350
|
+
}
|
|
331
351
|
this.plugin.getLogger(workflow.id).info(`execution of workflow ${workflow.id} created as ${execution.id}`);
|
|
332
352
|
if (!workflow.stats) {
|
|
333
353
|
workflow.stats = await workflow.getStats();
|
package/dist/server/Plugin.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export default class PluginWorkflowServer extends Plugin {
|
|
|
74
74
|
*/
|
|
75
75
|
load(): Promise<void>;
|
|
76
76
|
private toggle;
|
|
77
|
-
trigger(workflow: WorkflowModel, context: object, options?: EventOptions): void | Promise<Processor | null>;
|
|
77
|
+
trigger(workflow: WorkflowModel, context: object, options?: EventOptions): void | Promise<Processor | null | void>;
|
|
78
78
|
run(pending: Parameters<Dispatcher['run']>[0]): Promise<void>;
|
|
79
79
|
dispatch(): void;
|
|
80
80
|
resume(job: any): Promise<void>;
|
|
@@ -78,7 +78,9 @@ async function list(context, next) {
|
|
|
78
78
|
}
|
|
79
79
|
async function create(context, next) {
|
|
80
80
|
const plugin = context.app.pm.get(import_Plugin.default);
|
|
81
|
-
const
|
|
81
|
+
const values = { ...context.action.params.values || {} };
|
|
82
|
+
delete values.invalid;
|
|
83
|
+
context.action.mergeParams({ values }, { values: "overwrite" });
|
|
82
84
|
validateWorkflow(context, plugin, values);
|
|
83
85
|
return import_actions.default.create(context, next);
|
|
84
86
|
}
|
|
@@ -143,10 +145,12 @@ async function destroy(context, next) {
|
|
|
143
145
|
async function revision(context, next) {
|
|
144
146
|
const repository = import_actions.utils.getRepositoryFromParams(context);
|
|
145
147
|
const { filterByTk, filter = {}, values = {} } = context.action.params;
|
|
148
|
+
const revisionValues = { ...values };
|
|
149
|
+
delete revisionValues.invalid;
|
|
146
150
|
context.body = await repository.revision({
|
|
147
151
|
filterByTk,
|
|
148
152
|
filter,
|
|
149
|
-
values,
|
|
153
|
+
values: revisionValues,
|
|
150
154
|
context
|
|
151
155
|
});
|
|
152
156
|
await next();
|
|
@@ -188,6 +192,12 @@ async function execute(context, next) {
|
|
|
188
192
|
let processor;
|
|
189
193
|
try {
|
|
190
194
|
processor = await plugin.execute(workflow, values, { manually: true });
|
|
195
|
+
if (processor === null) {
|
|
196
|
+
context.body = {
|
|
197
|
+
execution: null
|
|
198
|
+
};
|
|
199
|
+
return next();
|
|
200
|
+
}
|
|
191
201
|
if (!processor) {
|
|
192
202
|
return context.throw(400, "workflow not triggered");
|
|
193
203
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import { Migration } from '@nocobase/server';
|
|
10
|
+
export default class extends Migration {
|
|
11
|
+
on: string;
|
|
12
|
+
up(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var remove_workflow_validation_exports = {};
|
|
28
|
+
__export(remove_workflow_validation_exports, {
|
|
29
|
+
default: () => remove_workflow_validation_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(remove_workflow_validation_exports);
|
|
32
|
+
var import_server = require("@nocobase/server");
|
|
33
|
+
class remove_workflow_validation_default extends import_server.Migration {
|
|
34
|
+
on = "afterSync";
|
|
35
|
+
async up() {
|
|
36
|
+
const { db } = this.context;
|
|
37
|
+
const workflows = db.getCollection("workflows");
|
|
38
|
+
const tableInfo = workflows.getTableNameWithSchema();
|
|
39
|
+
await db.sequelize.transaction(async (transaction) => {
|
|
40
|
+
const tableExists = await this.queryInterface.tableExists(tableInfo, { transaction });
|
|
41
|
+
if (!tableExists) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const describeTable = this.queryInterface.describeTable.bind(this.queryInterface);
|
|
45
|
+
const columns = await describeTable(tableInfo, { transaction });
|
|
46
|
+
if (!columns.validation) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
await this.queryInterface.removeColumn(tableInfo, "validation", { transaction });
|
|
50
|
+
if (db.sequelize.getDialect() === "sqlite") {
|
|
51
|
+
const syncOptions = { hooks: false, transaction };
|
|
52
|
+
await workflows.model.sync(syncOptions);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -30,7 +30,7 @@ export default class CollectionTrigger extends Trigger {
|
|
|
30
30
|
code?: string;
|
|
31
31
|
};
|
|
32
32
|
prepare(workflow: WorkflowModel, data: Model | Record<string, any> | string | number, options: any): Promise<{
|
|
33
|
-
data: any
|
|
33
|
+
data: string | number | Record<string, any> | Model<any, any>;
|
|
34
34
|
}>;
|
|
35
35
|
on(workflow: WorkflowModel): void;
|
|
36
36
|
off(workflow: WorkflowModel): void;
|
|
@@ -305,6 +305,9 @@ class CollectionTrigger extends import__.default {
|
|
|
305
305
|
// }
|
|
306
306
|
async execute(workflow, values, options) {
|
|
307
307
|
const ctx = await this.prepare(workflow, values == null ? void 0 : values.data, options);
|
|
308
|
+
if (!ctx) {
|
|
309
|
+
return null;
|
|
310
|
+
}
|
|
308
311
|
const [dataSourceName] = (0, import_data_source_manager.parseCollectionName)(workflow.config.collection);
|
|
309
312
|
const { transaction } = options;
|
|
310
313
|
return this.workflow.trigger(workflow, ctx, {
|
|
@@ -20,5 +20,5 @@ export default class StaticScheduleTrigger {
|
|
|
20
20
|
trigger(workflow: WorkflowModel, time: number): Promise<void>;
|
|
21
21
|
on(workflow: any): void;
|
|
22
22
|
off(workflow: any): void;
|
|
23
|
-
execute(workflow: any, values: any, options: any): void | Promise<import("../..").Processor>;
|
|
23
|
+
execute(workflow: any, values: any, options: any): void | Promise<void | import("../..").Processor>;
|
|
24
24
|
}
|
|
@@ -26,6 +26,6 @@ export declare abstract class Trigger {
|
|
|
26
26
|
[key: string]: string;
|
|
27
27
|
};
|
|
28
28
|
sync?: boolean;
|
|
29
|
-
execute?(workflow: WorkflowModel, values: any, options: Transactionable): void | Processor | Promise<void | Processor>;
|
|
29
|
+
execute?(workflow: WorkflowModel, values: any, options: Transactionable): void | Processor | null | Promise<void | Processor | null>;
|
|
30
30
|
}
|
|
31
31
|
export default Trigger;
|