@hotmeshio/hotmesh 0.3.32 → 0.4.0

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 (254) hide show
  1. package/README.md +128 -823
  2. package/build/index.d.ts +9 -9
  3. package/build/index.js +10 -10
  4. package/build/package.json +22 -21
  5. package/build/types/error.d.ts +5 -5
  6. package/build/types/exporter.d.ts +1 -1
  7. package/build/types/index.d.ts +3 -3
  8. package/build/types/manifest.d.ts +2 -2
  9. package/build/types/{meshflow.d.ts → memflow.d.ts} +15 -15
  10. package/build/types/meshdata.d.ts +3 -3
  11. package/build/types/postgres.d.ts +7 -0
  12. package/build/types/stream.d.ts +3 -0
  13. package/index.ts +11 -11
  14. package/package.json +22 -21
  15. package/typedoc.json +8 -7
  16. package/types/error.ts +5 -5
  17. package/types/exporter.ts +1 -1
  18. package/types/index.ts +7 -7
  19. package/types/manifest.ts +2 -2
  20. package/types/{meshflow.ts → memflow.ts} +15 -15
  21. package/types/meshdata.ts +3 -3
  22. package/types/postgres.ts +9 -0
  23. package/types/stream.ts +4 -0
  24. package/build/modules/enums.d.ts +0 -110
  25. package/build/modules/enums.js +0 -134
  26. package/build/modules/errors.d.ts +0 -124
  27. package/build/modules/errors.js +0 -191
  28. package/build/modules/key.d.ts +0 -66
  29. package/build/modules/key.js +0 -1
  30. package/build/modules/storage.d.ts +0 -3
  31. package/build/modules/storage.js +0 -5
  32. package/build/modules/utils.d.ts +0 -119
  33. package/build/modules/utils.js +0 -1
  34. package/build/services/activities/activity.d.ts +0 -104
  35. package/build/services/activities/activity.js +0 -1
  36. package/build/services/activities/await.d.ts +0 -12
  37. package/build/services/activities/await.js +0 -1
  38. package/build/services/activities/cycle.d.ts +0 -19
  39. package/build/services/activities/cycle.js +0 -1
  40. package/build/services/activities/hook.d.ts +0 -27
  41. package/build/services/activities/hook.js +0 -1
  42. package/build/services/activities/index.d.ts +0 -19
  43. package/build/services/activities/index.js +0 -1
  44. package/build/services/activities/interrupt.d.ts +0 -16
  45. package/build/services/activities/interrupt.js +0 -1
  46. package/build/services/activities/signal.d.ts +0 -20
  47. package/build/services/activities/signal.js +0 -1
  48. package/build/services/activities/trigger.d.ts +0 -37
  49. package/build/services/activities/trigger.js +0 -1
  50. package/build/services/activities/worker.d.ts +0 -12
  51. package/build/services/activities/worker.js +0 -1
  52. package/build/services/collator/index.d.ts +0 -111
  53. package/build/services/collator/index.js +0 -1
  54. package/build/services/compiler/deployer.d.ts +0 -40
  55. package/build/services/compiler/deployer.js +0 -1
  56. package/build/services/compiler/index.d.ts +0 -32
  57. package/build/services/compiler/index.js +0 -1
  58. package/build/services/compiler/validator.d.ts +0 -34
  59. package/build/services/compiler/validator.js +0 -1
  60. package/build/services/connector/factory.d.ts +0 -22
  61. package/build/services/connector/factory.js +0 -99
  62. package/build/services/connector/index.d.ts +0 -30
  63. package/build/services/connector/index.js +0 -54
  64. package/build/services/connector/providers/ioredis.d.ts +0 -9
  65. package/build/services/connector/providers/ioredis.js +0 -26
  66. package/build/services/connector/providers/nats.d.ts +0 -9
  67. package/build/services/connector/providers/nats.js +0 -34
  68. package/build/services/connector/providers/postgres.d.ts +0 -20
  69. package/build/services/connector/providers/postgres.js +0 -102
  70. package/build/services/connector/providers/redis.d.ts +0 -9
  71. package/build/services/connector/providers/redis.js +0 -38
  72. package/build/services/engine/index.d.ts +0 -264
  73. package/build/services/engine/index.js +0 -1
  74. package/build/services/exporter/index.d.ts +0 -44
  75. package/build/services/exporter/index.js +0 -1
  76. package/build/services/hotmesh/index.d.ts +0 -340
  77. package/build/services/hotmesh/index.js +0 -479
  78. package/build/services/logger/index.d.ts +0 -16
  79. package/build/services/logger/index.js +0 -54
  80. package/build/services/mapper/index.d.ts +0 -28
  81. package/build/services/mapper/index.js +0 -1
  82. package/build/services/meshcall/index.d.ts +0 -194
  83. package/build/services/meshcall/index.js +0 -452
  84. package/build/services/meshcall/schemas/factory.d.ts +0 -9
  85. package/build/services/meshcall/schemas/factory.js +0 -189
  86. package/build/services/meshdata/index.d.ts +0 -795
  87. package/build/services/meshdata/index.js +0 -1235
  88. package/build/services/meshflow/client.d.ts +0 -108
  89. package/build/services/meshflow/client.js +0 -371
  90. package/build/services/meshflow/connection.d.ts +0 -23
  91. package/build/services/meshflow/connection.js +0 -33
  92. package/build/services/meshflow/exporter.d.ts +0 -51
  93. package/build/services/meshflow/exporter.js +0 -1
  94. package/build/services/meshflow/handle.d.ts +0 -90
  95. package/build/services/meshflow/handle.js +0 -176
  96. package/build/services/meshflow/index.d.ts +0 -111
  97. package/build/services/meshflow/index.js +0 -117
  98. package/build/services/meshflow/schemas/factory.d.ts +0 -29
  99. package/build/services/meshflow/schemas/factory.js +0 -2492
  100. package/build/services/meshflow/search.d.ts +0 -142
  101. package/build/services/meshflow/search.js +0 -320
  102. package/build/services/meshflow/worker.d.ts +0 -124
  103. package/build/services/meshflow/worker.js +0 -514
  104. package/build/services/meshflow/workflow/all.d.ts +0 -7
  105. package/build/services/meshflow/workflow/all.js +0 -15
  106. package/build/services/meshflow/workflow/common.d.ts +0 -18
  107. package/build/services/meshflow/workflow/common.js +0 -45
  108. package/build/services/meshflow/workflow/context.d.ts +0 -6
  109. package/build/services/meshflow/workflow/context.js +0 -45
  110. package/build/services/meshflow/workflow/didRun.d.ts +0 -7
  111. package/build/services/meshflow/workflow/didRun.js +0 -22
  112. package/build/services/meshflow/workflow/emit.d.ts +0 -11
  113. package/build/services/meshflow/workflow/emit.js +0 -29
  114. package/build/services/meshflow/workflow/enrich.d.ts +0 -9
  115. package/build/services/meshflow/workflow/enrich.js +0 -17
  116. package/build/services/meshflow/workflow/execChild.d.ts +0 -18
  117. package/build/services/meshflow/workflow/execChild.js +0 -102
  118. package/build/services/meshflow/workflow/hook.d.ts +0 -9
  119. package/build/services/meshflow/workflow/hook.js +0 -40
  120. package/build/services/meshflow/workflow/index.d.ts +0 -70
  121. package/build/services/meshflow/workflow/index.js +0 -83
  122. package/build/services/meshflow/workflow/interrupt.d.ts +0 -9
  123. package/build/services/meshflow/workflow/interrupt.js +0 -24
  124. package/build/services/meshflow/workflow/isSideEffectAllowed.d.ts +0 -10
  125. package/build/services/meshflow/workflow/isSideEffectAllowed.js +0 -33
  126. package/build/services/meshflow/workflow/proxyActivities.d.ts +0 -20
  127. package/build/services/meshflow/workflow/proxyActivities.js +0 -97
  128. package/build/services/meshflow/workflow/random.d.ts +0 -6
  129. package/build/services/meshflow/workflow/random.js +0 -16
  130. package/build/services/meshflow/workflow/searchMethods.d.ts +0 -6
  131. package/build/services/meshflow/workflow/searchMethods.js +0 -25
  132. package/build/services/meshflow/workflow/signal.d.ts +0 -7
  133. package/build/services/meshflow/workflow/signal.js +0 -28
  134. package/build/services/meshflow/workflow/sleepFor.d.ts +0 -8
  135. package/build/services/meshflow/workflow/sleepFor.js +0 -35
  136. package/build/services/meshflow/workflow/trace.d.ts +0 -14
  137. package/build/services/meshflow/workflow/trace.js +0 -33
  138. package/build/services/meshflow/workflow/waitFor.d.ts +0 -8
  139. package/build/services/meshflow/workflow/waitFor.js +0 -35
  140. package/build/services/meshos/index.d.ts +0 -293
  141. package/build/services/meshos/index.js +0 -547
  142. package/build/services/pipe/functions/array.d.ts +0 -17
  143. package/build/services/pipe/functions/array.js +0 -1
  144. package/build/services/pipe/functions/bitwise.d.ts +0 -9
  145. package/build/services/pipe/functions/bitwise.js +0 -1
  146. package/build/services/pipe/functions/conditional.d.ts +0 -13
  147. package/build/services/pipe/functions/conditional.js +0 -1
  148. package/build/services/pipe/functions/cron.d.ts +0 -12
  149. package/build/services/pipe/functions/cron.js +0 -1
  150. package/build/services/pipe/functions/date.d.ts +0 -58
  151. package/build/services/pipe/functions/date.js +0 -1
  152. package/build/services/pipe/functions/index.d.ts +0 -29
  153. package/build/services/pipe/functions/index.js +0 -1
  154. package/build/services/pipe/functions/json.d.ts +0 -5
  155. package/build/services/pipe/functions/json.js +0 -1
  156. package/build/services/pipe/functions/logical.d.ts +0 -5
  157. package/build/services/pipe/functions/logical.js +0 -1
  158. package/build/services/pipe/functions/math.d.ts +0 -42
  159. package/build/services/pipe/functions/math.js +0 -1
  160. package/build/services/pipe/functions/number.d.ts +0 -21
  161. package/build/services/pipe/functions/number.js +0 -1
  162. package/build/services/pipe/functions/object.d.ts +0 -25
  163. package/build/services/pipe/functions/object.js +0 -1
  164. package/build/services/pipe/functions/string.d.ts +0 -23
  165. package/build/services/pipe/functions/string.js +0 -1
  166. package/build/services/pipe/functions/symbol.d.ts +0 -12
  167. package/build/services/pipe/functions/symbol.js +0 -1
  168. package/build/services/pipe/functions/unary.d.ts +0 -7
  169. package/build/services/pipe/functions/unary.js +0 -1
  170. package/build/services/pipe/index.d.ts +0 -48
  171. package/build/services/pipe/index.js +0 -1
  172. package/build/services/quorum/index.d.ts +0 -90
  173. package/build/services/quorum/index.js +0 -1
  174. package/build/services/reporter/index.d.ts +0 -50
  175. package/build/services/reporter/index.js +0 -1
  176. package/build/services/router/index.d.ts +0 -60
  177. package/build/services/router/index.js +0 -1
  178. package/build/services/search/factory.d.ts +0 -7
  179. package/build/services/search/factory.js +0 -24
  180. package/build/services/search/index.d.ts +0 -22
  181. package/build/services/search/index.js +0 -10
  182. package/build/services/search/providers/postgres/postgres.d.ts +0 -24
  183. package/build/services/search/providers/postgres/postgres.js +0 -1
  184. package/build/services/search/providers/redis/ioredis.d.ts +0 -18
  185. package/build/services/search/providers/redis/ioredis.js +0 -1
  186. package/build/services/search/providers/redis/redis.d.ts +0 -18
  187. package/build/services/search/providers/redis/redis.js +0 -1
  188. package/build/services/serializer/index.d.ts +0 -42
  189. package/build/services/serializer/index.js +0 -1
  190. package/build/services/store/cache.d.ts +0 -67
  191. package/build/services/store/cache.js +0 -128
  192. package/build/services/store/factory.d.ts +0 -8
  193. package/build/services/store/factory.js +0 -24
  194. package/build/services/store/index.d.ts +0 -89
  195. package/build/services/store/index.js +0 -9
  196. package/build/services/store/providers/postgres/kvsql.d.ts +0 -168
  197. package/build/services/store/providers/postgres/kvsql.js +0 -1
  198. package/build/services/store/providers/postgres/kvtables.d.ts +0 -20
  199. package/build/services/store/providers/postgres/kvtables.js +0 -1
  200. package/build/services/store/providers/postgres/kvtransaction.d.ts +0 -36
  201. package/build/services/store/providers/postgres/kvtransaction.js +0 -1
  202. package/build/services/store/providers/postgres/kvtypes/hash.d.ts +0 -60
  203. package/build/services/store/providers/postgres/kvtypes/hash.js +0 -1
  204. package/build/services/store/providers/postgres/kvtypes/list.d.ts +0 -33
  205. package/build/services/store/providers/postgres/kvtypes/list.js +0 -1
  206. package/build/services/store/providers/postgres/kvtypes/string.d.ts +0 -20
  207. package/build/services/store/providers/postgres/kvtypes/string.js +0 -1
  208. package/build/services/store/providers/postgres/kvtypes/zset.d.ts +0 -41
  209. package/build/services/store/providers/postgres/kvtypes/zset.js +0 -1
  210. package/build/services/store/providers/postgres/postgres.d.ts +0 -145
  211. package/build/services/store/providers/postgres/postgres.js +0 -1
  212. package/build/services/store/providers/redis/_base.d.ts +0 -137
  213. package/build/services/store/providers/redis/_base.js +0 -1
  214. package/build/services/store/providers/redis/ioredis.d.ts +0 -20
  215. package/build/services/store/providers/redis/ioredis.js +0 -1
  216. package/build/services/store/providers/redis/redis.d.ts +0 -18
  217. package/build/services/store/providers/redis/redis.js +0 -1
  218. package/build/services/store/providers/store-initializable.d.ts +0 -5
  219. package/build/services/store/providers/store-initializable.js +0 -1
  220. package/build/services/stream/factory.d.ts +0 -8
  221. package/build/services/stream/factory.js +0 -37
  222. package/build/services/stream/index.d.ts +0 -64
  223. package/build/services/stream/index.js +0 -11
  224. package/build/services/stream/providers/nats/nats.d.ts +0 -59
  225. package/build/services/stream/providers/nats/nats.js +0 -1
  226. package/build/services/stream/providers/postgres/kvtables.d.ts +0 -2
  227. package/build/services/stream/providers/postgres/kvtables.js +0 -1
  228. package/build/services/stream/providers/postgres/postgres.d.ts +0 -88
  229. package/build/services/stream/providers/postgres/postgres.js +0 -1
  230. package/build/services/stream/providers/redis/ioredis.d.ts +0 -60
  231. package/build/services/stream/providers/redis/ioredis.js +0 -1
  232. package/build/services/stream/providers/redis/redis.d.ts +0 -60
  233. package/build/services/stream/providers/redis/redis.js +0 -1
  234. package/build/services/stream/providers/stream-initializable.d.ts +0 -4
  235. package/build/services/stream/providers/stream-initializable.js +0 -1
  236. package/build/services/sub/factory.d.ts +0 -7
  237. package/build/services/sub/factory.js +0 -29
  238. package/build/services/sub/index.d.ts +0 -22
  239. package/build/services/sub/index.js +0 -10
  240. package/build/services/sub/providers/nats/nats.d.ts +0 -19
  241. package/build/services/sub/providers/nats/nats.js +0 -1
  242. package/build/services/sub/providers/postgres/postgres.d.ts +0 -19
  243. package/build/services/sub/providers/postgres/postgres.js +0 -1
  244. package/build/services/sub/providers/redis/ioredis.d.ts +0 -17
  245. package/build/services/sub/providers/redis/ioredis.js +0 -1
  246. package/build/services/sub/providers/redis/redis.d.ts +0 -17
  247. package/build/services/sub/providers/redis/redis.js +0 -1
  248. package/build/services/task/index.d.ts +0 -36
  249. package/build/services/task/index.js +0 -1
  250. package/build/services/telemetry/index.d.ts +0 -52
  251. package/build/services/telemetry/index.js +0 -1
  252. package/build/services/worker/index.d.ts +0 -77
  253. package/build/services/worker/index.js +0 -1
  254. /package/build/types/{meshflow.js → memflow.js} +0 -0
@@ -1,2492 +0,0 @@
1
- "use strict";
2
- /**
3
- *********** HOTMESH 'MESHFLOW' MODULE APPLICATION GRAPH **********
4
- *
5
- * This HotMesh application spec uses 50 activities and 25 transitions
6
- * to model and emulate the Temporal Application & Query servers using
7
- * a pluggable backend.
8
- *
9
- * This YAML file can also serve as a useful starting point for building
10
- * Integration/BPM/Workflow servers in general (MuleSoft, etc) without the need
11
- * for a physical application server.
12
- *
13
- * Possible use cases include:
14
- * * Orchestration servers
15
- * * Integration servers
16
- * * BPMN engines
17
- * * Reentrant process servers
18
- * * Service Meshes
19
- * * Master Data Management systems
20
- */
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.APP_ID = exports.APP_VERSION = exports.getWorkflowYAML = void 0;
23
- const APP_VERSION = '4';
24
- exports.APP_VERSION = APP_VERSION;
25
- const APP_ID = 'meshflow';
26
- exports.APP_ID = APP_ID;
27
- /**
28
- * returns a new meshflow workflow schema
29
- * @param {string} app - app name (e.g., 'meshflow')
30
- * @param {string} version - number as string (e.g., '1')
31
- * @returns {string} HotMesh App YAML
32
- */
33
- const getWorkflowYAML = (app, version) => {
34
- return `app:
35
- id: ${app}
36
- version: '${version}'
37
- graphs:
38
-
39
- ###################################################
40
- # THE MESHFLOW-REENTRANT-WORKFLOW #
41
- # #
42
- - subscribes: ${app}.execute
43
- publishes: ${app}.executed
44
-
45
- persistent: '{trigger.output.data.persistent}'
46
- expire:
47
- '@pipe':
48
- - ['{trigger.output.data.persistent}']
49
- - ['{@number.isNaN}', '{trigger.output.data.originJobId}']
50
- - ['{@logical.and}', 1,'{trigger.output.data.expire}']
51
- - ['{@conditional.ternary}']
52
-
53
- input:
54
- schema:
55
- type: object
56
- properties:
57
- originJobId:
58
- description: the entry point from the outside world; subflows will inherit this value
59
- type: string
60
- workflowId:
61
- description: the id for this workflow (see \`trigger.stats.id\`)
62
- type: string
63
- parentWorkflowId:
64
- type: string
65
- arguments:
66
- description: the arguments to pass to the flow
67
- type: array
68
- workflowTopic:
69
- description: the Redis stream topic the worker is listening on
70
- type: string
71
- backoffCoefficient:
72
- description: the time multiple in seconds to backoff before retrying
73
- type: number
74
- maximumAttempts:
75
- description: the maximum number of retries to attempt before failing the workflow
76
- type: number
77
- maximumInterval:
78
- description: the maximum time in seconds to wait between retries; provides a fixed limit to exponential backoff growth
79
- type: number
80
- expire:
81
- description: the time in seconds to expire the workflow in the backend DB once it completes
82
- type: number
83
- persistent:
84
- description: if true, the workflow emit the 'job completed' event while remaining open to outside signals
85
- type: boolean
86
- signalIn:
87
- description: if false, the job will not support subordinated hooks
88
- type: boolean
89
-
90
- output:
91
- schema:
92
- type: object
93
- properties:
94
- response:
95
- description: the final response from the workflow if any
96
- type: any
97
- done:
98
- description: true if the workflow is complete (whether successful or not)
99
- type: boolean
100
- $error:
101
- description: only present if a structured error ocurred (598, 597, etc)
102
- type: object
103
- properties:
104
- code:
105
- type: number
106
- message:
107
- type: string
108
- stack:
109
- type: string
110
- workflowId:
111
- type: string
112
- jc:
113
- type: string
114
- ju:
115
- type: string
116
-
117
- activities:
118
-
119
- ######## MAIN ACTIVITIES (RESPONSIBLE FOR FLOW ENTRY/STARTUP) ########
120
- trigger:
121
- title: Main Flow Trigger
122
- type: trigger
123
- job:
124
- maps:
125
- done: false
126
- stats:
127
- id: '{$self.input.data.workflowId}'
128
- key: '{$self.input.data.parentWorkflowId}'
129
- parent: '{$self.input.data.originJobId}'
130
- adjacent: '{$self.input.data.parentWorkflowId}'
131
-
132
- cycle_hook:
133
- title: Main Cycle Pivot - Cycling Descendants send execution back to this point
134
- type: hook
135
- cycle: true
136
- output:
137
- schema:
138
- type: object
139
- properties:
140
- retryCount:
141
- type: number
142
- maps:
143
- retryCount: 0
144
- throttleSeconds: 0
145
-
146
- throttler:
147
- title: Pauses for an exponentially-throttled amount of time after a retryable error or passes through immediately
148
- type: hook
149
- sleep: '{cycle_hook.output.data.throttleSeconds}'
150
-
151
- worker:
152
- title: Main Worker - Calls linked Workflow functions
153
- type: worker
154
- topic: '{trigger.output.data.workflowTopic}'
155
- emit: '{$job.data.done}'
156
- input:
157
- schema:
158
- type: object
159
- properties:
160
- originJobId:
161
- type: string
162
- workflowId:
163
- type: string
164
- arguments:
165
- type: array
166
- workflowTopic:
167
- type: string
168
- canRetry:
169
- type: boolean
170
- expire:
171
- type: number
172
- maps:
173
- originJobId: '{trigger.output.data.originJobId}'
174
- workflowId: '{trigger.output.data.workflowId}'
175
- arguments: '{trigger.output.data.arguments}'
176
- workflowTopic: '{trigger.output.data.workflowTopic}'
177
- expire: '{trigger.output.data.expire}'
178
- canRetry:
179
- '@pipe':
180
- - '@pipe':
181
- - ['{cycle_hook.output.data.retryCount}']
182
- - '@pipe':
183
- - ['{trigger.output.data.maximumAttempts}', 5]
184
- - ['{@conditional.nullish}']
185
- - ['{@conditional.less_than}']
186
- output:
187
- schema:
188
- type: object
189
- properties:
190
- response:
191
- type: any
192
- 589:
193
- schema:
194
- type: object
195
- properties:
196
- workflowId:
197
- type: string
198
- parentWorkflowId:
199
- type: string
200
- originJobId:
201
- type: string
202
- index:
203
- type: number
204
- workflowDimension:
205
- type: string
206
- description: empty string or dimensionsal path (,0,0,1)
207
- items:
208
- type: array
209
- description: the items to pass
210
- items:
211
- type: object
212
- size:
213
- type: number
214
- description: the number of items to pass
215
- 590:
216
- schema:
217
- type: object
218
- properties:
219
- workflowId:
220
- type: string
221
- parentWorkflowId:
222
- type: string
223
- originJobId:
224
- type: string
225
- workflowName:
226
- type: string
227
- index:
228
- type: number
229
- workflowDimension:
230
- type: string
231
- description: empty string or dimensionsal path (,0,0,1)
232
- arguments:
233
- type: array
234
- description: the arguments to pass to the flow (recursive)
235
- items:
236
- type: any
237
- backoffCoefficient:
238
- type: number
239
- maximumAttempts:
240
- type: number
241
- maximumInterval:
242
- type: number
243
- expire:
244
- type: number
245
- persistent:
246
- type: boolean
247
- signalIn:
248
- type: boolean
249
- await:
250
- type: string
251
- description: when set to false, do not await the child flow's completion
252
- 591:
253
- schema:
254
- type: object
255
- properties:
256
- activityName:
257
- type: string
258
- index:
259
- type: number
260
- workflowDimension:
261
- type: string
262
- description: empty string or dimensionsal path (,0,0,1)
263
- arguments:
264
- type: array
265
- description: the arguments to pass to the activity
266
- items:
267
- type: any
268
- workflowId:
269
- type: string
270
- workflowTopic:
271
- type: string
272
- parentWorkflowId:
273
- type: string
274
- originJobId:
275
- type: string
276
- backoffCoefficient:
277
- type: number
278
- maximumAttempts:
279
- type: number
280
- maximumInterval:
281
- type: number
282
- 588:
283
- schema:
284
- type: object
285
- properties:
286
- duration:
287
- type: number
288
- description: sleepFor duration in seconds
289
- index:
290
- type: number
291
- description: the replay index (COUNTER++)
292
- 595:
293
- schema:
294
- type: object
295
- properties:
296
- index:
297
- type: number
298
- description: the index of the first signal in the array
299
- signal:
300
- type: object
301
- properties:
302
- signal:
303
- type: string
304
- job:
305
- maps:
306
- response: '{$self.output.data.response}'
307
-
308
- sleeper:
309
- title: Pauses the main thread for a set amount of time; all other subprocess threads remain active, and new ones may be started
310
- type: hook
311
- sleep: '{worker.output.data.duration}'
312
- job:
313
- maps:
314
- idempotentcy-marker[-]:
315
- '@pipe':
316
- - '@pipe':
317
- - ['-sleep', '{worker.output.data.workflowDimension}', '-', '{worker.output.data.index}', '-']
318
- - ['{@string.concat}']
319
- - '@pipe':
320
- - [duration, '{worker.output.data.duration}', ac, '{$self.output.metadata.ac}', au, '{$self.output.metadata.au}']
321
- - ['{@object.create}']
322
- - ['{@object.create}']
323
-
324
- sleep_cycler:
325
- title: Cycles back to the cycle_hook pivot
326
- type: cycle
327
- ancestor: cycle_hook
328
- input:
329
- maps:
330
- retryCount: 0
331
- throttleSeconds: 0
332
-
333
- childer:
334
- title: Awaits a child flow to be executed/started
335
- type: await
336
- topic: ${app}.execute
337
- await: '{worker.output.data.await}'
338
- input:
339
- schema:
340
- type: object
341
- properties:
342
- workflowTopic:
343
- type: string
344
- backoffCoefficient:
345
- type: number
346
- maximumAttempts:
347
- type: number
348
- maximumInterval:
349
- type: number
350
- expire:
351
- type: number
352
- persistent:
353
- type: boolean
354
- signalIn:
355
- type: boolean
356
- parentWorkflowId:
357
- type: string
358
- description: used to forge the cleanup key
359
- originJobId:
360
- type: string
361
- description: used for dependency cleanup
362
- workflowId:
363
- type: string
364
- description: the baseId + index
365
- arguments:
366
- type: array
367
- description: the arguments to pass to the activity
368
- items:
369
- type: string
370
- maps:
371
- arguments: '{worker.output.data.arguments}'
372
- workflowDimension: '{worker.output.data.workflowDimension}'
373
- index: '{worker.output.data.index}'
374
- originJobId: '{worker.output.data.originJobId}'
375
- parentWorkflowId: '{worker.output.data.parentWorkflowId}'
376
- expire: '{worker.output.data.expire}'
377
- persistent: '{worker.output.data.persistent}'
378
- signalIn: '{worker.output.data.signalIn}'
379
- workflowId: '{worker.output.data.workflowId}'
380
- workflowName: '{worker.output.data.workflowName}'
381
- workflowTopic: '{worker.output.data.workflowTopic}'
382
- backoffCoefficient:
383
- '@pipe':
384
- - ['{worker.output.data.backoffCoefficient}','{trigger.output.data.backoffCoefficient}']
385
- - ['{@conditional.nullish}', 10]
386
- - ['{@conditional.nullish}']
387
- maximumAttempts:
388
- '@pipe':
389
- - ['{worker.output.data.maximumAttempts}','{trigger.output.data.maximumAttempts}']
390
- - ['{@conditional.nullish}', 5]
391
- - ['{@conditional.nullish}']
392
- maximumInterval:
393
- '@pipe':
394
- - ['{worker.output.data.maximumInterval}','{trigger.output.data.maximumInterval}']
395
- - ['{@conditional.nullish}', 120]
396
- - ['{@conditional.nullish}']
397
- job:
398
- maps:
399
- idempotentcy-marker[-]:
400
- '@pipe':
401
- - '@pipe':
402
- - ['{worker.output.data.await}', true]
403
- - ['{@conditional.nullish}', '-child', '-start']
404
- - ['{@conditional.ternary}', '{worker.output.data.workflowDimension}', '-', '{worker.output.data.index}', '-']
405
- - ['{@string.concat}']
406
- - '@pipe':
407
- - '@pipe':
408
- - ['{$self.output.data.$error}', '{$self.output.metadata.$error}']
409
- - ['{@logical.or}']
410
- - '@pipe':
411
- - '@pipe':
412
- - [$error]
413
- - '@pipe':
414
- - ['{$self.output.data.$error}', '{$self.output.metadata.$error}']
415
- - ['{@logical.or}']
416
- - '@pipe':
417
- - [ac]
418
- - '@pipe':
419
- - ['{$self.output.data.jc}', '{$self.output.metadata.ac}']
420
- - ['{@logical.or}']
421
- - '@pipe':
422
- - [au]
423
- - '@pipe':
424
- - ['{$self.output.data.ju}', '{$self.output.metadata.au}']
425
- - ['{@logical.or}']
426
- - '@pipe':
427
- - [job_id]
428
- - '@pipe':
429
- - ['{$self.output.data.workflowId}']
430
- - ['{@object.create}']
431
- - '@pipe':
432
- - '@pipe':
433
- - ['{$self.output.data.done}']
434
- - '@pipe':
435
- - '@pipe':
436
- - [data]
437
- - '@pipe':
438
- - ['{$self.output.data.response}']
439
- - '@pipe':
440
- - [ac]
441
- - '@pipe':
442
- - ['{$self.output.data.jc}']
443
- - '@pipe':
444
- - [au]
445
- - '@pipe':
446
- - ['{$self.output.data.ju}']
447
- - '@pipe':
448
- - [job_id]
449
- - '@pipe':
450
- - ['{$self.output.data.workflowId}']
451
- - ['{@object.create}']
452
- - '@pipe':
453
- - '@pipe':
454
- - [data]
455
- - '@pipe':
456
- - ['{$self.output.data.job_id}']
457
- - '@pipe':
458
- - [ac]
459
- - '@pipe':
460
- - ['{$self.output.data.jc}']
461
- - '@pipe':
462
- - [au]
463
- - '@pipe':
464
- - ['{$self.output.data.ju}']
465
- - '@pipe':
466
- - [job_id]
467
- - '@pipe':
468
- - ['{$self.output.data.job_id}']
469
- - ['{@object.create}']
470
- - ['{@conditional.ternary}']
471
- - ['{@conditional.ternary}']
472
- - ['{@object.create}']
473
-
474
- child_cycler:
475
- title: Cycles back to the cycle_hook
476
- type: cycle
477
- ancestor: cycle_hook
478
- input:
479
- maps:
480
- retryCount:
481
- '@pipe':
482
- - '@pipe':
483
- - ['{childer.output.metadata.err}']
484
- - '@pipe':
485
- - ['{cycle_hook.output.data.retryCount}', 0]
486
- - ['{@logical.or}', 1]
487
- - ['{@math.add}']
488
- - '@pipe':
489
- - [0]
490
- - ['{@conditional.ternary}']
491
- throttleSeconds:
492
- '@pipe':
493
- - '@pipe':
494
- - ['{childer.output.metadata.err}']
495
- - '@pipe':
496
- - '@pipe':
497
- - '@pipe':
498
- - ['{trigger.output.data.backoffCoefficient}', 10]
499
- - ['{@conditional.nullish}']
500
- - '@pipe':
501
- - ['{cycle_hook.output.data.retryCount}', 0]
502
- - ['{@conditional.nullish}']
503
- - ['{@math.pow}']
504
- - '@pipe':
505
- - ['{trigger.output.data.maximumInterval}', 120]
506
- - ['{@logical.or}']
507
- - ['{@math.min}']
508
- - '@pipe':
509
- - [0]
510
- - ['{@conditional.ternary}']
511
-
512
- proxyer:
513
- title: Invokes the activity flow and awaits the response
514
- type: await
515
- topic: ${app}.activity.execute
516
- input:
517
- schema:
518
- type: object
519
- properties:
520
- activityName:
521
- type: string
522
- parentWorkflowId:
523
- type: string
524
- description: used to forge the cleanup key
525
- originJobId:
526
- type: string
527
- description: used for dependency cleanup
528
- workflowId:
529
- type: string
530
- description: the baseId + index
531
- arguments:
532
- type: array
533
- description: the arguments to pass to the activity
534
- items:
535
- type: string
536
- expire:
537
- type: number
538
- backoffCoefficient:
539
- type: number
540
- maximumAttempts:
541
- type: number
542
- maximumInterval:
543
- type: number
544
- maps:
545
- activityName: '{worker.output.data.activityName}'
546
- arguments: '{worker.output.data.arguments}'
547
- workflowDimension: '{worker.output.data.workflowDimension}'
548
- index: '{worker.output.data.index}'
549
- originJobId: '{worker.output.data.originJobId}'
550
- parentWorkflowId: '{worker.output.data.workflowId}'
551
- workflowId: '{worker.output.data.workflowId}'
552
- workflowTopic: '{worker.output.data.workflowTopic}'
553
- expire: '{worker.output.data.expire}'
554
- backoffCoefficient:
555
- '@pipe':
556
- - ['{worker.output.data.backoffCoefficient}','{trigger.output.data.backoffCoefficient}']
557
- - ['{@conditional.nullish}', 10]
558
- - ['{@conditional.nullish}']
559
- maximumAttempts:
560
- '@pipe':
561
- - ['{worker.output.data.maximumAttempts}','{trigger.output.data.maximumAttempts}']
562
- - ['{@conditional.nullish}', 5]
563
- - ['{@conditional.nullish}']
564
- maximumInterval:
565
- '@pipe':
566
- - ['{worker.output.data.maximumInterval}','{trigger.output.data.maximumInterval}']
567
- - ['{@conditional.nullish}', 120]
568
- - ['{@conditional.nullish}']
569
- job:
570
- maps:
571
- idempotentcy-marker[-]:
572
- '@pipe':
573
- - '@pipe':
574
- - ['-proxy', '{worker.output.data.workflowDimension}', '-', '{worker.output.data.index}', '-']
575
- - ['{@string.concat}']
576
- - '@pipe':
577
- - '@pipe':
578
- - ['{$self.output.data.$error}']
579
- - '@pipe':
580
- - '@pipe':
581
- - [$error]
582
- - '@pipe':
583
- - ['{$self.output.data.$error}']
584
- - '@pipe':
585
- - [ac]
586
- - '@pipe':
587
- - ['{$self.output.data.jc}']
588
- - '@pipe':
589
- - [au]
590
- - '@pipe':
591
- - ['{$self.output.data.ju}']
592
- - '@pipe':
593
- - ['job_id']
594
- - '@pipe':
595
- - ['{$self.output.data.workflowId}']
596
- - ['{@object.create}']
597
- - '@pipe':
598
- - '@pipe':
599
- - [data]
600
- - '@pipe':
601
- - ['{$self.output.data.response}']
602
- - '@pipe':
603
- - [ac]
604
- - '@pipe':
605
- - ['{$self.output.data.jc}']
606
- - '@pipe':
607
- - [au]
608
- - '@pipe':
609
- - ['{$self.output.data.ju}']
610
- - '@pipe':
611
- - ['job_id']
612
- - '@pipe':
613
- - ['{$self.output.data.workflowId}']
614
- - ['{@object.create}']
615
- - ['{@conditional.ternary}']
616
- - ['{@object.create}']
617
-
618
- proxy_cycler:
619
- title: Cycles back to the cycle_hook
620
- type: cycle
621
- ancestor: cycle_hook
622
- input:
623
- maps:
624
- retryCount:
625
- '@pipe':
626
- - '@pipe':
627
- - ['{proxyer.output.metadata.err}']
628
- - '@pipe':
629
- - ['{cycle_hook.output.data.retryCount}', 0]
630
- - ['{@logical.or}', 1]
631
- - ['{@math.add}']
632
- - '@pipe':
633
- - [0]
634
- - ['{@conditional.ternary}']
635
- throttleSeconds:
636
- '@pipe':
637
- - '@pipe':
638
- - ['{proxyer.output.metadata.err}']
639
- - '@pipe':
640
- - '@pipe':
641
- - '@pipe':
642
- - ['{trigger.output.data.backoffCoefficient}', 10]
643
- - ['{@conditional.nullish}']
644
- - '@pipe':
645
- - ['{cycle_hook.output.data.retryCount}', 0]
646
- - ['{@conditional.nullish}']
647
- - ['{@math.pow}']
648
- - '@pipe':
649
- - ['{trigger.output.data.maximumInterval}', 120]
650
- - ['{@logical.or}']
651
- - ['{@math.min}']
652
- - '@pipe':
653
- - [0]
654
- - ['{@conditional.ternary}']
655
-
656
- collator:
657
- title: Awaits the collator flow to simultaneously resolve the idempotent items and return as a sequential set
658
- type: await
659
- topic: ${app}.collator.execute
660
- input:
661
- schema:
662
- type: object
663
- properties:
664
- parentWorkflowId:
665
- type: string
666
- description: used to forge the cleanup key
667
- originJobId:
668
- type: string
669
- description: used for dependency cleanup
670
- workflowId:
671
- type: string
672
- size:
673
- type: number
674
- description: the number of idempotent items to resolve
675
- items:
676
- type: array
677
- description: the idempotent items to resolve
678
- items:
679
- type: object
680
- properties:
681
- index:
682
- type: number
683
- data:
684
- type: object
685
- expire:
686
- type: number
687
- maps:
688
- items: '{worker.output.data.items}'
689
- size: '{worker.output.data.size}'
690
- workflowDimension: '{worker.output.data.workflowDimension}'
691
- index: '{worker.output.data.index}'
692
- originJobId: '{worker.output.data.originJobId}'
693
- parentWorkflowId: '{worker.output.data.workflowId}'
694
- workflowId: '{worker.output.data.workflowId}'
695
- workflowTopic: '{worker.output.data.workflowTopic}'
696
- expire: '{worker.output.data.expire}'
697
- output:
698
- schema:
699
- type: object
700
- properties:
701
- size:
702
- type: number
703
- data:
704
- type: object
705
- properties:
706
- response:
707
- description: the collated response, returned as a object with numeric keys, representing the order in the Promise.all array
708
- type: object
709
- patternProperties:
710
- '^[0-9]+$':
711
- type: object
712
- properties:
713
- type:
714
- type: string
715
- enum: [wait, proxy, child, start, sleep]
716
- data:
717
- type: unknown
718
- job:
719
- maps:
720
- idempotentcy-marker[-]:
721
- '@pipe':
722
- - ['{$self.output.data.response}', {}]
723
- - '@reduce':
724
- - '@pipe':
725
- - - '{$output}'
726
- - '@pipe':
727
- - '@pipe':
728
- - - '-'
729
- - '@pipe':
730
- - - '{$item}'
731
- - type
732
- - - '{@object.get}'
733
- - '@pipe':
734
- - - '{worker.output.data.workflowDimension}'
735
- - '@pipe':
736
- - - '-'
737
- - '@pipe':
738
- - '@pipe':
739
- - - '{worker.output.data.index}'
740
- - '@pipe':
741
- - - '{$index}'
742
- - - '{@math.add}'
743
- - '@pipe':
744
- - - '-'
745
- - - '{@string.concat}'
746
- - '@pipe':
747
- - - '{$item}'
748
- - - '{@object.set}'
749
-
750
- collate_cycler:
751
- title: Cycles back to the cycle_hook after collating the results
752
- type: cycle
753
- ancestor: cycle_hook
754
- input:
755
- maps:
756
- retryCount: 0
757
- throttleSeconds: 0
758
-
759
- retryer:
760
- title: Cycles back to the cycle_hook pivot, increasing the retryCount (the exponential)
761
- type: cycle
762
- ancestor: cycle_hook
763
- input:
764
- maps:
765
- retryCount:
766
- '@pipe':
767
- - ['{cycle_hook.output.data.retryCount}', 0]
768
- - ['{@logical.or}', 1]
769
- - ['{@math.add}']
770
- throttleSeconds:
771
- '@pipe':
772
- - '@pipe':
773
- - '@pipe':
774
- - ['{trigger.output.data.backoffCoefficient}', 10]
775
- - ['{@conditional.nullish}']
776
- - '@pipe':
777
- - ['{cycle_hook.output.data.retryCount}', 0]
778
- - ['{@conditional.nullish}']
779
- - ['{@math.pow}']
780
- - '@pipe':
781
- - ['{trigger.output.data.maximumInterval}', 120]
782
- - ['{@logical.or}']
783
- - ['{@math.min}']
784
- ender:
785
- title: Sets job data; ignores the \`Signal In\` Hook Channel which was suppressed; sends the final response
786
- type: hook
787
- persist: '{trigger.output.data.signalIn}'
788
- job:
789
- maps:
790
- done: true
791
- $error: '{worker.output.data.$error}'
792
- jc: '{$job.metadata.jc}'
793
- ju:
794
- '@pipe':
795
- - ['{@date.toISOXString}']
796
-
797
- closer:
798
- title: Closes the \`Signal In\` Hook Channel, so the workflow can exit
799
- type: signal
800
- subtype: one
801
- topic: ${app}.flow.signal
802
- statusThreshold: 1
803
- signal:
804
- schema:
805
- type: object
806
- properties:
807
- id:
808
- type: string
809
- maps:
810
- id: '{$job.metadata.jid}'
811
- job:
812
- maps:
813
- done: true
814
- $error: '{worker.output.data.$error}'
815
- jc: '{$job.metadata.jc}'
816
- ju:
817
- '@pipe':
818
- - ['{@date.toISOXString}']
819
-
820
- stopper:
821
- title: Stops 'Signal In' when retryCount is exceeded (and as a result ends the job)
822
- type: signal
823
- subtype: one
824
- topic: ${app}.flow.signal
825
- signal:
826
- schema:
827
- type: object
828
- properties:
829
- id:
830
- type: string
831
- maps:
832
- id: '{$job.metadata.jid}'
833
- job:
834
- maps:
835
- done: true
836
- $error:
837
- '@pipe':
838
- - ['{worker.output.data.$error}', 'code', 597]
839
- - ['{@object.set}']
840
- jc: '{$job.metadata.jc}'
841
- ju:
842
- '@pipe':
843
- - ['{@date.toISOXString}']
844
-
845
- ######## SIGNAL-IN ACTIVITIES (RESPONSIBLE FOR FLOW REENTRY) ########
846
- signaler:
847
- title: Signal-In Reentry point for subordinated hook flows
848
- type: hook
849
- statusThreshold: 1
850
- hook:
851
- type: object
852
- properties:
853
- id:
854
- type: string
855
- arguments:
856
- type: array
857
- workflowTopic:
858
- type: string
859
- job:
860
- maps:
861
- workflowId: '{trigger.output.data.workflowId}'
862
-
863
- signaler_cycle_hook:
864
- title: Signal In Cycle Pivot - Cycling Descendants Send Execution Back Here
865
- type: hook
866
- cycle: true
867
- output:
868
- schema:
869
- type: object
870
- properties:
871
- retryCount:
872
- type: number
873
- maps:
874
- retryCount: 0
875
- throttleSeconds: 0
876
-
877
- signaler_throttler:
878
- title: Pauses between failed hook executions for an exponentially-throttled amount of time after a retryable error
879
- type: hook
880
- sleep: '{signaler_cycle_hook.output.data.throttleSeconds}'
881
-
882
- signaler_worker:
883
- title: Signal In - Worker
884
- type: worker
885
- topic: '{signaler.hook.data.workflowTopic}'
886
- input:
887
- schema:
888
- type: object
889
- properties:
890
- workflowId:
891
- type: string
892
- originJobId:
893
- type: string
894
- workflowDimension:
895
- type: string
896
- arguments:
897
- type: array
898
- canRetry:
899
- type: boolean
900
- expire:
901
- type: number
902
- maps:
903
- workflowId: '{trigger.output.data.workflowId}'
904
- originJobId: '{trigger.output.data.originJobId}'
905
- workflowDimension: '{signaler.output.metadata.dad}'
906
- arguments: '{signaler.hook.data.arguments}'
907
- expire: '{trigger.output.data.expire}'
908
- canRetry:
909
- '@pipe':
910
- - '@pipe':
911
- - ['{signaler_cycle_hook.output.data.retryCount}']
912
- - '@pipe':
913
- - ['{trigger.output.data.maximumAttempts}', 5]
914
- - ['{@conditional.nullish}']
915
- - ['{@conditional.less_than}']
916
-
917
- output:
918
- schema:
919
- type: object
920
- 589:
921
- schema:
922
- description: the worker function output when Promise.all is used
923
- type: object
924
- properties:
925
- workflowId:
926
- type: string
927
- description: the id for the new child workflow to spawn
928
- parentWorkflowId:
929
- type: string
930
- description: parent workflow id (this workflow's id)
931
- originJobId:
932
- type: string
933
- description: entry flow id (where outside world met the mesh)
934
- index:
935
- type: number
936
- description: the replay index (COUNTER++)
937
- workflowDimension:
938
- type: string
939
- description: empty string or dimensionsal path (,0,0,1)
940
- items:
941
- type: array
942
- description: the items to collate
943
- items:
944
- type: object
945
- size:
946
- type: number
947
- description: the number of items to collate
948
- 590:
949
- schema:
950
- description: the worker function output when execChild or startChild are called
951
- type: object
952
- properties:
953
- workflowId:
954
- type: string
955
- description: the id for the new child workflow to spawn
956
- parentWorkflowId:
957
- type: string
958
- description: parent workflow id (this workflow's id)
959
- originJobId:
960
- type: string
961
- description: entry flow id (where outside world met the mesh)
962
- workflowName:
963
- type: string
964
- description: the linked function name
965
- index:
966
- type: number
967
- description: the replay index (COUNTER++)
968
- workflowDimension:
969
- type: string
970
- description: empty string or dimensionsal path (,0,0,1)
971
- arguments:
972
- type: array
973
- description: the arguments to pass to the flow (recursive)
974
- items:
975
- type: any
976
- backoffCoefficient:
977
- type: number
978
- description: the time multiple in seconds to backoff before retrying
979
- maximumAttempts:
980
- type: number
981
- description: the maximum number of retries to attempt before failing the workflow
982
- maximumInterval:
983
- type: number
984
- description: the maximum time in seconds to wait between retries; provides a fixed limit to exponential backoff growth
985
- expire:
986
- type: number
987
- persistent:
988
- type: boolean
989
- signalIn:
990
- type: boolean
991
- description: if false, the spawned child will not support subordinated hooks
992
- await:
993
- type: string
994
- description: when set to false, do not await the child flow's completion
995
- 591:
996
- schema:
997
- type: object
998
- properties:
999
- activityName:
1000
- type: string
1001
- index:
1002
- type: number
1003
- workflowDimension:
1004
- type: string
1005
- description: empty string or dimensionsal path (,0,0,1)
1006
- arguments:
1007
- type: array
1008
- description: the arguments to pass to the activity
1009
- items:
1010
- type: any
1011
- workflowId:
1012
- type: string
1013
- workflowTopic:
1014
- type: string
1015
- parentWorkflowId:
1016
- type: string
1017
- originJobId:
1018
- type: string
1019
- expire:
1020
- type: number
1021
- backoffCoefficient:
1022
- type: number
1023
- maximumAttempts:
1024
- type: number
1025
- maximumInterval:
1026
- type: number
1027
- 588:
1028
- schema:
1029
- type: object
1030
- properties:
1031
- duration:
1032
- type: number
1033
- description: sleepFor duration in seconds
1034
- index:
1035
- type: number
1036
- description: the replay index (COUNTER++)
1037
- 595:
1038
- schema:
1039
- type: object
1040
- properties:
1041
- index:
1042
- type: number
1043
- description: the index of the first signal in the array
1044
- signal:
1045
- type: object
1046
- properties:
1047
- signal:
1048
- type: string
1049
-
1050
- signaler_sleeper:
1051
- title: Pauses a single thread within the worker for a set amount of seconds while the main flow thread and all other subthreads remain active
1052
- type: hook
1053
- sleep: '{signaler_worker.output.data.duration}'
1054
- job:
1055
- maps:
1056
- idempotentcy-marker[-]:
1057
- '@pipe':
1058
- - '@pipe':
1059
- - ['-sleep', '{signaler_worker.output.data.workflowDimension}', '-', '{signaler_worker.output.data.index}', '-']
1060
- - ['{@string.concat}']
1061
- - '@pipe':
1062
- - [duration, '{signaler_worker.output.data.duration}', ac, '{$self.output.metadata.ac}', au, '{$self.output.metadata.au}']
1063
- - ['{@object.create}']
1064
- - ['{@object.create}']
1065
-
1066
- signaler_sleep_cycler:
1067
- title: Cycles back to the signaler_cycle_hook pivot
1068
- type: cycle
1069
- ancestor: signaler_cycle_hook
1070
- input:
1071
- maps:
1072
- retryCount: 0
1073
- throttleSeconds: 0
1074
-
1075
- signaler_childer:
1076
- title: Awaits a child flow to be executed/started
1077
- type: await
1078
- topic: ${app}.execute
1079
- await: '{signaler_worker.output.data.await}'
1080
- input:
1081
- schema:
1082
- type: object
1083
- properties:
1084
- workflowTopic:
1085
- type: string
1086
- backoffCoefficient:
1087
- type: number
1088
- maximumAttempts:
1089
- type: number
1090
- maximumInterval:
1091
- type: number
1092
- expire:
1093
- type: number
1094
- persistent:
1095
- type: boolean
1096
- signalIn:
1097
- type: boolean
1098
- parentWorkflowId:
1099
- type: string
1100
- description: used to forge the cleanup key
1101
- originJobId:
1102
- type: string
1103
- description: used for dependency cleanup
1104
- workflowId:
1105
- type: string
1106
- description: the baseId + index
1107
- arguments:
1108
- type: array
1109
- description: the arguments to pass to the activity
1110
- items:
1111
- type: string
1112
- maps:
1113
- arguments: '{signaler_worker.output.data.arguments}'
1114
- workflowDimension: '{signaler_worker.output.data.workflowDimension}'
1115
- index: '{signaler_worker.output.data.index}'
1116
- originJobId: '{signaler_worker.output.data.originJobId}'
1117
- parentWorkflowId: '{signaler_worker.output.data.parentWorkflowId}'
1118
- expire: '{signaler_worker.output.data.expire}'
1119
- persistent: '{signaler_worker.output.data.persistent}'
1120
- signalIn: '{signaler_worker.output.data.signalIn}'
1121
- workflowId: '{signaler_worker.output.data.workflowId}'
1122
- workflowName: '{signaler_worker.output.data.workflowName}'
1123
- workflowTopic: '{signaler_worker.output.data.workflowTopic}'
1124
- backoffCoefficient:
1125
- '@pipe':
1126
- - ['{signaler_worker.output.data.backoffCoefficient}','{trigger.output.data.backoffCoefficient}']
1127
- - ['{@conditional.nullish}', 10]
1128
- - ['{@conditional.nullish}']
1129
- maximumAttempts:
1130
- '@pipe':
1131
- - ['{signaler_worker.output.data.maximumAttempts}','{trigger.output.data.maximumAttempts}']
1132
- - ['{@conditional.nullish}', 5]
1133
- - ['{@conditional.nullish}']
1134
- maximumInterval:
1135
- '@pipe':
1136
- - ['{signaler_worker.output.data.maximumInterval}','{trigger.output.data.maximumInterval}']
1137
- - ['{@conditional.nullish}', 120]
1138
- - ['{@conditional.nullish}']
1139
- job:
1140
- maps:
1141
- idempotentcy-marker[-]:
1142
- '@pipe':
1143
- - '@pipe':
1144
- - ['{signaler_worker.output.data.await}', true]
1145
- - ['{@conditional.nullish}', '-child', '-start']
1146
- - ['{@conditional.ternary}', '{signaler_worker.output.data.workflowDimension}', '-', '{signaler_worker.output.data.index}', '-']
1147
- - ['{@string.concat}']
1148
- - '@pipe':
1149
- - '@pipe':
1150
- - ['{$self.output.data.$error}', '{$self.output.metadata.$error}']
1151
- - ['{@logical.or}']
1152
- - '@pipe':
1153
- - '@pipe':
1154
- - [$error]
1155
- - '@pipe':
1156
- - ['{$self.output.data.$error}', '{$self.output.metadata.$error}']
1157
- - ['{@logical.or}']
1158
- - '@pipe':
1159
- - [ac]
1160
- - '@pipe':
1161
- - ['{$self.output.data.jc}', '{$self.output.metadata.ac}']
1162
- - ['{@logical.or}']
1163
- - '@pipe':
1164
- - [au]
1165
- - '@pipe':
1166
- - ['{$self.output.data.ju}', '{$self.output.metadata.au}']
1167
- - ['{@logical.or}']
1168
- - '@pipe':
1169
- - ['job_id']
1170
- - '@pipe':
1171
- - ['{$self.output.data.workflowId}']
1172
- - ['{@object.create}']
1173
- - '@pipe':
1174
- - '@pipe':
1175
- - ['{$self.output.data.done}']
1176
- - '@pipe':
1177
- - '@pipe':
1178
- - [data]
1179
- - '@pipe':
1180
- - ['{$self.output.data.response}']
1181
- - '@pipe':
1182
- - [ac]
1183
- - '@pipe':
1184
- - ['{$self.output.data.jc}']
1185
- - '@pipe':
1186
- - [au]
1187
- - '@pipe':
1188
- - ['{$self.output.data.ju}']
1189
- - '@pipe':
1190
- - [job_id]
1191
- - '@pipe':
1192
- - ['{$self.output.data.workflowId}']
1193
- - ['{@object.create}']
1194
- - '@pipe':
1195
- - '@pipe':
1196
- - [data]
1197
- - '@pipe':
1198
- - ['{$self.output.data.job_id}']
1199
- - '@pipe':
1200
- - [ac]
1201
- - '@pipe':
1202
- - ['{$self.output.data.jc}']
1203
- - '@pipe':
1204
- - [au]
1205
- - '@pipe':
1206
- - ['{$self.output.data.ju}']
1207
- - '@pipe':
1208
- - ['job_id']
1209
- - '@pipe':
1210
- - ['{$self.output.data.job_id}']
1211
- - ['{@object.create}']
1212
- - ['{@conditional.ternary}']
1213
- - ['{@conditional.ternary}']
1214
- - ['{@object.create}']
1215
-
1216
- signaler_child_cycler:
1217
- title: Cycles back to the signaler_cycle_hook
1218
- type: cycle
1219
- ancestor: signaler_cycle_hook
1220
- input:
1221
- maps:
1222
- retryCount:
1223
- '@pipe':
1224
- - '@pipe':
1225
- - ['{signaler_childer.output.metadata.err}']
1226
- - '@pipe':
1227
- - ['{signaler_cycle_hook.output.data.retryCount}', 0]
1228
- - ['{@logical.or}', 1]
1229
- - ['{@math.add}']
1230
- - '@pipe':
1231
- - [0]
1232
- - ['{@conditional.ternary}']
1233
- throttleSeconds:
1234
- '@pipe':
1235
- - '@pipe':
1236
- - ['{signaler_childer.output.metadata.err}']
1237
- - '@pipe':
1238
- - '@pipe':
1239
- - '@pipe':
1240
- - ['{trigger.output.data.backoffCoefficient}', 10]
1241
- - ['{@conditional.nullish}']
1242
- - '@pipe':
1243
- - ['{signaler_cycle_hook.output.data.retryCount}', 0]
1244
- - ['{@conditional.nullish}']
1245
- - ['{@math.pow}']
1246
- - '@pipe':
1247
- - ['{trigger.output.data.maximumInterval}', 120]
1248
- - ['{@logical.or}']
1249
- - ['{@math.min}']
1250
- - '@pipe':
1251
- - [0]
1252
- - ['{@conditional.ternary}']
1253
-
1254
- signaler_proxyer:
1255
- title: Invokes the activity flow and awaits the response
1256
- type: await
1257
- topic: ${app}.activity.execute
1258
- input:
1259
- schema:
1260
- type: object
1261
- properties:
1262
- activityName:
1263
- type: string
1264
- parentWorkflowId:
1265
- type: string
1266
- description: used to forge the cleanup key
1267
- originJobId:
1268
- type: string
1269
- description: used for dependency cleanup
1270
- workflowId:
1271
- type: string
1272
- description: the baseId + index
1273
- arguments:
1274
- type: array
1275
- description: the arguments to pass to the activity
1276
- items:
1277
- type: string
1278
- expire:
1279
- type: number
1280
- backoffCoefficient:
1281
- type: number
1282
- maximumAttempts:
1283
- type: number
1284
- maximumInterval:
1285
- type: number
1286
- maps:
1287
- activityName: '{signaler_worker.output.data.activityName}'
1288
- arguments: '{signaler_worker.output.data.arguments}'
1289
- workflowDimension: '{signaler_worker.output.data.workflowDimension}'
1290
- index: '{signaler_worker.output.data.index}'
1291
- originJobId: '{signaler_worker.output.data.originJobId}'
1292
- parentWorkflowId: '{signaler_worker.output.data.workflowId}'
1293
- workflowId: '{signaler_worker.output.data.workflowId}'
1294
- workflowTopic: '{signaler_worker.output.data.workflowTopic}'
1295
- expire: '{signaler_worker.output.data.expire}'
1296
- backoffCoefficient:
1297
- '@pipe':
1298
- - ['{signaler_worker.output.data.backoffCoefficient}','{trigger.output.data.backoffCoefficient}']
1299
- - ['{@conditional.nullish}', 10]
1300
- - ['{@conditional.nullish}']
1301
- maximumAttempts:
1302
- '@pipe':
1303
- - ['{signaler_worker.output.data.maximumAttempts}','{trigger.output.data.maximumAttempts}']
1304
- - ['{@conditional.nullish}', 5]
1305
- - ['{@conditional.nullish}']
1306
- maximumInterval:
1307
- '@pipe':
1308
- - ['{signaler_worker.output.data.maximumInterval}','{trigger.output.data.maximumInterval}']
1309
- - ['{@conditional.nullish}', 120]
1310
- - ['{@conditional.nullish}']
1311
- job:
1312
- maps:
1313
- idempotentcy-marker[-]:
1314
- '@pipe':
1315
- - '@pipe':
1316
- - ['-proxy', '{signaler_worker.output.data.workflowDimension}', '-', '{signaler_worker.output.data.index}', '-']
1317
- - ['{@string.concat}']
1318
- - '@pipe':
1319
- - '@pipe':
1320
- - ['{$self.output.data.$error}']
1321
- - '@pipe':
1322
- - '@pipe':
1323
- - [$error]
1324
- - '@pipe':
1325
- - ['{$self.output.data.$error}']
1326
- - '@pipe':
1327
- - [ac]
1328
- - '@pipe':
1329
- - ['{$self.output.data.jc}']
1330
- - '@pipe':
1331
- - [au]
1332
- - '@pipe':
1333
- - ['{$self.output.data.ju}']
1334
- - '@pipe':
1335
- - ['job_id']
1336
- - '@pipe':
1337
- - ['{$self.output.data.workflowId}']
1338
- - ['{@object.create}']
1339
- - '@pipe':
1340
- - '@pipe':
1341
- - [data]
1342
- - '@pipe':
1343
- - ['{$self.output.data.response}']
1344
- - '@pipe':
1345
- - [ac]
1346
- - '@pipe':
1347
- - ['{$self.output.data.jc}']
1348
- - '@pipe':
1349
- - [au]
1350
- - '@pipe':
1351
- - ['{$self.output.data.ju}']
1352
- - '@pipe':
1353
- - ['job_id']
1354
- - '@pipe':
1355
- - ['{$self.output.data.workflowId}']
1356
- - ['{@object.create}']
1357
- - ['{@conditional.ternary}']
1358
- - ['{@object.create}']
1359
-
1360
- signaler_proxy_cycler:
1361
- title: Cycles back to the signaler_cycle_hook
1362
- type: cycle
1363
- ancestor: signaler_cycle_hook
1364
- input:
1365
- maps:
1366
- retryCount:
1367
- '@pipe':
1368
- - '@pipe':
1369
- - ['{signaler_proxyer.output.metadata.err}']
1370
- - '@pipe':
1371
- - ['{signaler_cycle_hook.output.data.retryCount}', 0]
1372
- - ['{@logical.or}', 1]
1373
- - ['{@math.add}']
1374
- - '@pipe':
1375
- - [0]
1376
- - ['{@conditional.ternary}']
1377
- throttleSeconds:
1378
- '@pipe':
1379
- - '@pipe':
1380
- - ['{signaler_proxyer.output.metadata.err}']
1381
- - '@pipe':
1382
- - '@pipe':
1383
- - '@pipe':
1384
- - ['{trigger.output.data.backoffCoefficient}', 10]
1385
- - ['{@conditional.nullish}']
1386
- - '@pipe':
1387
- - ['{signaler_cycle_hook.output.data.retryCount}', 0]
1388
- - ['{@conditional.nullish}']
1389
- - ['{@math.pow}']
1390
- - '@pipe':
1391
- - ['{trigger.output.data.maximumInterval}', 120]
1392
- - ['{@logical.or}']
1393
- - ['{@math.min}']
1394
- - '@pipe':
1395
- - [0]
1396
- - ['{@conditional.ternary}']
1397
-
1398
- signaler_collator:
1399
- title: Awaits the collator to resolve the idempotent items as a sequential set
1400
- type: await
1401
- topic: ${app}.collator.execute
1402
- input:
1403
- schema:
1404
- type: object
1405
- properties:
1406
- parentWorkflowId:
1407
- type: string
1408
- description: used to forge the cleanup key
1409
- originJobId:
1410
- type: string
1411
- description: used for dependency cleanup
1412
- workflowId:
1413
- type: string
1414
- size:
1415
- type: number
1416
- description: the number of idempotent items to collate
1417
- items:
1418
- type: array
1419
- description: the idempotent items to collate
1420
- items:
1421
- type: object
1422
- properties:
1423
- index:
1424
- type: number
1425
- data:
1426
- type: object
1427
- expire:
1428
- type: number
1429
- maps:
1430
- items: '{signaler_worker.output.data.items}'
1431
- size: '{signaler_worker.output.data.size}'
1432
- workflowDimension: '{signaler_worker.output.data.workflowDimension}'
1433
- index: '{signaler_worker.output.data.index}'
1434
- originJobId: '{signaler_worker.output.data.originJobId}'
1435
- parentWorkflowId: '{signaler_worker.output.data.workflowId}'
1436
- workflowId: '{signaler_worker.output.data.workflowId}'
1437
- workflowTopic: '{signaler_worker.output.data.workflowTopic}'
1438
- expire: '{signaler_worker.output.data.expire}'
1439
- output:
1440
- schema:
1441
- type: object
1442
- properties:
1443
- size:
1444
- type: number
1445
- data:
1446
- type: object
1447
- properties:
1448
- response:
1449
- description: the collated response, returned as a object with numeric keys, representing the order in the Promise.all array
1450
- type: object
1451
- patternProperties:
1452
- '^[0-9]+$':
1453
- type: object
1454
- properties:
1455
- type:
1456
- type: string
1457
- enum: [wait, proxy, child, start, sleep]
1458
- data:
1459
- type: unknown
1460
- job:
1461
- maps:
1462
- idempotentcy-marker[-]:
1463
- '@pipe':
1464
- - ['{$self.output.data.response}', {}]
1465
- - '@reduce':
1466
- - '@pipe':
1467
- - - '{$output}'
1468
- - '@pipe':
1469
- - '@pipe':
1470
- - - '-'
1471
- - '@pipe':
1472
- - - '{$item}'
1473
- - type
1474
- - - '{@object.get}'
1475
- - '@pipe':
1476
- - - '{signaler_worker.output.data.workflowDimension}'
1477
- - '@pipe':
1478
- - - '-'
1479
- - '@pipe':
1480
- - '@pipe':
1481
- - - '{signaler_worker.output.data.index}'
1482
- - '@pipe':
1483
- - - '{$index}'
1484
- - - '{@math.add}'
1485
- - '@pipe':
1486
- - - '-'
1487
- - - '{@string.concat}'
1488
- - '@pipe':
1489
- - - '{$item}'
1490
- - - '{@object.set}'
1491
-
1492
- signaler_collate_cycler:
1493
- title: Cycles back to the signaler_cycle_hook after collating the results
1494
- type: cycle
1495
- ancestor: signaler_cycle_hook
1496
- input:
1497
- maps:
1498
- retryCount: 0
1499
- throttleSeconds: 0
1500
-
1501
- signaler_retryer:
1502
- title: Cycles back to the signaler_cycle_hook pivot, increasing the retryCount (the exponential)
1503
- type: cycle
1504
- ancestor: signaler_cycle_hook
1505
- input:
1506
- maps:
1507
- retryCount:
1508
- '@pipe':
1509
- - ['{signaler_cycle_hook.output.data.retryCount}', 0]
1510
- - ['{@logical.or}', 1]
1511
- - ['{@math.add}']
1512
- throttleSeconds:
1513
- '@pipe':
1514
- - '@pipe':
1515
- - '@pipe':
1516
- - ['{trigger.output.data.backoffCoefficient}', 10]
1517
- - ['{@conditional.nullish}']
1518
- - '@pipe':
1519
- - ['{signaler_cycle_hook.output.data.retryCount}', 0]
1520
- - ['{@conditional.nullish}']
1521
- - ['{@math.pow}']
1522
- - '@pipe':
1523
- - ['{trigger.output.data.maximumInterval}', 120]
1524
- - ['{@logical.or}']
1525
- - ['{@math.min}']
1526
-
1527
- transitions:
1528
- trigger:
1529
- - to: cycle_hook
1530
- - to: signaler
1531
- conditions:
1532
- match:
1533
- - expected: true
1534
- actual:
1535
- '@pipe':
1536
- - ['{$self.output.data.signalIn}', true]
1537
- - ['{@conditional.nullish}']
1538
- ## MAIN PROCESS TRANSITIONS ##
1539
- cycle_hook:
1540
- - to: throttler
1541
- throttler:
1542
- - to: worker
1543
- worker:
1544
- - to: ender
1545
- conditions:
1546
- code: [200, 596, 597, 598]
1547
- match:
1548
- - expected: false
1549
- actual:
1550
- '@pipe':
1551
- - ['{trigger.output.data.signalIn}', '{@symbol.undefined}']
1552
- - ['{@conditional.strict_equality}']
1553
- - to: closer
1554
- conditions:
1555
- code: [200, 596, 597, 598]
1556
- match:
1557
- - expected: true
1558
- actual:
1559
- '@pipe':
1560
- - ['{trigger.output.data.signalIn}', '{@symbol.undefined}']
1561
- - ['{@conditional.strict_equality}']
1562
- - to: sleeper
1563
- conditions:
1564
- code: 588
1565
- - to: collator
1566
- conditions:
1567
- code: 589
1568
- - to: childer
1569
- conditions:
1570
- code: 590
1571
- match:
1572
- - expected: true
1573
- actual:
1574
- '@pipe':
1575
- - '@pipe':
1576
- - ['{cycle_hook.output.data.retryCount}']
1577
- - '@pipe':
1578
- - ['{trigger.output.data.maximumAttempts}', 5]
1579
- - ['{@conditional.nullish}']
1580
- - ['{@conditional.less_than}']
1581
- - to: proxyer
1582
- conditions:
1583
- code: 591
1584
- - to: retryer
1585
- conditions:
1586
- code: 599
1587
- match:
1588
- - expected: true
1589
- actual:
1590
- '@pipe':
1591
- - '@pipe':
1592
- - ['{cycle_hook.output.data.retryCount}']
1593
- - '@pipe':
1594
- - ['{trigger.output.data.maximumAttempts}', 5]
1595
- - ['{@conditional.nullish}']
1596
- - ['{@conditional.less_than}']
1597
- - to: stopper
1598
- conditions:
1599
- code: [590, 591, 596, 597, 598, 599]
1600
- match:
1601
- - expected: true
1602
- actual:
1603
- '@pipe':
1604
- - '@pipe':
1605
- - ['{cycle_hook.output.data.retryCount}']
1606
- - '@pipe':
1607
- - ['{trigger.output.data.maximumAttempts}', 5]
1608
- - ['{@conditional.nullish}']
1609
- - ['{@conditional.greater_than_or_equal}']
1610
- collator:
1611
- - to: collate_cycler
1612
- childer:
1613
- - to: child_cycler
1614
- proxyer:
1615
- - to: proxy_cycler
1616
- sleeper:
1617
- - to: sleep_cycler
1618
- ### SUBPROCESS TRANSITIONS (REENTRY) ###
1619
- signaler:
1620
- - to: signaler_cycle_hook
1621
- conditions:
1622
- code: 202
1623
- signaler_cycle_hook:
1624
- - to: signaler_throttler
1625
- signaler_throttler:
1626
- - to: signaler_worker
1627
- signaler_worker:
1628
- - to: signaler_sleeper
1629
- conditions:
1630
- code: 588
1631
- - to: signaler_collator
1632
- conditions:
1633
- code: 589
1634
- - to: signaler_childer
1635
- conditions:
1636
- code: 590
1637
- match:
1638
- - expected: true
1639
- actual:
1640
- '@pipe':
1641
- - '@pipe':
1642
- - ['{signaler_cycle_hook.output.data.retryCount}']
1643
- - '@pipe':
1644
- - ['{trigger.output.data.maximumAttempts}', 5]
1645
- - ['{@conditional.nullish}']
1646
- - ['{@conditional.less_than}']
1647
- - to: signaler_proxyer
1648
- conditions:
1649
- code: 591
1650
- - to: signaler_retryer
1651
- conditions:
1652
- code: 599
1653
- match:
1654
- - expected: true
1655
- actual:
1656
- '@pipe':
1657
- - '@pipe':
1658
- - ['{signaler_cycle_hook.output.data.retryCount}']
1659
- - '@pipe':
1660
- - ['{trigger.output.data.maximumAttempts}', 5]
1661
- - ['{@conditional.nullish}']
1662
- - ['{@conditional.less_than}']
1663
- signaler_collator:
1664
- - to: signaler_collate_cycler
1665
- signaler_childer:
1666
- - to: signaler_child_cycler
1667
- signaler_proxyer:
1668
- - to: signaler_proxy_cycler
1669
- signaler_sleeper:
1670
- - to: signaler_sleep_cycler
1671
-
1672
- hooks:
1673
- ${app}.flow.signal:
1674
- - to: signaler
1675
- conditions:
1676
- match:
1677
- - expected: '{trigger.output.data.workflowId}'
1678
- actual: '{$self.hook.data.id}'
1679
-
1680
-
1681
-
1682
- ###################################################
1683
- # THE REENTRANT COLLATOR FLOW #
1684
- # #
1685
- - subscribes: ${app}.collator.execute
1686
- publishes: ${app}.collator.executed
1687
-
1688
- expire:
1689
- '@pipe':
1690
- - ['{collator_trigger.output.data.expire}', 1]
1691
- - ['{@conditional.nullish}']
1692
-
1693
- input:
1694
- schema:
1695
- type: object
1696
- properties:
1697
- parentWorkflowId:
1698
- type: string
1699
- originJobId:
1700
- type: string
1701
- workflowId:
1702
- type: string
1703
- workflowTopic:
1704
- type: string
1705
- size:
1706
- title: The number of idempotent items to resolve
1707
- type: number
1708
- items:
1709
- title: Idempotent items to resolve
1710
- type: array
1711
- items:
1712
- type: object
1713
- properties:
1714
- index:
1715
- type: index
1716
- data:
1717
- type: object
1718
- expire:
1719
- type: number
1720
- output:
1721
- schema:
1722
- type: object
1723
- properties:
1724
- responses:
1725
- type: array
1726
- items:
1727
- type: object
1728
- properties:
1729
- index:
1730
- type: number
1731
- response:
1732
- type: any
1733
- $error:
1734
- type: object
1735
- properties:
1736
- code:
1737
- type: number
1738
- message:
1739
- type: string
1740
- stack:
1741
- type: string
1742
-
1743
- activities:
1744
- collator_trigger:
1745
- title: Collator Flow Trigger
1746
- type: trigger
1747
- stats:
1748
- id: '{$self.input.data.workflowId}'
1749
- key: '{$self.input.data.parentWorkflowId}'
1750
- parent: '{$self.input.data.originJobId}'
1751
- adjacent: '{$self.input.data.parentWorkflowId}'
1752
- job:
1753
- maps:
1754
- cur_index: 0
1755
-
1756
- collator_cycle_hook:
1757
- title: Pivot - Cycling Descendant Points Here
1758
- type: hook
1759
- cycle: true
1760
- job:
1761
- maps:
1762
- size:
1763
- '@pipe':
1764
- - ['{collator_trigger.output.data.items}']
1765
- - ['{@array.length}']
1766
- cur_index:
1767
- '@pipe':
1768
- - ['{$job.data.cur_index}', 1]
1769
- - ['{@math.add}']
1770
- output:
1771
- maps:
1772
- cur_index: '{$job.data.cur_index}'
1773
-
1774
- collator_cycler:
1775
- title: Cycles back to the collator_cycle_hook pivot
1776
- type: cycle
1777
- ancestor: collator_cycle_hook
1778
- input:
1779
- maps:
1780
- cur_index: '{$job.data.cur_index}'
1781
-
1782
- collator_sleeper:
1783
- title: Pauses a single thread within the collator for a set amount of time while all other threads remain active
1784
- type: hook
1785
- sleep:
1786
- '@pipe':
1787
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
1788
- - ['{@array.get}', duration]
1789
- - ['{@object.get}']
1790
- job:
1791
- maps:
1792
- response[25]:
1793
- '@pipe':
1794
- - '@pipe':
1795
- - ['{collator_cycle_hook.output.data.cur_index}']
1796
- - '@pipe':
1797
- - '@pipe':
1798
- - [type]
1799
- - '@pipe':
1800
- - [sleep]
1801
- - '@pipe':
1802
- - [duration]
1803
- - '@pipe':
1804
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
1805
- - ['{@array.get}', duration]
1806
- - ['{@object.get}']
1807
- - '@pipe':
1808
- - [ac]
1809
- - '@pipe':
1810
- - ['{$self.output.metadata.ac}']
1811
- - '@pipe':
1812
- - [au]
1813
- - '@pipe':
1814
- - ['{$self.output.metadata.au}']
1815
- - ['{@object.create}']
1816
- - ['{@object.create}']
1817
-
1818
- collator_waiter:
1819
- title: Waits for a matching signal to be sent to the collator workflow
1820
- type: hook
1821
- hook:
1822
- type: object
1823
- properties:
1824
- signalData:
1825
- type: object
1826
- job:
1827
- maps:
1828
- response[25]:
1829
- '@pipe':
1830
- - ['{collator_trigger.output.data.items}']
1831
- - '@pipe':
1832
- - ['{collator_cycle_hook.output.data.cur_index}']
1833
- - '@pipe':
1834
- - [type, wait, data, '{$self.hook.data}', ac, '{$job.metadata.jc}', au, '{$self.output.metadata.au}']
1835
- - ['{@object.create}']
1836
- - ['{@object.create}']
1837
-
1838
- collator_childer:
1839
- title: Awaits a call for a child flow to be executed/started
1840
- type: await
1841
- topic: ${app}.execute
1842
- await:
1843
- '@pipe':
1844
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
1845
- - ['{@array.get}', await]
1846
- - ['{@object.get}']
1847
- input:
1848
- schema:
1849
- type: object
1850
- properties:
1851
- workflowTopic:
1852
- type: string
1853
- backoffCoefficient:
1854
- type: number
1855
- maximumAttempts:
1856
- type: number
1857
- maximumInterval:
1858
- type: number
1859
- expire:
1860
- type: number
1861
- persistent:
1862
- type: boolean
1863
- signalIn:
1864
- type: boolean
1865
- parentWorkflowId:
1866
- type: string
1867
- description: used to forge the cleanup key
1868
- originJobId:
1869
- type: string
1870
- description: used for dependency cleanup
1871
- workflowId:
1872
- type: string
1873
- arguments:
1874
- type: array
1875
- description: the arguments to pass to the activity
1876
- items:
1877
- type: string
1878
- maps:
1879
- arguments:
1880
- '@pipe':
1881
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
1882
- - ['{@array.get}', arguments]
1883
- - ['{@object.get}']
1884
- workflowDimension:
1885
- '@pipe':
1886
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
1887
- - ['{@array.get}', workflowDimension]
1888
- - ['{@object.get}']
1889
- index:
1890
- '@pipe':
1891
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
1892
- - ['{@array.get}', index]
1893
- - ['{@object.get}']
1894
- originJobId:
1895
- '@pipe':
1896
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
1897
- - ['{@array.get}', originJobId]
1898
- - ['{@object.get}']
1899
- expire:
1900
- '@pipe':
1901
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
1902
- - ['{@array.get}', expire]
1903
- - ['{@object.get}']
1904
- persistent:
1905
- '@pipe':
1906
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
1907
- - ['{@array.get}', persistent]
1908
- - ['{@object.get}']
1909
- signalIn:
1910
- '@pipe':
1911
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
1912
- - ['{@array.get}', signalIn]
1913
- - ['{@object.get}']
1914
- parentWorkflowId:
1915
- '@pipe':
1916
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
1917
- - ['{@array.get}', parentWorkflowId]
1918
- - ['{@object.get}']
1919
- workflowId:
1920
- '@pipe':
1921
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
1922
- - ['{@array.get}', workflowId]
1923
- - ['{@object.get}']
1924
- workflowName:
1925
- '@pipe':
1926
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
1927
- - ['{@array.get}', workflowName]
1928
- - ['{@object.get}']
1929
- workflowTopic:
1930
- '@pipe':
1931
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
1932
- - ['{@array.get}', workflowTopic]
1933
- - ['{@object.get}']
1934
- backoffCoefficient:
1935
- '@pipe':
1936
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
1937
- - ['{@array.get}', backoffCoefficient]
1938
- - ['{@object.get}']
1939
- maximumAttempts:
1940
- '@pipe':
1941
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
1942
- - ['{@array.get}', maximumAttempts]
1943
- - ['{@object.get}']
1944
- maximumInterval:
1945
- '@pipe':
1946
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
1947
- - ['{@array.get}', maximumInterval]
1948
- - ['{@object.get}']
1949
- output:
1950
- schema:
1951
- type: object
1952
- properties:
1953
- response:
1954
- type: any
1955
- $error:
1956
- type: object
1957
- properties:
1958
- code:
1959
- type: number
1960
- message:
1961
- type: string
1962
- stack:
1963
- type: string
1964
- done:
1965
- type: boolean
1966
- workflowId:
1967
- type: string
1968
- jc:
1969
- type: string
1970
- ju:
1971
- type: string
1972
- job:
1973
- maps:
1974
- response[25]:
1975
- '@pipe':
1976
- - '@pipe':
1977
- - ['{collator_cycle_hook.output.data.cur_index}']
1978
- - '@pipe':
1979
- - '@pipe':
1980
- - ['{$self.output.data.$error}']
1981
- - '@pipe':
1982
- - '@pipe':
1983
- - [type]
1984
- - '@pipe':
1985
- - [child]
1986
- - '@pipe':
1987
- - [$error]
1988
- - '@pipe':
1989
- - ['{$self.output.data.$error}']
1990
- - '@pipe':
1991
- - [ac]
1992
- - '@pipe':
1993
- - ['{$job.metadata.jc}']
1994
- - '@pipe':
1995
- - [au]
1996
- - '@pipe':
1997
- - ['{@date.toISOXString}']
1998
- - '@pipe':
1999
- - [job_id]
2000
- - '@pipe':
2001
- - ['{$self.output.data.workflowId}']
2002
- - ['{@object.create}']
2003
- - '@pipe':
2004
- - '@pipe':
2005
- - ['{$self.output.data.done}']
2006
- - '@pipe':
2007
- - '@pipe':
2008
- - [type]
2009
- - '@pipe':
2010
- - [child]
2011
- - '@pipe':
2012
- - [data]
2013
- - '@pipe':
2014
- - ['{$self.output.data.response}']
2015
- - '@pipe':
2016
- - [ac]
2017
- - '@pipe':
2018
- - ['{$job.metadata.jc}']
2019
- - '@pipe':
2020
- - [au]
2021
- - '@pipe':
2022
- - ['{@date.toISOXString}']
2023
- - '@pipe':
2024
- - [job_id]
2025
- - '@pipe':
2026
- - ['{$self.output.data.workflowId}']
2027
- - ['{@object.create}']
2028
- - '@pipe':
2029
- - '@pipe':
2030
- - [type]
2031
- - '@pipe':
2032
- - [start]
2033
- - '@pipe':
2034
- - [data]
2035
- - '@pipe':
2036
- - ['{$self.output.data.job_id}']
2037
- - '@pipe':
2038
- - [ac]
2039
- - '@pipe':
2040
- - ['{$job.metadata.jc}']
2041
- - '@pipe':
2042
- - [au]
2043
- - '@pipe':
2044
- - ['{@date.toISOXString}']
2045
- - '@pipe':
2046
- - [job_id]
2047
- - '@pipe':
2048
- - ['{$self.output.data.job_id}']
2049
- - ['{@object.create}']
2050
- - ['{@conditional.ternary}']
2051
- - ['{@conditional.ternary}']
2052
- - ['{@object.create}']
2053
-
2054
- collator_proxyer:
2055
- title: Invokes the activity flow and awaits the response
2056
- type: await
2057
- topic: ${app}.activity.execute
2058
- input:
2059
- schema:
2060
- type: object
2061
- properties:
2062
- activityName:
2063
- type: string
2064
- parentWorkflowId:
2065
- type: string
2066
- description: used to forge the cleanup key
2067
- originJobId:
2068
- type: string
2069
- description: used for dependency cleanup
2070
- workflowId:
2071
- type: string
2072
- arguments:
2073
- type: array
2074
- description: the arguments to pass to the activity
2075
- items:
2076
- type: string
2077
- expire:
2078
- type: number
2079
- backoffCoefficient:
2080
- type: number
2081
- maximumAttempts:
2082
- type: number
2083
- maximumInterval:
2084
- type: number
2085
- maps:
2086
- activityName:
2087
- '@pipe':
2088
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
2089
- - ['{@array.get}', activityName]
2090
- - ['{@object.get}']
2091
- arguments:
2092
- '@pipe':
2093
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
2094
- - ['{@array.get}', arguments]
2095
- - ['{@object.get}']
2096
- workflowDimension:
2097
- '@pipe':
2098
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
2099
- - ['{@array.get}', workflowDimension]
2100
- - ['{@object.get}']
2101
- index:
2102
- '@pipe':
2103
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
2104
- - ['{@array.get}', index]
2105
- - ['{@object.get}']
2106
- originJobId:
2107
- '@pipe':
2108
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
2109
- - ['{@array.get}', originJobId]
2110
- - ['{@object.get}']
2111
- parentWorkflowId:
2112
- '@pipe':
2113
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
2114
- - ['{@array.get}', parentWorkflowId]
2115
- - ['{@object.get}']
2116
- workflowId:
2117
- '@pipe':
2118
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
2119
- - ['{@array.get}', workflowId]
2120
- - ['{@object.get}']
2121
- workflowTopic:
2122
- '@pipe':
2123
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
2124
- - ['{@array.get}', workflowTopic]
2125
- - ['{@object.get}']
2126
- expire:
2127
- '@pipe':
2128
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
2129
- - ['{@array.get}', expire]
2130
- - ['{@object.get}']
2131
- backoffCoefficient:
2132
- '@pipe':
2133
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
2134
- - ['{@array.get}', backoffCoefficient]
2135
- - ['{@object.get}']
2136
- maximumAttempts:
2137
- '@pipe':
2138
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
2139
- - ['{@array.get}', maximumAttempts]
2140
- - ['{@object.get}']
2141
- maximumInterval:
2142
- '@pipe':
2143
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
2144
- - ['{@array.get}', maximumInterval]
2145
- - ['{@object.get}']
2146
- output:
2147
- schema:
2148
- type: object
2149
- properties:
2150
- response:
2151
- type: any
2152
- $error:
2153
- type: object
2154
- properties:
2155
- code:
2156
- type: number
2157
- message:
2158
- type: string
2159
- stack:
2160
- type: string
2161
- done:
2162
- type: boolean
2163
- workflowId:
2164
- type: string
2165
- jc:
2166
- type: string
2167
- ju:
2168
- type: string
2169
- job:
2170
- maps:
2171
- response[25]:
2172
- '@pipe':
2173
- - '@pipe':
2174
- - ['{collator_cycle_hook.output.data.cur_index}']
2175
- - '@pipe':
2176
- - '@pipe':
2177
- - ['{$self.output.data.response}']
2178
- - '@pipe':
2179
- - '@pipe':
2180
- - [type]
2181
- - '@pipe':
2182
- - ['proxy']
2183
- - '@pipe':
2184
- - [data]
2185
- - '@pipe':
2186
- - ['{$self.output.data.response}']
2187
- - '@pipe':
2188
- - [ac]
2189
- - '@pipe':
2190
- - ['{$job.metadata.jc}']
2191
- - '@pipe':
2192
- - [au]
2193
- - '@pipe':
2194
- - ['{@date.toISOXString}']
2195
- - '@pipe':
2196
- - [job_id]
2197
- - '@pipe':
2198
- - ['{$self.output.data.workflowId}']
2199
- - ['{@object.create}']
2200
- - '@pipe':
2201
- - '@pipe':
2202
- - [$error]
2203
- - '@pipe':
2204
- - ['{$self.output.data}']
2205
- - '@pipe':
2206
- - [ac]
2207
- - '@pipe':
2208
- - ['{$job.metadata.jc}']
2209
- - '@pipe':
2210
- - [au]
2211
- - '@pipe':
2212
- - ['{@date.toISOXString}']
2213
- - '@pipe':
2214
- - [job_id]
2215
- - '@pipe':
2216
- - ['{$self.output.data.workflowId}']
2217
- - ['{@object.create}']
2218
- - ['{@conditional.ternary}']
2219
- - ['{@object.create}']
2220
-
2221
- transitions:
2222
- collator_trigger:
2223
- - to: collator_cycle_hook
2224
- collator_cycle_hook:
2225
- - to: collator_cycler
2226
- conditions:
2227
- code: 200
2228
- match:
2229
- - expected: true
2230
- actual:
2231
- '@pipe':
2232
- - '@pipe':
2233
- - ['{$job.data.cur_index}']
2234
- - '@pipe':
2235
- - ['{collator_trigger.output.data.items}']
2236
- - ['{@array.length}']
2237
- - ['{@conditional.less_than}']
2238
- - to: collator_childer
2239
- conditions:
2240
- code: 200
2241
- match:
2242
- - expected: 590
2243
- actual:
2244
- '@pipe':
2245
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
2246
- - ['{@array.get}', code]
2247
- - ['{@object.get}']
2248
- - to: collator_proxyer
2249
- conditions:
2250
- code: 200
2251
- match:
2252
- - expected: 591
2253
- actual:
2254
- '@pipe':
2255
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
2256
- - ['{@array.get}', code]
2257
- - ['{@object.get}']
2258
- - to: collator_sleeper
2259
- conditions:
2260
- code: 200
2261
- match:
2262
- - expected: 588
2263
- actual:
2264
- '@pipe':
2265
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
2266
- - ['{@array.get}', code]
2267
- - ['{@object.get}']
2268
- - to: collator_waiter
2269
- conditions:
2270
- code: 200
2271
- match:
2272
- - expected: 595
2273
- actual:
2274
- '@pipe':
2275
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
2276
- - ['{@array.get}', code]
2277
- - ['{@object.get}']
2278
-
2279
- hooks:
2280
- ${app}.wfs.signal:
2281
- - to: collator_waiter
2282
- conditions:
2283
- match:
2284
- - expected:
2285
- '@pipe':
2286
- - ['{collator_trigger.output.data.items}', '{collator_cycle_hook.output.data.cur_index}']
2287
- - ['{@array.get}', signalId]
2288
- - ['{@object.get}']
2289
- actual: '{$self.hook.data.id}'
2290
-
2291
-
2292
-
2293
- ###################################################
2294
- # THE REENTRANT ACTIVITY FLOW #
2295
- # #
2296
- - subscribes: ${app}.activity.execute
2297
- publishes: ${app}.activity.executed
2298
-
2299
- expire:
2300
- '@pipe':
2301
- - ['{activity_trigger.output.data.expire}', 1]
2302
- - ['{@conditional.nullish}']
2303
-
2304
- input:
2305
- schema:
2306
- type: object
2307
- properties:
2308
- parentWorkflowId:
2309
- type: string
2310
- originJobId:
2311
- type: string
2312
- workflowId:
2313
- type: string
2314
- workflowTopic:
2315
- type: string
2316
- activityName:
2317
- type: string
2318
- arguments:
2319
- type: array
2320
- backoffCoefficient:
2321
- type: number
2322
- maximumAttempts:
2323
- type: number
2324
- maximumInterval:
2325
- type: number
2326
- expire:
2327
- type: number
2328
- output:
2329
- schema:
2330
- type: object
2331
- properties:
2332
- response:
2333
- type: any
2334
- done:
2335
- type: boolean
2336
- workflowId:
2337
- type: string
2338
- jc:
2339
- type: string
2340
- ju:
2341
- type: string
2342
-
2343
- activities:
2344
- activity_trigger:
2345
- title: Activity Flow Trigger
2346
- type: trigger
2347
- stats:
2348
- id: '{$self.input.data.workflowId}'
2349
- key: '{$self.input.data.parentWorkflowId}'
2350
- parent: '{$self.input.data.originJobId}'
2351
- adjacent: '{$self.input.data.parentWorkflowId}'
2352
- job:
2353
- maps:
2354
- workflowId: '{$self.input.data.workflowId}'
2355
-
2356
- activity_cycle_hook:
2357
- title: Activity Flow Pivot - Cycling Descendants Point Here
2358
- type: hook
2359
- cycle: true
2360
- output:
2361
- schema:
2362
- type: object
2363
- properties:
2364
- retryCount:
2365
- type: number
2366
- maps:
2367
- retryCount: 0
2368
-
2369
- activity_worker:
2370
- title: Activity Worker - Calls Activity Functions
2371
- type: worker
2372
- topic: '{activity_trigger.output.data.workflowTopic}'
2373
- input:
2374
- schema:
2375
- type: object
2376
- properties:
2377
- parentWorkflowId:
2378
- type: string
2379
- workflowId:
2380
- type: string
2381
- workflowTopic:
2382
- type: string
2383
- activityName:
2384
- type: string
2385
- arguments:
2386
- type: array
2387
- maps:
2388
- parentWorkflowId: '{activity_trigger.output.data.parentWorkflowId}'
2389
- workflowId: '{activity_trigger.output.data.workflowId}'
2390
- workflowTopic: '{activity_trigger.output.data.workflowTopic}'
2391
- activityName: '{activity_trigger.output.data.activityName}'
2392
- arguments: '{activity_trigger.output.data.arguments}'
2393
- output:
2394
- schema:
2395
- type: object
2396
- properties:
2397
- response:
2398
- type: any
2399
- job:
2400
- maps:
2401
- response: '{$self.output.data.response}'
2402
-
2403
- activity_retryer:
2404
- title: Pauses for an exponentially-throttled amount of time after a 599 (retryable) error
2405
- type: hook
2406
- sleep:
2407
- '@pipe':
2408
- - '@pipe':
2409
- - ['{activity_trigger.output.data.backoffCoefficient}', 10]
2410
- - ['{@logical.or}', '{activity_cycle_hook.output.data.retryCount}']
2411
- - ['{@math.pow}']
2412
- - '@pipe':
2413
- - ['{activity_trigger.output.data.maximumInterval}', 120]
2414
- - ['{@math.min}']
2415
- - ['{@math.min}']
2416
-
2417
- activity_retry_cycler:
2418
- title: Cycles back to the activity_cycle_hook pivot, incrementing the \`retryCount\` (the exponential)
2419
- type: cycle
2420
- ancestor: activity_cycle_hook
2421
- input:
2422
- maps:
2423
- retryCount:
2424
- '@pipe':
2425
- - ['{activity_cycle_hook.output.data.retryCount}', 1]
2426
- - ['{@math.add}']
2427
-
2428
- activity_closer:
2429
- title: Marks the activity workflow as done
2430
- type: hook
2431
- job:
2432
- maps:
2433
- done: true
2434
- $error: '{activity_worker.output.data.$error}'
2435
- jc: '{$job.metadata.jc}'
2436
- ju:
2437
- '@pipe':
2438
- - ['{@date.toISOXString}']
2439
-
2440
- activity_stopper:
2441
- title: Stops the activity after retry count has been maxed
2442
- type: hook
2443
- job:
2444
- maps:
2445
- done: true
2446
- $error: '{activity_worker.output.data.$error}'
2447
- jc: '{$job.metadata.jc}'
2448
- ju:
2449
- '@pipe':
2450
- - ['{@date.toISOXString}']
2451
-
2452
- transitions:
2453
- activity_trigger:
2454
- - to: activity_cycle_hook
2455
- activity_cycle_hook:
2456
- - to: activity_worker
2457
- activity_worker:
2458
- - to: activity_closer
2459
- conditions:
2460
- code: [200, 598, 597, 596]
2461
- - to: activity_stopper
2462
- conditions:
2463
- code: 599
2464
- match:
2465
- - expected: true
2466
- actual:
2467
- '@pipe':
2468
- - '@pipe':
2469
- - ['{activity_cycle_hook.output.data.retryCount}']
2470
- - '@pipe':
2471
- - ['{activity_trigger.output.data.maximumAttempts}', 5]
2472
- - ['{@conditional.nullish}']
2473
- - ['{@conditional.greater_than_or_equal}']
2474
-
2475
- - to: activity_retryer
2476
- conditions:
2477
- code: 599
2478
- match:
2479
- - expected: true
2480
- actual:
2481
- '@pipe':
2482
- - '@pipe':
2483
- - ['{activity_cycle_hook.output.data.retryCount}']
2484
- - '@pipe':
2485
- - ['{activity_trigger.output.data.maximumAttempts}', 5]
2486
- - ['{@conditional.nullish}']
2487
- - ['{@conditional.less_than}']
2488
- activity_retryer:
2489
- - to: activity_retry_cycler
2490
- `;
2491
- };
2492
- exports.getWorkflowYAML = getWorkflowYAML;