@fractal-solutions/qflow 1.0.55 → 1.0.57
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/README.md +17 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -84,26 +84,6 @@ A `Flow` orchestrates the execution of a sequence of `Node`s. It defines the ove
|
|
|
84
84
|
**Batch Flows (`BatchFlow`, `AsyncBatchFlow`, `AsyncParallelBatchFlow`)**
|
|
85
85
|
These specialized flows are designed to process collections of items. They run a sub-flow for each item in the batch. `AsyncParallelBatchFlow` is particularly useful for concurrently processing batch items, significantly speeding up operations.
|
|
86
86
|
|
|
87
|
-
## Observability (Event System)
|
|
88
|
-
|
|
89
|
-
`qflow` includes a built-in event system for `AsyncFlow` that provides detailed insights into the execution of your workflows. This allows for powerful, real-time monitoring, logging, and debugging.
|
|
90
|
-
|
|
91
|
-
You can attach listeners to an `AsyncFlow` instance to subscribe to key lifecycle events.
|
|
92
|
-
|
|
93
|
-
### Available Events
|
|
94
|
-
|
|
95
|
-
* `flow:start`: Emitted when the flow begins.
|
|
96
|
-
* **Payload:** `{ flowId, startTime }`
|
|
97
|
-
* `flow:end`: Emitted when the flow finishes, either successfully or with an error.
|
|
98
|
-
* **Payload:** `{ flowId, endTime, duration, status, error }`
|
|
99
|
-
* `node:start`: Emitted just before a node executes.
|
|
100
|
-
* **Payload:** `{ flowId, nodeClass, startTime, params }`
|
|
101
|
-
* `node:end`: Emitted right after a node finishes.
|
|
102
|
-
* **Payload:** `{ flowId, nodeClass, endTime, duration, status, result, error }`
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
87
|
|
|
108
88
|
## Basic Usage & Examples
|
|
109
89
|
|
|
@@ -268,7 +248,23 @@ await asyncFlow.runAsync({});
|
|
|
268
248
|
|
|
269
249
|
See [documentation/examples.md](documentation/examples.md) for a full list of examples.
|
|
270
250
|
|
|
271
|
-
|
|
251
|
+
## Observability (Event System)
|
|
252
|
+
|
|
253
|
+
`qflow` includes a built-in event system for `AsyncFlow` that provides detailed insights into the execution of your workflows. This allows for powerful, real-time monitoring, logging, and debugging.
|
|
254
|
+
|
|
255
|
+
You can attach listeners to an `AsyncFlow` instance to subscribe to key lifecycle events.
|
|
256
|
+
|
|
257
|
+
### Available Events
|
|
258
|
+
|
|
259
|
+
* `flow:start`: Emitted when the flow begins.
|
|
260
|
+
* **Payload:** `{ flowId, startTime }`
|
|
261
|
+
* `flow:end`: Emitted when the flow finishes, either successfully or with an error.
|
|
262
|
+
* **Payload:** `{ flowId, endTime, duration, status, error }`
|
|
263
|
+
* `node:start`: Emitted just before a node executes.
|
|
264
|
+
* **Payload:** `{ flowId, nodeClass, startTime, params }`
|
|
265
|
+
* `node:end`: Emitted right after a node finishes.
|
|
266
|
+
* **Payload:** `{ flowId, nodeClass, endTime, duration, status, result, error }`
|
|
267
|
+
|
|
272
268
|
|
|
273
269
|
This example demonstrates how to use the built-in event system to monitor the execution of a flow.
|
|
274
270
|
|
package/package.json
CHANGED