@nocobase/plugin-workflow 2.2.0-beta.16 → 2.2.0-beta.18
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/438.255c1f798203a3fc.js +10 -0
- package/dist/client/509.280de53e5e3e8874.js +10 -0
- package/dist/client/728.e54be200a2eaac45.js +10 -0
- package/dist/client/828.eda52a8918f0a56c.js +10 -0
- package/dist/client/WorkflowTasks.d.ts +1 -23
- package/dist/client/index.js +1 -1
- package/dist/client-v2/32.f7a2f5b51aac18b6.js +10 -0
- package/dist/client-v2/438.76337ed02ad35e77.js +10 -0
- package/dist/client-v2/513.028d9992cc415e73.js +10 -0
- package/dist/client-v2/677.687ffa76229d7e48.js +10 -0
- package/dist/client-v2/canvas/WorkflowVariableInput.d.ts +8 -1
- package/dist/client-v2/canvas/WorkflowVariableTextArea.d.ts +5 -0
- package/dist/client-v2/constants.d.ts +4 -0
- package/dist/client-v2/index.js +1 -1
- package/dist/client-v2/taskCenter.d.ts +3 -1
- package/dist/common/collections/jobs.js +2 -2
- package/dist/externalVersion.js +14 -14
- package/dist/locale/de-DE.json +2 -0
- package/dist/locale/en-US.json +2 -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 +2 -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/Plugin.d.ts +1 -1
- package/dist/server/Plugin.js +1 -1
- package/dist/server/Processor.d.ts +1 -0
- package/dist/server/Processor.js +26 -11
- package/dist/server/RunningExecutionRegistry.d.ts +2 -2
- package/dist/server/RunningExecutionRegistry.js +21 -6
- package/dist/server/actions/workflows.js +1 -1
- package/dist/server/types/Job.d.ts +1 -0
- package/dist/shared/WorkflowTaskNavigation.d.ts +56 -0
- package/dist/shared/WorkflowTaskNavigation.js +742 -0
- package/package.json +2 -2
- package/dist/client/438.6c6409d821d8c353.js +0 -10
- package/dist/client/509.88792f5bd054b2af.js +0 -10
- package/dist/client/728.711fd4f1ed7d4e6a.js +0 -10
- package/dist/client/828.6880ab21513b1968.js +0 -10
- package/dist/client-v2/438.b7df0416b66f8f64.js +0 -10
- package/dist/client-v2/513.617697f74783a611.js +0 -10
- package/dist/client-v2/677.7382807126d9621a.js +0 -10
- package/dist/client-v2/728.4e8322ff8fce87b9.js +0 -10
|
@@ -26,6 +26,8 @@ export type WorkflowTaskCounts = Record<string, WorkflowTaskStats>;
|
|
|
26
26
|
export interface WorkflowTaskActionsProps {
|
|
27
27
|
onlyIcon?: boolean;
|
|
28
28
|
reload?: () => Promise<void>;
|
|
29
|
+
workflowKey?: string;
|
|
30
|
+
workflowPendingCount?: number;
|
|
29
31
|
}
|
|
30
32
|
export interface WorkflowTaskDetailModalProps {
|
|
31
33
|
children?: ReactNode;
|
|
@@ -76,7 +78,7 @@ export interface TaskTypeOptions {
|
|
|
76
78
|
title: string;
|
|
77
79
|
collection: string;
|
|
78
80
|
action?: string;
|
|
79
|
-
useActionParams?: (status: WorkflowTaskStatus) => WorkflowTaskRequestParams | undefined;
|
|
81
|
+
useActionParams?: (status: WorkflowTaskStatus, workflowKey?: string) => WorkflowTaskRequestParams | undefined;
|
|
80
82
|
Actions?: ComponentType<WorkflowTaskActionsProps>;
|
|
81
83
|
DetailModal?: ComponentType<WorkflowTaskDetailModalProps>;
|
|
82
84
|
Item: ComponentType;
|
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-beta.
|
|
15
|
-
"@nocobase/utils": "2.2.0-beta.
|
|
14
|
+
"@nocobase/client": "2.2.0-beta.18",
|
|
15
|
+
"@nocobase/utils": "2.2.0-beta.18",
|
|
16
16
|
"antd": "5.24.2",
|
|
17
17
|
"@ant-design/icons": "5.6.1",
|
|
18
|
-
"@nocobase/flow-engine": "2.2.0-beta.
|
|
18
|
+
"@nocobase/flow-engine": "2.2.0-beta.18",
|
|
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-beta.
|
|
26
|
-
"@nocobase/client-v2": "2.2.0-beta.
|
|
25
|
+
"@nocobase/plugin-mobile": "2.2.0-beta.18",
|
|
26
|
+
"@nocobase/client-v2": "2.2.0-beta.18",
|
|
27
27
|
"sequelize": "6.35.2",
|
|
28
|
-
"@nocobase/server": "2.2.0-beta.
|
|
29
|
-
"@nocobase/database": "2.2.0-beta.
|
|
30
|
-
"@nocobase/data-source-manager": "2.2.0-beta.
|
|
31
|
-
"@nocobase/logger": "2.2.0-beta.
|
|
32
|
-
"@nocobase/evaluators": "2.2.0-beta.
|
|
28
|
+
"@nocobase/server": "2.2.0-beta.18",
|
|
29
|
+
"@nocobase/database": "2.2.0-beta.18",
|
|
30
|
+
"@nocobase/data-source-manager": "2.2.0-beta.18",
|
|
31
|
+
"@nocobase/logger": "2.2.0-beta.18",
|
|
32
|
+
"@nocobase/evaluators": "2.2.0-beta.18",
|
|
33
|
+
"@emotion/css": "11.13.0",
|
|
33
34
|
"@formily/antd-v5": "1.2.3",
|
|
34
35
|
"@formily/reactive": "2.3.7",
|
|
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-beta.
|
|
40
|
-
"@nocobase/plugin-workflow-test": "2.2.0-beta.
|
|
41
|
-
"@nocobase/test": "2.2.0-beta.
|
|
39
|
+
"@nocobase/actions": "2.2.0-beta.18",
|
|
40
|
+
"@nocobase/plugin-workflow-test": "2.2.0-beta.18",
|
|
41
|
+
"@nocobase/test": "2.2.0-beta.18",
|
|
42
42
|
"@dnd-kit/sortable": "7.0.2"
|
|
43
43
|
};
|
package/dist/locale/de-DE.json
CHANGED
|
@@ -254,6 +254,8 @@
|
|
|
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
|
+
"Back to Workflow List": "Zurück zur Workflow-Liste",
|
|
258
|
+
"Workflow does not exist": "Workflow ist nicht vorhanden",
|
|
257
259
|
"Workflow not executed": "Workflow nicht ausgeführt",
|
|
258
260
|
"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
261
|
"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.",
|
package/dist/locale/en-US.json
CHANGED
|
@@ -283,6 +283,7 @@
|
|
|
283
283
|
"When no condition matches": "When no condition matches",
|
|
284
284
|
"Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
|
|
285
285
|
"Workflow": "Workflow",
|
|
286
|
+
"Back to Workflow List": "Back to Workflow List",
|
|
286
287
|
"This workflow has configuration issues and may not work properly.": "This workflow has configuration issues and may not work properly.",
|
|
287
288
|
"Workflow title": "Workflow title",
|
|
288
289
|
"Workflow canvas editor is being migrated to the new UI.": "Workflow canvas editor is being migrated to the new UI.",
|
|
@@ -290,6 +291,7 @@
|
|
|
290
291
|
"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>",
|
|
291
292
|
"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.",
|
|
292
293
|
"Workflow of execution is not existed": "Workflow of execution is not existed",
|
|
294
|
+
"Workflow does not exist": "Workflow does not exist",
|
|
293
295
|
"Workflow tasks": "Workflow tasks",
|
|
294
296
|
"Workflow todos": "Workflow todos",
|
|
295
297
|
"Workflow will be triggered before deleting succeeded (only supports pre-action event in local mode).": "Workflow will be triggered before deleting succeeded (only supports pre-action event in local mode).",
|
package/dist/locale/es-ES.json
CHANGED
|
@@ -254,6 +254,8 @@
|
|
|
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
|
+
"Back to Workflow List": "Volver a la lista de flujos de trabajo",
|
|
258
|
+
"Workflow does not exist": "El flujo de trabajo no existe",
|
|
257
259
|
"Workflow not executed": "Flujo de trabajo no ejecutado",
|
|
258
260
|
"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
261
|
"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.",
|
package/dist/locale/fr-FR.json
CHANGED
|
@@ -254,6 +254,8 @@
|
|
|
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
|
+
"Back to Workflow List": "Retour à la liste des workflows",
|
|
258
|
+
"Workflow does not exist": "Le workflow n’existe pas",
|
|
257
259
|
"Workflow not executed": "Workflow non exécuté",
|
|
258
260
|
"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
261
|
"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.",
|
package/dist/locale/hu-HU.json
CHANGED
|
@@ -254,6 +254,8 @@
|
|
|
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
|
+
"Back to Workflow List": "Vissza a munkafolyamatok listájához",
|
|
258
|
+
"Workflow does not exist": "A munkafolyamat nem létezik",
|
|
257
259
|
"Workflow not executed": "A munkafolyamat nem lett végrehajtva",
|
|
258
260
|
"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
261
|
"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.",
|
package/dist/locale/id-ID.json
CHANGED
|
@@ -254,6 +254,8 @@
|
|
|
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
|
+
"Back to Workflow List": "Kembali ke daftar alur kerja",
|
|
258
|
+
"Workflow does not exist": "Alur kerja tidak ada",
|
|
257
259
|
"Workflow not executed": "Alur kerja tidak dieksekusi",
|
|
258
260
|
"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
261
|
"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.",
|
package/dist/locale/it-IT.json
CHANGED
|
@@ -254,6 +254,8 @@
|
|
|
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
|
+
"Back to Workflow List": "Torna all'elenco dei workflow",
|
|
258
|
+
"Workflow does not exist": "Il workflow non esiste",
|
|
257
259
|
"Workflow not executed": "Workflow non eseguito",
|
|
258
260
|
"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
261
|
"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.",
|
package/dist/locale/ja-JP.json
CHANGED
|
@@ -256,6 +256,8 @@
|
|
|
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
|
+
"Back to Workflow List": "ワークフロー一覧に戻る",
|
|
260
|
+
"Workflow does not exist": "ワークフローが存在しません",
|
|
259
261
|
"Workflow not executed": "ワークフローは実行されませんでした",
|
|
260
262
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "ワークフローが実行されました。結果ステータス: <1>{{statusText}}</1><2>実行詳細を表示</2>",
|
|
261
263
|
"Workflow was not triggered because the current request did not meet the trigger requirements.": "現在のリクエストがトリガー要件を満たしていないため、ワークフローはトリガーされませんでした。",
|
package/dist/locale/ko-KR.json
CHANGED
|
@@ -272,6 +272,8 @@
|
|
|
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
|
+
"Back to Workflow List": "워크플로 목록으로 돌아가기",
|
|
276
|
+
"Workflow does not exist": "워크플로가 존재하지 않습니다",
|
|
275
277
|
"Workflow not executed": "워크플로우가 실행되지 않았습니다",
|
|
276
278
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "워크플로우가 실행되었습니다. 결과 상태는 <1>{{statusText}}</1><2>실행 보기</2>",
|
|
277
279
|
"Workflow was not triggered because the current request did not meet the trigger requirements.": "현재 요청이 트리거 요구 사항을 충족하지 않아 워크플로우가 트리거되지 않았습니다.",
|
package/dist/locale/nl-NL.json
CHANGED
|
@@ -254,6 +254,8 @@
|
|
|
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
|
+
"Back to Workflow List": "Terug naar de workflowlijst",
|
|
258
|
+
"Workflow does not exist": "Workflow bestaat niet",
|
|
257
259
|
"Workflow not executed": "Workflow niet uitgevoerd",
|
|
258
260
|
"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
261
|
"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.",
|
package/dist/locale/pt-BR.json
CHANGED
|
@@ -254,6 +254,8 @@
|
|
|
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
|
+
"Back to Workflow List": "Voltar para a lista de fluxos de trabalho",
|
|
258
|
+
"Workflow does not exist": "O fluxo de trabalho não existe",
|
|
257
259
|
"Workflow not executed": "Fluxo de trabalho não executado",
|
|
258
260
|
"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
261
|
"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.",
|
package/dist/locale/ru-RU.json
CHANGED
|
@@ -254,6 +254,8 @@
|
|
|
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
|
+
"Back to Workflow List": "Вернуться к списку рабочих процессов",
|
|
258
|
+
"Workflow does not exist": "Рабочий процесс не существует",
|
|
257
259
|
"Workflow not executed": "Рабочий процесс не выполнен",
|
|
258
260
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Рабочий процесс выполнен, статус результата: <1>{{statusText}}</1><2>Посмотреть выполнение</2>",
|
|
259
261
|
"Workflow was not triggered because the current request did not meet the trigger requirements.": "Рабочий процесс не был запущен, так как текущий запрос не соответствует требованиям триггера.",
|
package/dist/locale/tr-TR.json
CHANGED
|
@@ -254,6 +254,8 @@
|
|
|
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
|
+
"Back to Workflow List": "İş akışı listesine dön",
|
|
258
|
+
"Workflow does not exist": "İş akışı mevcut değil",
|
|
257
259
|
"Workflow not executed": "İş akışı yürütülmedi",
|
|
258
260
|
"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
261
|
"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.",
|
package/dist/locale/uk-UA.json
CHANGED
|
@@ -254,6 +254,8 @@
|
|
|
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
|
+
"Back to Workflow List": "Повернутися до списку робочих процесів",
|
|
258
|
+
"Workflow does not exist": "Робочий процес не існує",
|
|
257
259
|
"Workflow not executed": "Робочий процес не виконано",
|
|
258
260
|
"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
261
|
"Workflow was not triggered because the current request did not meet the trigger requirements.": "Робочий процес не було запущено, оскільки поточний запит не відповідає вимогам тригера.",
|
package/dist/locale/vi-VN.json
CHANGED
|
@@ -254,6 +254,8 @@
|
|
|
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
|
+
"Back to Workflow List": "Quay lại danh sách quy trình làm việc",
|
|
258
|
+
"Workflow does not exist": "Quy trình làm việc không tồn tại",
|
|
257
259
|
"Workflow not executed": "Quy trình làm việc chưa được thực thi",
|
|
258
260
|
"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
261
|
"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.",
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -291,6 +291,7 @@
|
|
|
291
291
|
"When no condition matches": "未满足任何条件时",
|
|
292
292
|
"Will be executed in the background as a queued task.": "将作为队列任务在后台执行。",
|
|
293
293
|
"Workflow": "工作流",
|
|
294
|
+
"Back to Workflow List": "返回工作流列表",
|
|
294
295
|
"This workflow has configuration issues and may not work properly.": "该工作流配置存在问题,可能无法正常使用",
|
|
295
296
|
"Workflow title": "工作流名称",
|
|
296
297
|
"Workflow canvas editor is being migrated to the new UI.": "工作流画布编辑器正在迁移到新版界面。",
|
|
@@ -298,6 +299,7 @@
|
|
|
298
299
|
"Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "工作流已执行,结果状态为 <1>{{statusText}}</1><2>查看执行详情</2>",
|
|
299
300
|
"Workflow was not triggered because the current request did not meet the trigger requirements.": "当前请求未满足触发要求,工作流未触发。",
|
|
300
301
|
"Workflow of execution is not existed": "执行计划对应的工作流不存在",
|
|
302
|
+
"Workflow does not exist": "工作流不存在",
|
|
301
303
|
"Workflow tasks": "流程待办",
|
|
302
304
|
"Workflow todos": "流程待办",
|
|
303
305
|
"Workflow will be triggered before deleting succeeded (only supports pre-action event in local mode).": "删除成功之前触发工作流(支持操作前事件)。",
|
package/dist/locale/zh-TW.json
CHANGED
|
@@ -256,6 +256,8 @@
|
|
|
256
256
|
"When no condition matches": "When no condition matches",
|
|
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
|
+
"Back to Workflow List": "返回工作流程列表",
|
|
260
|
+
"Workflow does not exist": "工作流程不存在",
|
|
259
261
|
"Workflow title": "工作流名稱",
|
|
260
262
|
"Workflow not executed": "工作流未執行",
|
|
261
263
|
"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>",
|
|
@@ -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-
|
|
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-08-20T12:47:48.478Z"}
|
|
@@ -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-
|
|
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-08-20T12:47:48.172Z"}
|
|
@@ -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-
|
|
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-08-20T12:47:47.590Z"}
|
|
@@ -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-
|
|
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-08-20T12:47:47.457Z"}
|
package/dist/server/Plugin.d.ts
CHANGED
|
@@ -70,7 +70,7 @@ export default class PluginWorkflowServer extends Plugin {
|
|
|
70
70
|
abortExecutionIfExpired(execution: ExecutionModel, options?: {
|
|
71
71
|
transaction?: Transaction;
|
|
72
72
|
}): Promise<boolean>;
|
|
73
|
-
registerRunningExecution(executionId: number | string, abort: (reason?: string) => void): void;
|
|
73
|
+
registerRunningExecution(executionId: number | string, abort: (reason?: string) => void): () => void;
|
|
74
74
|
unregisterRunningExecution(executionId: number | string): void;
|
|
75
75
|
abortRunningExecution(executionId: number | string, reason?: string): boolean;
|
|
76
76
|
/**
|
package/dist/server/Plugin.js
CHANGED
|
@@ -225,7 +225,7 @@ class PluginWorkflowServer extends import_server.Plugin {
|
|
|
225
225
|
return this.timeoutManager.abortExecutionIfExpired(execution, options);
|
|
226
226
|
}
|
|
227
227
|
registerRunningExecution(executionId, abort) {
|
|
228
|
-
this.runningExecutionRegistry.register(executionId, { abort });
|
|
228
|
+
return this.runningExecutionRegistry.register(executionId, { abort });
|
|
229
229
|
}
|
|
230
230
|
unregisterRunningExecution(executionId) {
|
|
231
231
|
this.runningExecutionRegistry.unregister(executionId);
|
|
@@ -73,6 +73,7 @@ export default class Processor {
|
|
|
73
73
|
abortController: AbortController;
|
|
74
74
|
timeoutGuard: NodeJS.Timeout | null;
|
|
75
75
|
private runningRegistered;
|
|
76
|
+
private unregisterRunningExecution?;
|
|
76
77
|
private abortReason;
|
|
77
78
|
private aborted;
|
|
78
79
|
constructor(execution: ExecutionModel, options: ProcessorOptions);
|
package/dist/server/Processor.js
CHANGED
|
@@ -90,6 +90,7 @@ class Processor {
|
|
|
90
90
|
abortController = new AbortController();
|
|
91
91
|
timeoutGuard = null;
|
|
92
92
|
runningRegistered = false;
|
|
93
|
+
unregisterRunningExecution;
|
|
93
94
|
abortReason = null;
|
|
94
95
|
aborted = false;
|
|
95
96
|
get abortSignal() {
|
|
@@ -461,34 +462,40 @@ class Processor {
|
|
|
461
462
|
}
|
|
462
463
|
if (this.jobsToSave.size) {
|
|
463
464
|
const newJobs = [];
|
|
465
|
+
const JobCollection = this.options.plugin.db.getCollection("jobs");
|
|
466
|
+
const JobsModel = this.options.plugin.db.getModel("jobs");
|
|
464
467
|
for (const job of this.jobsToSave.values()) {
|
|
465
468
|
if (job.isNewRecord) {
|
|
466
469
|
newJobs.push(job);
|
|
467
470
|
} else {
|
|
468
|
-
const JobCollection = this.options.plugin.db.getCollection("jobs");
|
|
469
471
|
const changes = [];
|
|
470
472
|
if (job.changed("status")) {
|
|
471
|
-
changes.push([
|
|
472
|
-
job.changed("status", false);
|
|
473
|
+
changes.push(["status", job.status]);
|
|
473
474
|
}
|
|
474
475
|
if (job.changed("meta")) {
|
|
475
|
-
changes.push([
|
|
476
|
-
job.changed("meta", false);
|
|
476
|
+
changes.push(["meta", JSON.stringify(job.meta ?? null)]);
|
|
477
477
|
}
|
|
478
478
|
if (job.changed("result")) {
|
|
479
|
-
changes.push([
|
|
480
|
-
|
|
479
|
+
changes.push(["result", JSON.stringify(job.result ?? null)]);
|
|
480
|
+
}
|
|
481
|
+
if (job.changed("startedAt")) {
|
|
482
|
+
changes.push(["startedAt", job.startedAt]);
|
|
481
483
|
}
|
|
482
484
|
if (changes.length) {
|
|
485
|
+
const idColumn = JobsModel.rawAttributes.id.field || "id";
|
|
483
486
|
await this.options.plugin.db.sequelize.query(
|
|
484
|
-
`UPDATE ${JobCollection.quotedTableName()} SET ${changes.map(
|
|
487
|
+
`UPDATE ${JobCollection.quotedTableName()} SET ${changes.map(
|
|
488
|
+
([field]) => `${this.options.plugin.db.quoteIdentifier(JobsModel.rawAttributes[field].field || field)} = ?`
|
|
489
|
+
)} WHERE ${this.options.plugin.db.quoteIdentifier(idColumn)}='${job.id}'`,
|
|
485
490
|
{ replacements: changes.map(([, value]) => value) }
|
|
486
491
|
);
|
|
492
|
+
for (const [field] of changes) {
|
|
493
|
+
job.changed(field, false);
|
|
494
|
+
}
|
|
487
495
|
}
|
|
488
496
|
}
|
|
489
497
|
}
|
|
490
498
|
if (newJobs.length) {
|
|
491
|
-
const JobsModel = this.options.plugin.db.getModel("jobs");
|
|
492
499
|
for (let offset = 0; offset < newJobs.length; offset += JOB_SAVE_BATCH_SIZE) {
|
|
493
500
|
const batch = newJobs.slice(offset, offset + JOB_SAVE_BATCH_SIZE);
|
|
494
501
|
await JobsModel.bulkCreate(
|
|
@@ -644,6 +651,7 @@ class Processor {
|
|
|
644
651
|
const { database } = this.execution.constructor;
|
|
645
652
|
const model = database.getModel("jobs");
|
|
646
653
|
let job;
|
|
654
|
+
const startedAt = Object.prototype.hasOwnProperty.call(payload, "startedAt") ? payload.startedAt : /* @__PURE__ */ new Date();
|
|
647
655
|
if (payload instanceof model) {
|
|
648
656
|
job = payload;
|
|
649
657
|
job.set("updatedAt", /* @__PURE__ */ new Date());
|
|
@@ -653,6 +661,7 @@ class Processor {
|
|
|
653
661
|
status: payload.status,
|
|
654
662
|
result: Object.prototype.hasOwnProperty.call(payload, "result") ? payload.result : null,
|
|
655
663
|
meta: Object.prototype.hasOwnProperty.call(payload, "meta") ? payload.meta : null,
|
|
664
|
+
startedAt,
|
|
656
665
|
updatedAt: /* @__PURE__ */ new Date()
|
|
657
666
|
});
|
|
658
667
|
} else {
|
|
@@ -660,6 +669,7 @@ class Processor {
|
|
|
660
669
|
{
|
|
661
670
|
...payload,
|
|
662
671
|
id: this.options.plugin.snowflake.getUniqueID().toString(),
|
|
672
|
+
startedAt,
|
|
663
673
|
createdAt: /* @__PURE__ */ new Date(),
|
|
664
674
|
updatedAt: /* @__PURE__ */ new Date(),
|
|
665
675
|
executionId: this.execution.id
|
|
@@ -688,7 +698,10 @@ class Processor {
|
|
|
688
698
|
this.options.plugin.timeoutManager.clear(this.execution.id);
|
|
689
699
|
this.abortReason = null;
|
|
690
700
|
this.aborted = false;
|
|
691
|
-
this.options.plugin.registerRunningExecution(
|
|
701
|
+
this.unregisterRunningExecution = this.options.plugin.registerRunningExecution(
|
|
702
|
+
this.execution.id,
|
|
703
|
+
(reason) => this.abortExecution(reason)
|
|
704
|
+
);
|
|
692
705
|
this.runningRegistered = true;
|
|
693
706
|
const remaining = this.execution.expiresAt ? this.execution.expiresAt.getTime() - Date.now() : null;
|
|
694
707
|
if (remaining == null) {
|
|
@@ -704,6 +717,7 @@ class Processor {
|
|
|
704
717
|
return this.options.plugin.timeoutManager.shouldContinue(this.execution);
|
|
705
718
|
}
|
|
706
719
|
leaveRunningState() {
|
|
720
|
+
var _a;
|
|
707
721
|
if (this.timeoutGuard) {
|
|
708
722
|
clearTimeout(this.timeoutGuard);
|
|
709
723
|
this.timeoutGuard = null;
|
|
@@ -711,7 +725,8 @@ class Processor {
|
|
|
711
725
|
if (!this.runningRegistered) {
|
|
712
726
|
return;
|
|
713
727
|
}
|
|
714
|
-
this.
|
|
728
|
+
(_a = this.unregisterRunningExecution) == null ? void 0 : _a.call(this);
|
|
729
|
+
this.unregisterRunningExecution = void 0;
|
|
715
730
|
this.runningRegistered = false;
|
|
716
731
|
}
|
|
717
732
|
/**
|
|
@@ -11,8 +11,8 @@ type AbortHandler = {
|
|
|
11
11
|
};
|
|
12
12
|
export default class RunningExecutionRegistry {
|
|
13
13
|
private readonly executions;
|
|
14
|
-
register(executionId: number | string, handler: AbortHandler): void;
|
|
15
|
-
unregister(executionId: number | string): void;
|
|
14
|
+
register(executionId: number | string, handler: AbortHandler): () => void;
|
|
15
|
+
unregister(executionId: number | string, handler?: AbortHandler): void;
|
|
16
16
|
abort(executionId: number | string, reason?: string): boolean;
|
|
17
17
|
}
|
|
18
18
|
export {};
|
|
@@ -32,17 +32,32 @@ module.exports = __toCommonJS(RunningExecutionRegistry_exports);
|
|
|
32
32
|
class RunningExecutionRegistry {
|
|
33
33
|
executions = /* @__PURE__ */ new Map();
|
|
34
34
|
register(executionId, handler) {
|
|
35
|
-
|
|
35
|
+
const key = String(executionId);
|
|
36
|
+
const handlers = this.executions.get(key) ?? /* @__PURE__ */ new Set();
|
|
37
|
+
handlers.add(handler);
|
|
38
|
+
this.executions.set(key, handlers);
|
|
39
|
+
return () => this.unregister(executionId, handler);
|
|
36
40
|
}
|
|
37
|
-
unregister(executionId) {
|
|
38
|
-
|
|
41
|
+
unregister(executionId, handler) {
|
|
42
|
+
const key = String(executionId);
|
|
43
|
+
if (!handler) {
|
|
44
|
+
this.executions.delete(key);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const handlers = this.executions.get(key);
|
|
48
|
+
handlers == null ? void 0 : handlers.delete(handler);
|
|
49
|
+
if (!(handlers == null ? void 0 : handlers.size)) {
|
|
50
|
+
this.executions.delete(key);
|
|
51
|
+
}
|
|
39
52
|
}
|
|
40
53
|
abort(executionId, reason) {
|
|
41
|
-
const
|
|
42
|
-
if (!
|
|
54
|
+
const handlers = this.executions.get(String(executionId));
|
|
55
|
+
if (!(handlers == null ? void 0 : handlers.size)) {
|
|
43
56
|
return false;
|
|
44
57
|
}
|
|
45
|
-
handler
|
|
58
|
+
for (const handler of handlers) {
|
|
59
|
+
handler.abort(reason);
|
|
60
|
+
}
|
|
46
61
|
return true;
|
|
47
62
|
}
|
|
48
63
|
}
|
|
@@ -225,7 +225,7 @@ async function execute(context, next) {
|
|
|
225
225
|
filter: { key: workflow.key }
|
|
226
226
|
});
|
|
227
227
|
let newVersion;
|
|
228
|
-
if (executed
|
|
228
|
+
if (executed === 0 && Number(autoRevision) === 1) {
|
|
229
229
|
newVersion = await repository.revision({
|
|
230
230
|
filterByTk: workflow.id,
|
|
231
231
|
filter: { key: workflow.key },
|
|
@@ -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
|
+
import React from 'react';
|
|
10
|
+
export interface WorkflowTaskStatsItem {
|
|
11
|
+
workflowKey: string;
|
|
12
|
+
title: string;
|
|
13
|
+
stats: {
|
|
14
|
+
pending: number;
|
|
15
|
+
all: number;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface WorkflowTaskNavigationType {
|
|
19
|
+
count: number;
|
|
20
|
+
key: string;
|
|
21
|
+
title: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
interface WorkflowTaskStatsListParams {
|
|
24
|
+
page: number;
|
|
25
|
+
pageSize: number;
|
|
26
|
+
search?: string;
|
|
27
|
+
type: string;
|
|
28
|
+
}
|
|
29
|
+
export type LoadWorkflowTaskStats = (params: WorkflowTaskStatsListParams) => Promise<unknown>;
|
|
30
|
+
export interface WorkflowTaskFilterContextValue {
|
|
31
|
+
selectedWorkflow: WorkflowTaskStatsItem | null;
|
|
32
|
+
selectWorkflow: (workflow: WorkflowTaskStatsItem | null) => void;
|
|
33
|
+
workflows: WorkflowTaskStatsItem[];
|
|
34
|
+
loading: boolean;
|
|
35
|
+
loadingMore: boolean;
|
|
36
|
+
hasNext: boolean;
|
|
37
|
+
error: boolean;
|
|
38
|
+
search: string;
|
|
39
|
+
setSearch: (search: string) => void;
|
|
40
|
+
loadMore: () => void;
|
|
41
|
+
reload: () => void;
|
|
42
|
+
}
|
|
43
|
+
export declare function useWorkflowTaskFilterContext(): WorkflowTaskFilterContextValue;
|
|
44
|
+
export declare function WorkflowTaskFilterProvider(props: React.PropsWithChildren<{
|
|
45
|
+
eventBus?: EventTarget;
|
|
46
|
+
loadWorkflowTaskStats: LoadWorkflowTaskStats;
|
|
47
|
+
typeKey?: string;
|
|
48
|
+
}>): React.JSX.Element;
|
|
49
|
+
export declare function WorkflowTaskNavigation(props: {
|
|
50
|
+
currentTypeKey?: string;
|
|
51
|
+
mobile: boolean;
|
|
52
|
+
onTaskTypeSelect: (typeKey: string) => void;
|
|
53
|
+
taskTypes: WorkflowTaskNavigationType[];
|
|
54
|
+
t: (key: string) => string;
|
|
55
|
+
}): React.JSX.Element;
|
|
56
|
+
export {};
|