@nocobase/plugin-workflow 1.7.0-alpha.1 → 1.7.0-alpha.10

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.
Files changed (61) hide show
  1. package/dist/client/27734873a939f873.js +10 -0
  2. package/dist/client/42a0063e6e3f5ab2.js +10 -0
  3. package/dist/client/WorkflowTasks.d.ts +0 -8
  4. package/dist/client/c8053d382167e05f.js +10 -0
  5. package/dist/client/f5735dd4ea5f2180.js +10 -0
  6. package/dist/client/index.js +1 -1
  7. package/dist/client/locale/index.d.ts +2 -1
  8. package/dist/client/schemas/executions.d.ts +126 -125
  9. package/dist/common/collections/executions.d.ts +136 -0
  10. package/dist/common/collections/executions.js +125 -0
  11. package/dist/common/collections/flow_nodes.d.ts +44 -0
  12. package/dist/common/collections/flow_nodes.js +88 -0
  13. package/dist/common/collections/jobs.d.ts +26 -0
  14. package/dist/common/collections/jobs.js +67 -0
  15. package/dist/common/collections/workflowStats.d.ts +37 -0
  16. package/dist/common/collections/workflowStats.js +59 -0
  17. package/dist/common/collections/workflowTasks.d.ts +10 -0
  18. package/dist/common/collections/workflowTasks.js +64 -0
  19. package/dist/common/collections/workflowVersionStats.d.ts +37 -0
  20. package/dist/common/collections/workflowVersionStats.js +59 -0
  21. package/dist/common/collections/workflows.d.ts +250 -0
  22. package/dist/common/collections/workflows.js +225 -0
  23. package/dist/common/constants.d.ts +9 -0
  24. package/dist/common/constants.js +36 -0
  25. package/dist/externalVersion.js +13 -13
  26. package/dist/locale/de-DE.json +216 -0
  27. package/dist/locale/it-IT.json +123 -18
  28. package/dist/locale/nl-NL.json +100 -0
  29. package/dist/locale/zh-CN.json +4 -0
  30. package/dist/node_modules/cron-parser/package.json +1 -1
  31. package/dist/node_modules/lru-cache/package.json +1 -1
  32. package/dist/server/Plugin.js +41 -23
  33. package/dist/server/actions/nodes.js +7 -5
  34. package/dist/server/actions/workflowTasks.js +4 -2
  35. package/dist/server/actions/workflows.js +5 -2
  36. package/dist/server/collections/executions.js +12 -44
  37. package/dist/server/collections/flow_nodes.js +12 -57
  38. package/dist/server/collections/jobs.js +12 -36
  39. package/dist/server/collections/workflowStats.d.ts +11 -0
  40. package/dist/server/collections/workflowStats.js +43 -0
  41. package/dist/server/collections/workflowTasks.d.ts +2 -1
  42. package/dist/server/collections/workflowTasks.js +12 -33
  43. package/dist/server/collections/workflowVersionStats.d.ts +11 -0
  44. package/dist/server/collections/workflowVersionStats.js +43 -0
  45. package/dist/server/collections/workflows.d.ts +2 -1
  46. package/dist/server/collections/workflows.js +12 -101
  47. package/dist/server/migrations/20250320223415-stats.d.ts +14 -0
  48. package/dist/server/migrations/20250320223415-stats.js +75 -0
  49. package/dist/server/repositories/WorkflowRepository.js +1 -2
  50. package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.d.ts +1 -1
  51. package/dist/server/triggers/ScheduleTrigger/DateFieldScheduleTrigger.js +6 -6
  52. package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.d.ts +1 -1
  53. package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.js +3 -3
  54. package/dist/server/types/Workflow.d.ts +0 -2
  55. package/dist/swagger/index.d.ts +0 -14
  56. package/dist/swagger/index.js +0 -14
  57. package/package.json +3 -3
  58. package/dist/client/4d75ef32f02d7285.js +0 -10
  59. package/dist/client/56ce448358002e64.js +0 -10
  60. package/dist/client/58bb427e05b600de.js +0 -10
  61. package/dist/client/739d458621edf81f.js +0 -10
@@ -53,13 +53,8 @@
53
53
  "By custom date": "Per data personalizzata",
54
54
  "Advanced": "Avanzato",
55
55
  "End": "Fine",
56
- "Node result": "Risultato nodo",
57
- "Constant": "Costante",
58
- "Null": "Null",
59
- "Boolean": "Booleano",
60
- "String": "Stringa",
61
- "Operator": "Operatore",
62
- "Arithmetic calculation": "Calcolo aritmetico",
56
+ "Node result": "Risultato nodo",
57
+ "Operator": "Operatore",
63
58
  "String operation": "Operazione stringa",
64
59
  "Executed at": "Eseguito alle",
65
60
  "Queueing": "In coda",
@@ -73,28 +68,138 @@
73
68
  "Collection operations": "Operazioni raccolta",
74
69
  "Extended types": "Tipi estesi",
75
70
  "Node type": "Tipo nodo",
76
- "Calculation": "Calcolo",
77
- "Configure calculation": "Configura calcolo",
71
+ "Calculation": "Calcolo",
78
72
  "Calculation result": "Risultato calcolo",
79
73
  "True": "Vero",
80
74
  "False": "Falso",
81
75
  "concat": "concatena",
82
76
  "Condition": "Condizione",
83
77
  "Mode": "Modalità",
84
- "Continue when \"Yes\"": "Continua quando \"Yes\"",
85
- "Branch into \"Yes\" and \"No\"": "Dirama in \"Yes\" e \"No\"",
86
- "Conditions": "Condizioni",
78
+ "Continue when \"Yes\"": "Continua quando \"Sì\"",
79
+ "Branch into \"Yes\" and \"No\"": "Dirama in \"Sì\" e \"No\"",
87
80
  "Create record": "Crea record",
88
81
  "Update record": "Aggiorna record",
89
82
  "Query record": "Interroga record",
90
83
  "Multiple records": "Record multipli",
91
84
  "Please select collection first": "Seleziona prima la raccolta",
92
- "Only update records matching conditions": "Aggiorna solo i record che corrispondono alle condizioni",
93
- "Fields that are not assigned a value will be set to the default value, and those that do not have a default value are set to null.": "I campi a cui non è assegnato un valore verranno impostati sul valore predefinito, e quelli che non hanno un valore predefinito verranno impostati su null.",
94
- "Trigger in executed workflow cannot be modified": "Il trigger nel workflow eseguito non può essere modificato",
95
- "Node in executed workflow cannot be modified": "Il nodo nel workflow eseguito non può essere modificato",
85
+ "Only update records matching conditions": "Aggiorna solo i record che corrispondono alle condizioni",
96
86
  "Can not delete": "Impossibile eliminare",
97
87
  "The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.": "Il risultato di questo nodo è stato referenziato da altri nodi ({{nodes}}), rimuovi l'utilizzo prima di eliminare.",
98
- "Maximum number of loop calls": "Numero massimo di chiamate ciclo",
99
- "If the number of loop calls is too large, there will be performance issues.": "Se il numero di chiamate ciclo è troppo grande, ci saranno problemi di prestazioni."
88
+ "Clear all executions": "Cancella tutte le esecuzioni",
89
+ "Clear executions will not reset executed count, and started executions will not be deleted, are you sure you want to delete them all?": "La cancellazione delle esecuzioni non reimposta il conteggio delle esecuzioni e le esecuzioni avviate non verranno eliminate. Sei sicuro di volerle eliminare tutte?",
90
+ "Sync": "Sincronizza",
91
+ "Sync enabled status of all workflows from database": "Sincronizza lo stato abilitato di tutti i workflow dal database",
92
+ "Duplicate to new workflow": "Duplica in un nuovo workflow",
93
+ "Delete a main version will cause all other revisions to be deleted too.": "L'eliminazione di una versione principale comporterà l'eliminazione anche di tutte le altre revisioni.",
94
+ "Execute manually": "Esegui manualmente",
95
+ "The trigger is not configured correctly, please check the trigger configuration.": "Il trigger non è configurato correttamente, controlla la configurazione del trigger.",
96
+ "This type of trigger has not been supported to be executed manually.": "Questo tipo di trigger non è supportato per l'esecuzione manuale.",
97
+ "Trigger variables need to be filled for executing.": "Le variabili del trigger devono essere compilate per l'esecuzione.",
98
+ "A new version will be created automatically after execution if current version is not executed.": "Se la versione corrente non è stata eseguita, verrà creata automaticamente una nuova versione dopo l'esecuzione.",
99
+ "This will perform all the actions configured in the workflow. Are you sure you want to continue?": "Verranno eseguite tutte le azioni configurate nel workflow. Sei sicuro di voler continuare?",
100
+ "Automatically create a new version after execution": "Crea automaticamente una nuova versione dopo l'esecuzione",
101
+ "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>",
102
+ "Use transaction": "Usa transazione",
103
+ "Data operation nodes in workflow will run in a same transaction until any interruption. Any failure will cause data rollback, and will also rollback the history of the execution.": "I nodi di operazione dati nel workflow verranno eseguiti nella stessa transazione fino a qualsiasi interruzione. Qualsiasi errore causerà il rollback dei dati e ripristinerà anche la cronologia dell'esecuzione.",
104
+ "Auto delete history when execution is on end status": "Elimina automaticamente la cronologia quando l'esecuzione è in stato finale",
105
+ "Maximum number of cycling triggers": "Numero massimo di trigger ciclici",
106
+ "The triggers of same workflow by some node (create, update and sub-flow etc.) more than this number will be ignored. Large number may cause performance issues. Please use with caution.": "I trigger dello stesso workflow da un nodo (crea, aggiorna e sub-flow ecc.) superiori a questo numero verranno ignorati. Un numero elevato può causare problemi di prestazioni. Si prega di usare con cautela.",
107
+ "Unknown trigger": "Trigger sconosciuto",
108
+ "Workflow with unknown type will cause error. Please delete it or check plugin which provide this type.": "Un workflow con tipo sconosciuto causerà un errore. Si prega di eliminarlo o controllare il plugin che fornisce questo tipo.",
109
+ "Execute mode": "Modalità di esecuzione",
110
+ "Execute workflow asynchronously or synchronously based on trigger type, and could not be changed after created.": "Esegui il workflow in modo asincrono o sincrono in base al tipo di trigger e non può essere modificato dopo la creazione.",
111
+ "Asynchronously": "Asincrono",
112
+ "Synchronously": "Sincrono",
113
+ "Will be executed in the background as a queued task.": "Verrà eseguito in background come attività in coda.",
114
+ "For user actions that require immediate feedback. Can not use asynchronous nodes in such mode, and it is not recommended to perform time-consuming operations under synchronous mode.": "Per le azioni dell'utente che richiedono un feedback immediato. Non è possibile utilizzare nodi asincroni in questa modalità e non è consigliabile eseguire operazioni che richiedono tempo in modalità sincrona.",
115
+ "Go back": "Torna indietro",
116
+ "Bind workflows": "Collega workflow",
117
+ "Support pre-action event (local mode), post-action event (local mode), and approval event here.": "Qui sono supportati evento pre-azione (modalità locale), evento post-azione (modalità locale) e evento di approvazione.",
118
+ "Workflow will be triggered directly once the button clicked, without data saving. Only supports to be bound with \"Custom action event\".": "Il workflow verrà attivato direttamente una volta cliccato il pulsante, senza salvataggio dei dati. Supporta solo il collegamento con \"evento azione personalizzata\".",
119
+ "\"Submit to workflow\" to \"Post-action event\" is deprecated, please use \"Custom action event\" instead.": "\"Invia a workflow\" a \"evento post-azione\" è obsoleto, si prega di utilizzare invece \"evento azione personalizzata\".",
120
+ "Workflow will be triggered before deleting succeeded (only supports pre-action event in local mode).": "Il workflow verrà attivato prima dell'eliminazione riuscita (supporta solo l'evento pre-azione in modalità locale).",
121
+ "Submit to workflow": "Invia a workflow",
122
+ "Add workflow": "Aggiungi workflow",
123
+ "Select workflow": "Seleziona workflow",
124
+ "Trigger data context": "Contesto dati trigger",
125
+ "Full form data": "Dati completi del modulo",
126
+ "Select context": "Seleziona contesto",
127
+ "Triggered when data changes in the collection, such as after adding, updating, or deleting a record. Unlike \"Post-action event\", Collection event listens for data changes rather than HTTP requests. Unless you understand the exact meaning, it is recommended to use \"Post-action event\".": "Attivato quando i dati cambiano nella raccolta, ad esempio dopo l'aggiunta, l'aggiornamento o l'eliminazione di un record. A differenza dell' \"evento post-azione\", l'evento raccolta ascolta le modifiche dei dati anziché le richieste HTTP. A meno che tu non capisca il significato esatto, si consiglia di utilizzare \"Evento post-azione\".",
128
+ "Preload associations": "Precarica associazioni",
129
+ "Please select the associated fields that need to be accessed in subsequent nodes. With more than two levels of to-many associations may cause performance issue, please use with caution.": "Seleziona i campi associati a cui è necessario accedere nei nodi successivi. Con più di due livelli di associazioni molti-a-molti possono verificarsi problemi di prestazioni, si prega di usare con cautela.",
130
+ "Choose a record or primary key of a record in the collection to trigger.": "Scegli un record o la chiave primaria di un record nella raccolta per attivare.",
131
+ "Triggered according to preset time conditions. Suitable for one-time or periodic tasks, such as sending notifications and cleaning data on a schedule.": "Attivato secondo condizioni di tempo preimpostate. Adatto per attività una tantum o periodiche, come l'invio di notifiche e la pulizia dei dati in base a una pianificazione.",
132
+ "Execute on": "Esegui su",
133
+ "Current time": "Ora corrente",
134
+ "Variable key of node": "Chiave variabile del nodo",
135
+ "Scope variables": "Variabili di ambito",
136
+ "Calculate an expression based on a calculation engine and obtain a value as the result. Variables in the upstream nodes can be used in the expression.": "Calcola un'espressione basata su un motore di calcolo e ottieni un valore come risultato. Le variabili nei nodi upstream possono essere utilizzate nell'espressione.",
137
+ "System variables": "Variabili di sistema",
138
+ "System time": "Ora di sistema",
139
+ "Date variables": "Variabili data",
140
+ "Date range": "Intervallo date",
141
+ "Resolved": "Risolto",
142
+ "Error": "Errore",
143
+ "Aborted": "Interrotto",
144
+ "Rejected": "Rifiutato",
145
+ "Retry needed": "Richiesto nuovo tentativo",
146
+ "Completed": "Completato",
147
+ "All": "Tutto",
148
+ "View result": "Visualizza risultato",
149
+ "Triggered but still waiting in queue to execute.": "Attivato ma ancora in attesa in coda per l'esecuzione.",
150
+ "Started and executing, maybe waiting for an async callback (manual, delay etc.).": "Avviato ed in esecuzione, forse in attesa di un callback asincrono (manuale, ritardo ecc.).",
151
+ "Successfully finished.": "Terminato con successo.",
152
+ "Failed to satisfy node configurations.": "Fallito nel soddisfare le configurazioni del nodo.",
153
+ "Some node meets error.": "Qualche nodo presenta un errore.",
154
+ "Running of some node was aborted by program flow.": "L'esecuzione di qualche nodo è stata interrotta dal flusso del programma.",
155
+ "Manually canceled whole execution when waiting.": "L'intera esecuzione è stata cancellata manualmente durante l'attesa.",
156
+ "Rejected from a manual node.": "Rifiutato da un nodo manuale.",
157
+ "General failed but should do another try.": "Fallimento generico, ma dovrebbe essere fatto un altro tentativo.",
158
+ "Cancel the execution": "Annulla l'esecuzione",
159
+ "Are you sure you want to cancel the execution?": "Sei sicuro di voler annullare l'esecuzione?",
160
+ "Operations": "Operazioni",
161
+ "Manual": "Manuale",
162
+ "Unknown node": "Nodo sconosciuto",
163
+ "Node with unknown type will cause error. Please delete it or check plugin which provide this type.": "Un nodo con tipo sconosciuto causerà un errore. Si prega di eliminarlo o controllare il plugin che fornisce questo tipo.",
164
+ "Calculation engine": "Motore di calcolo",
165
+ "Basic": "Base",
166
+ "Calculation expression": "Espressione di calcolo",
167
+ "Expression syntax error": "Errore di sintassi dell'espressione",
168
+ "Syntax references: ": "Riferimenti di sintassi:",
169
+ "Based on boolean result of the calculation to determine whether to \"continue\" or \"exit\" the process, or continue on different branches of \"yes\" and \"no\".": "Basato sul risultato booleano del calcolo per determinare se \"continuare\" o \"uscire\" dal processo, o continuare su rami diversi di \"sì\" e \"no\".",
170
+ "Condition expression": "Espressione di condizione",
171
+ "Inside of \"Yes\" branch": "All'interno del ramo \"Sì\"",
172
+ "Inside of \"No\" branch": "All'interno del ramo \"No\"",
173
+ "Add new record to a collection. You can use variables from upstream nodes to assign values to fields.": "Aggiungi un nuovo record a una raccolta. Puoi usare variabili dai nodi upstream per assegnare valori ai campi.",
174
+ "Update records of a collection. You can use variables from upstream nodes as query conditions and field values.": "Aggiorna i record di una raccolta. Puoi usare variabili dai nodi upstream come condizioni di query e valori campo.",
175
+ "Update mode": "Modalità di aggiornamento",
176
+ "Update in a batch": "Aggiornamento in batch",
177
+ "Update one by one": "Aggiornamento uno per uno",
178
+ "Update all eligible data at one time, which has better performance when the amount of data is large. But association fields are not supported (unless foreign key in current collection), and the updated data will not trigger other workflows.": "Aggiorna tutti i dati idonei in una volta, il che ha prestazioni migliori quando la quantità di dati è grande. Ma i campi di associazione non sono supportati (a meno che la chiave esterna non sia nella raccolta corrente), e i dati aggiornati non attiveranno altri workflow.",
179
+ "The updated data can trigger other workflows, and the audit log will also be recorded. But it is usually only applicable to several or dozens of pieces of data, otherwise there will be performance problems.": "I dati aggiornati possono attivare altri workflow, e il registro eventi sarà anche registrato. Ma di solito è applicabile solo a diverse o decine di dati, altrimenti ci saranno problemi di prestazioni.",
180
+ "Query records from a collection. You can use variables from upstream nodes as query conditions.": "Interroga i record da una raccolta. Puoi usare variabili dai nodi upstream come condizioni di query.",
181
+ "Allow multiple records as result": "Consenti più record come risultato",
182
+ "If checked, when there are multiple records in the query result, an array will be returned as the result, which can be operated on one by one using a loop node. Otherwise, only one record will be returned.": "Se selezionato, quando ci sono più record nel risultato della query, sarà restituito come risultato un array, che può essere operato uno per uno usando un nodo ciclo. Altrimenti, sarà restituito solo un record.",
183
+ "Result type": "Tipo risultato",
184
+ "Single record": "Record singolo",
185
+ "The result will be an object of the first matching record only, or null if no matched record.": "Il risultato sarà un oggetto solo del primo record corrispondente, oppure null se non vi è alcun record corrispondente.",
186
+ "The result will be an array containing matched records, or an empty one if no matching records. This can be used to be processed in a loop node.": "Il risultato sarà un array contenente record corrispondenti, o uno vuoto se non ci sono record corrispondenti. Questo può essere usato per essere elaborato in un nodo ciclo.",
187
+ "Exit when query result is null": "Esci quando il risultato della query è null",
188
+ "Please add at least one condition": "Si prega di aggiungere almeno una condizione",
189
+ "Unassigned fields will be set to default values, and those without default values will be set to null.": "I campi non assegnati saranno impostati ai valori predefiniti, e quelli senza valori predefiniti saranno impostati a null.",
190
+ "Delete record": "Elimina record",
191
+ "Delete records of a collection. Could use variables in workflow context as filter. All records match the filter will be deleted.": "Elimina i record di una raccolta. Potrebbe usare variabili nel contesto del workflow come filtro. Tutti i record che corrispondono al filtro saranno eliminati.",
192
+ "Executed workflow cannot be modified. Could be copied to a new version to modify.": "Il workflow eseguito non può essere modificato. Potrebbe essere copiato in una nuova versione per essere modificato.",
193
+ "End process": "Termina processo",
194
+ "End the process immediately, with set status.": "Termina il processo immediatamente, con stato impostato.",
195
+ "End status": "Stato finale",
196
+ "Test run": "Test run",
197
+ "Test run will do the actual data manipulating or API calling, please use with caution.": "Il test run farà l'effettiva manipolazione dei dati o la chiamata API, si prega di usare con cautela.",
198
+ "No variable": "Nessuna variabile",
199
+ "Add node": "Aggiungi nodo",
200
+ "Move all downstream nodes to": "Sposta tutti i nodi downstream a",
201
+ "After end of branches": "Dopo la fine dei rami",
202
+ "Inside of branch": "All'interno del ramo",
203
+ "Workflow todos": "Da fare",
204
+ "New version enabled": "Nuova versione abilitata"
100
205
  }
@@ -0,0 +1,100 @@
1
+ {
2
+ "Workflow": "Workflow",
3
+ "Execution history": "Execution history",
4
+ "Executed": "Executed",
5
+ "Trigger type": "Trigger type",
6
+ "Status": "Status",
7
+ "On": "Aan",
8
+ "Off": "Uit",
9
+ "Version": "Versie",
10
+ "Copy to new version": "Copy to new version",
11
+ "Duplicate": "Dupliceren",
12
+ "Loading": "Loading",
13
+ "Load failed": "Load failed",
14
+ "Trigger": "Trigger",
15
+ "Trigger variables": "Trigger variables",
16
+ "Trigger data": "Trigger data",
17
+ "Trigger time": "Trigger time",
18
+ "Triggered at": "Triggered at",
19
+ "Collection event": "Collection event",
20
+ "Trigger on": "Trigger on",
21
+ "After record added": "After record added",
22
+ "After record updated": "After record updated",
23
+ "After record added or updated": "After record added or updated",
24
+ "After record deleted": "After record deleted",
25
+ "Changed fields": "Changed fields",
26
+ "Triggered only if one of the selected fields changes. If unselected, it means that it will be triggered when any field changes. When record is added or deleted, any field is considered to have been changed.": "Triggered only if one of the selected fields changes. If unselected, it means that it will be triggered when any field changes. When record is added or deleted, any field is considered to have been changed.",
27
+ "Only triggers when match conditions": "Only triggers when match conditions",
28
+ "Schedule event": "Schedule event",
29
+ "Trigger mode": "Trigger mode",
30
+ "Based on certain date": "Based on certain date",
31
+ "Based on date field of collection": "Based on date field of collection",
32
+ "Starts on": "Starts on",
33
+ "Ends on": "Ends on",
34
+ "No end": "No end",
35
+ "Exactly at": "Exactly at",
36
+ "Repeat mode": "Repeat mode",
37
+ "Repeat limit": "Repeat limit",
38
+ "No limit": "No limit",
39
+ "Seconds": "Seconds",
40
+ "Minutes": "Minutes",
41
+ "Hours": "Hours",
42
+ "Days": "Days",
43
+ "Weeks": "Weeks",
44
+ "Months": "Months",
45
+ "No repeat": "No repeat",
46
+ "Every": "Every",
47
+ "By minute": "By minute",
48
+ "By hour": "By hour",
49
+ "By day": "By day",
50
+ "By week": "By week",
51
+ "By month": "By month",
52
+ "By field": "By field",
53
+ "By custom date": "By custom date",
54
+ "Advanced": "Advanced",
55
+ "End": "End",
56
+ "Node result": "Node result",
57
+ "Constant": "Constant",
58
+ "Null": "Null",
59
+ "Boolean": "Boolean",
60
+ "String": "String",
61
+ "Operator": "Operator",
62
+ "Arithmetic calculation": "Arithmetic calculation",
63
+ "String operation": "String operation",
64
+ "Executed at": "Executed at",
65
+ "Queueing": "Queueing",
66
+ "On going": "On going",
67
+ "Succeeded": "Succeeded",
68
+ "Failed": "Failed",
69
+ "Pending": "Pending",
70
+ "Canceled": "Canceled",
71
+ "This node contains branches, deleting will also be preformed to them, are you sure?": "This node contains branches, deleting will also be preformed to them, are you sure?",
72
+ "Control": "Control",
73
+ "Collection operations": "Collection operations",
74
+ "Extended types": "Extended types",
75
+ "Node type": "Node type",
76
+ "Calculation": "Calculation",
77
+ "Configure calculation": "Configure calculation",
78
+ "Calculation result": "Calculation result",
79
+ "True": "True",
80
+ "False": "False",
81
+ "concat": "concat",
82
+ "Condition": "Voorwaarde",
83
+ "Mode": "Mode",
84
+ "Continue when \"Yes\"": "Continue when \"Yes\"",
85
+ "Branch into \"Yes\" and \"No\"": "Branch into \"Yes\" and \"No\"",
86
+ "Conditions": "Conditions",
87
+ "Create record": "Create record",
88
+ "Update record": "Record bijwerken",
89
+ "Query record": "Query record",
90
+ "Multiple records": "Multiple records",
91
+ "Please select collection first": "Please select collection first",
92
+ "Only update records matching conditions": "Only update records matching conditions",
93
+ "Fields that are not assigned a value will be set to the default value, and those that do not have a default value are set to null.": "Fields that are not assigned a value will be set to the default value, and those that do not have a default value are set to null.",
94
+ "Trigger in executed workflow cannot be modified": "Trigger in executed workflow cannot be modified",
95
+ "Node in executed workflow cannot be modified": "Node in executed workflow cannot be modified",
96
+ "Can not delete": "Can not delete",
97
+ "The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.": "The result of this node has been referenced by other nodes ({{nodes}}), please remove the usage before deleting.",
98
+ "Maximum number of loop calls": "Maximum number of loop calls",
99
+ "If the number of loop calls is too large, there will be performance issues.": "If the number of loop calls is too large, there will be performance issues."
100
+ }
@@ -33,6 +33,10 @@
33
33
  "Auto delete history when execution is on end status": "执行结束后自动删除对应状态的历史记录",
34
34
  "Maximum number of cycling triggers": "最大循环触发次数",
35
35
  "The triggers of same workflow by some node (create, update and sub-flow etc.) more than this number will be ignored. Large number may cause performance issues. Please use with caution.": "由某个节点(创建、更新和子流程等)触发同一个工作流超过这个次数时将被忽略。设置过高的次数可能会导致性能问题,请谨慎使用。",
36
+
37
+ "Continue when disabled or upgraded": "工作流被禁用或升级到新版本继续处理在途流程",
38
+ "If checked, all nodes in-progress could continue to be processed in execution of disabled workflow. Otherwise, all nodes in-progress will be aborted automatically.": "如果选中,在途的节点在禁用或升级到新版本的工作流中将继续处理。否则将自动取消执行。",
39
+
36
40
  "Trigger": "触发器",
37
41
  "Unknown trigger": "未知触发器",
38
42
  "Workflow with unknown type will cause error. Please delete it or check plugin which provide this type.": "未知类型的工作流会导致错误,请删除或检查提供该类型的插件。",
@@ -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":"2025-03-11T04:46:44.709Z"}
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":"2025-03-27T04:34:56.815Z"}
@@ -1 +1 @@
1
- {"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"8.0.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","preprepare":"rm -rf dist","prepare":"tsc -p tsconfig.json && tsc -p tsconfig-esm.json","postprepare":"bash fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"c8 tap","snap":"c8 tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig tsconfig-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"},"main":"./dist/cjs/index-cjs.js","module":"./dist/mjs/index.js","types":"./dist/mjs/index.d.ts","exports":{"./min":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.min.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.min.js"}},".":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index-cjs.js"}}},"repository":"git://github.com/isaacs/node-lru-cache.git","devDependencies":{"@size-limit/preset-small-lib":"^7.0.8","@types/node":"^17.0.31","@types/tap":"^15.0.6","benchmark":"^2.1.4","c8":"^7.11.2","clock-mock":"^1.0.6","esbuild":"^0.17.11","eslint-config-prettier":"^8.5.0","marked":"^4.2.12","mkdirp":"^2.1.5","prettier":"^2.6.2","size-limit":"^7.0.8","tap":"^16.3.4","ts-node":"^10.7.0","tslib":"^2.4.0","typedoc":"^0.23.24","typescript":"^4.6.4"},"license":"ISC","files":["dist"],"engines":{"node":">=16.14"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tap":{"coverage":false,"node-arg":["--expose-gc","--no-warnings","--loader","ts-node/esm"],"ts":false},"size-limit":[{"path":"./dist/mjs/index.js"}],"_lastModified":"2025-03-11T04:46:44.405Z"}
1
+ {"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"8.0.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","preprepare":"rm -rf dist","prepare":"tsc -p tsconfig.json && tsc -p tsconfig-esm.json","postprepare":"bash fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"c8 tap","snap":"c8 tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig tsconfig-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"},"main":"./dist/cjs/index-cjs.js","module":"./dist/mjs/index.js","types":"./dist/mjs/index.d.ts","exports":{"./min":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.min.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.min.js"}},".":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index-cjs.js"}}},"repository":"git://github.com/isaacs/node-lru-cache.git","devDependencies":{"@size-limit/preset-small-lib":"^7.0.8","@types/node":"^17.0.31","@types/tap":"^15.0.6","benchmark":"^2.1.4","c8":"^7.11.2","clock-mock":"^1.0.6","esbuild":"^0.17.11","eslint-config-prettier":"^8.5.0","marked":"^4.2.12","mkdirp":"^2.1.5","prettier":"^2.6.2","size-limit":"^7.0.8","tap":"^16.3.4","ts-node":"^10.7.0","tslib":"^2.4.0","typedoc":"^0.23.24","typescript":"^4.6.4"},"license":"ISC","files":["dist"],"engines":{"node":">=16.14"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tap":{"coverage":false,"node-arg":["--expose-gc","--no-warnings","--loader","ts-node/esm"],"ts":false},"size-limit":[{"path":"./dist/mjs/index.js"}],"_lastModified":"2025-03-27T04:34:56.431Z"}
@@ -76,6 +76,9 @@ class PluginWorkflowServer extends import_server.Plugin {
76
76
  checker = null;
77
77
  onBeforeSave = async (instance, { transaction }) => {
78
78
  const Model = instance.constructor;
79
+ if (!instance.key) {
80
+ instance.set("key", (0, import_utils.uid)());
81
+ }
79
82
  if (instance.enabled) {
80
83
  instance.set("current", true);
81
84
  }
@@ -247,19 +250,34 @@ class PluginWorkflowServer extends import_server.Plugin {
247
250
  }
248
251
  });
249
252
  db.on("workflows.beforeSave", this.onBeforeSave);
250
- db.on("workflows.afterCreate", (model, { transaction }) => {
253
+ db.on("workflows.afterCreate", async (model, { transaction }) => {
254
+ const WorkflowStatsModel = this.db.getModel("workflowStats");
255
+ const [stats, created] = await WorkflowStatsModel.findOrCreate({
256
+ where: { key: model.key },
257
+ defaults: { key: model.key },
258
+ transaction
259
+ });
260
+ model.stats = stats;
261
+ model.versionStats = await model.createVersionStats({ id: model.id }, { transaction });
251
262
  if (model.enabled) {
252
263
  this.toggle(model, true, { transaction });
253
264
  }
254
265
  });
255
- db.on(
256
- "workflows.afterUpdate",
257
- (model, { transaction }) => this.toggle(model, model.enabled, { transaction })
258
- );
259
- db.on(
260
- "workflows.afterDestroy",
261
- (model, { transaction }) => this.toggle(model, false, { transaction })
262
- );
266
+ db.on("workflows.afterUpdate", async (model, { transaction }) => {
267
+ model.stats = await model.getStats({ transaction });
268
+ model.versionStats = await model.getVersionStats({ transaction });
269
+ this.toggle(model, model.enabled, { transaction });
270
+ });
271
+ db.on("workflows.afterDestroy", async (model, { transaction }) => {
272
+ this.toggle(model, false, { transaction });
273
+ const TaskRepo = this.db.getRepository("workflowTasks");
274
+ await TaskRepo.destroy({
275
+ filter: {
276
+ workflowId: model.id
277
+ },
278
+ transaction
279
+ });
280
+ });
263
281
  this.app.on("afterStart", async () => {
264
282
  this.ready = true;
265
283
  const collection = db.getCollection("workflows");
@@ -464,21 +482,20 @@ class PluginWorkflowServer extends import_server.Plugin {
464
482
  throw err;
465
483
  }
466
484
  this.getLogger(workflow.id).info(`execution of workflow ${workflow.id} created as ${execution.id}`);
467
- await workflow.increment(["executed", "allExecuted"], { transaction });
485
+ if (!workflow.stats) {
486
+ workflow.stats = await workflow.getStats({ transaction });
487
+ }
488
+ await workflow.stats.increment("executed", { transaction });
468
489
  if (this.db.options.dialect !== "postgres") {
469
- await workflow.reload({ transaction });
490
+ await workflow.stats.reload({ transaction });
491
+ }
492
+ if (!workflow.versionStats) {
493
+ workflow.versionStats = await workflow.getVersionStats({ transaction });
494
+ }
495
+ await workflow.versionStats.increment("executed", { transaction });
496
+ if (this.db.options.dialect !== "postgres") {
497
+ await workflow.versionStats.reload({ transaction });
470
498
  }
471
- await workflow.constructor.update(
472
- {
473
- allExecuted: workflow.allExecuted
474
- },
475
- {
476
- where: {
477
- key: workflow.key
478
- },
479
- transaction
480
- }
481
- );
482
499
  if (!sameTransaction) {
483
500
  await transaction.commit();
484
501
  }
@@ -653,7 +670,8 @@ class PluginWorkflowServer extends import_server.Plugin {
653
670
  if (task.userId) {
654
671
  const counts = await repository.countAll({
655
672
  where: {
656
- userId: task.userId
673
+ userId: task.userId,
674
+ workflowId: { [import_database.Op.ne]: null }
657
675
  },
658
676
  transaction
659
677
  }) || [];
@@ -51,7 +51,9 @@ async function create(context, next) {
51
51
  const { whitelist, blacklist, updateAssociationValues, values, associatedIndex: workflowId } = context.action.params;
52
52
  context.body = await db.sequelize.transaction(async (transaction) => {
53
53
  const workflow = await repository.getSourceModel(transaction);
54
- if (workflow.executed) {
54
+ workflow.versionStats = await workflow.getVersionStats({ transaction });
55
+ const { executed } = workflow.versionStats;
56
+ if (executed) {
55
57
  context.throw(400, "Node could not be created in executed workflow");
56
58
  }
57
59
  const instance = await repository.create({
@@ -143,9 +145,9 @@ async function destroy(context, next) {
143
145
  const instance = await repository.findOne({
144
146
  filterByTk,
145
147
  fields: [...fields, "workflowId"],
146
- appends: ["upstream", "downstream", "workflow"]
148
+ appends: ["upstream", "downstream", "workflow.versionStats.executed"]
147
149
  });
148
- if (instance.workflow.executed) {
150
+ if (instance.workflow.versionStats.executed) {
149
151
  context.throw(400, "Nodes in executed workflow could not be deleted");
150
152
  }
151
153
  await db.sequelize.transaction(async (transaction) => {
@@ -202,10 +204,10 @@ async function update(context, next) {
202
204
  context.body = await db.sequelize.transaction(async (transaction) => {
203
205
  const { workflow } = await repository.findOne({
204
206
  filterByTk,
205
- appends: ["workflow.executed"],
207
+ appends: ["workflow.versionStats.executed"],
206
208
  transaction
207
209
  });
208
- if (workflow.executed) {
210
+ if (workflow.versionStats.executed) {
209
211
  context.throw(400, "Nodes in executed workflow could not be reconfigured");
210
212
  }
211
213
  return repository.update({
@@ -29,15 +29,17 @@ __export(workflowTasks_exports, {
29
29
  countMine: () => countMine
30
30
  });
31
31
  module.exports = __toCommonJS(workflowTasks_exports);
32
+ var import_sequelize = require("sequelize");
32
33
  var import_actions = require("@nocobase/actions");
33
34
  async function countMine(context, next) {
34
35
  const repository = import_actions.utils.getRepositoryFromParams(context);
35
36
  context.body = await repository.countAll({
36
37
  where: {
37
- userId: context.state.currentUser.id
38
+ userId: context.state.currentUser.id,
39
+ workflowId: { [import_sequelize.Op.ne]: null }
38
40
  }
39
41
  }) || [];
40
- next();
42
+ await next();
41
43
  }
42
44
  // Annotate the CommonJS export names for ESM import in node:
43
45
  0 && (module.exports = {
@@ -53,8 +53,11 @@ async function update(context, next) {
53
53
  whitelist: ["title", "description", "enabled", "triggerTitle", "config", "options"]
54
54
  });
55
55
  if (Object.keys(values).includes("config")) {
56
- const workflow = await repository.findById(filterByTk);
57
- if (workflow.get("executed")) {
56
+ const workflow = await repository.findOne({
57
+ filterByTk,
58
+ appends: ["versionStats"]
59
+ });
60
+ if (workflow.versionStats.executed) {
58
61
  return context.throw(400, "config of executed workflow can not be updated");
59
62
  }
60
63
  }
@@ -7,9 +7,11 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
+ var __create = Object.create;
10
11
  var __defProp = Object.defineProperty;
11
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
13
  var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
13
15
  var __hasOwnProp = Object.prototype.hasOwnProperty;
14
16
  var __export = (target, all) => {
15
17
  for (var name in all)
@@ -23,53 +25,19 @@ var __copyProps = (to, from, except, desc) => {
23
25
  }
24
26
  return to;
25
27
  };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
26
36
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
37
  var executions_exports = {};
28
38
  __export(executions_exports, {
29
39
  default: () => executions_default
30
40
  });
31
41
  module.exports = __toCommonJS(executions_exports);
32
- var executions_default = {
33
- dumpRules: {
34
- group: "log"
35
- },
36
- migrationRules: ["schema-only"],
37
- name: "executions",
38
- shared: true,
39
- fields: [
40
- {
41
- type: "belongsTo",
42
- name: "workflow"
43
- },
44
- {
45
- type: "string",
46
- name: "key"
47
- },
48
- {
49
- type: "string",
50
- name: "eventKey",
51
- unique: true
52
- },
53
- {
54
- type: "hasMany",
55
- name: "jobs",
56
- onDelete: "CASCADE"
57
- },
58
- {
59
- type: "json",
60
- name: "context"
61
- },
62
- {
63
- type: "integer",
64
- name: "status"
65
- },
66
- {
67
- type: "json",
68
- name: "stack"
69
- },
70
- {
71
- type: "json",
72
- name: "output"
73
- }
74
- ]
75
- };
42
+ var import_executions = __toESM(require("../../common/collections/executions"));
43
+ var executions_default = import_executions.default;