@hotmeshio/hotmesh 0.0.34 → 0.0.36

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 (93) hide show
  1. package/README.md +30 -18
  2. package/build/modules/enums.d.ts +22 -0
  3. package/build/modules/enums.js +29 -0
  4. package/build/modules/errors.d.ts +10 -2
  5. package/build/modules/errors.js +14 -3
  6. package/build/modules/key.d.ts +16 -15
  7. package/build/modules/key.js +18 -15
  8. package/build/modules/utils.d.ts +1 -0
  9. package/build/modules/utils.js +6 -1
  10. package/build/package.json +3 -1
  11. package/build/services/activities/activity.d.ts +5 -0
  12. package/build/services/activities/activity.js +27 -6
  13. package/build/services/activities/await.js +11 -3
  14. package/build/services/activities/cycle.js +10 -2
  15. package/build/services/activities/hook.js +8 -2
  16. package/build/services/activities/index.d.ts +2 -2
  17. package/build/services/activities/index.js +2 -2
  18. package/build/services/activities/interrupt.d.ts +16 -0
  19. package/build/services/activities/interrupt.js +129 -0
  20. package/build/services/activities/signal.js +9 -2
  21. package/build/services/activities/trigger.d.ts +4 -0
  22. package/build/services/activities/trigger.js +14 -4
  23. package/build/services/activities/worker.js +10 -2
  24. package/build/services/collator/index.d.ts +4 -0
  25. package/build/services/collator/index.js +8 -0
  26. package/build/services/compiler/deployer.js +1 -3
  27. package/build/services/connector/index.js +2 -3
  28. package/build/services/durable/client.js +7 -3
  29. package/build/services/durable/factory.js +65 -284
  30. package/build/services/durable/handle.d.ts +37 -0
  31. package/build/services/durable/handle.js +52 -9
  32. package/build/services/durable/meshos.js +2 -2
  33. package/build/services/durable/worker.js +9 -2
  34. package/build/services/durable/workflow.d.ts +24 -0
  35. package/build/services/durable/workflow.js +56 -1
  36. package/build/services/engine/index.d.ts +14 -6
  37. package/build/services/engine/index.js +52 -27
  38. package/build/services/hotmesh/index.d.ts +3 -1
  39. package/build/services/hotmesh/index.js +11 -3
  40. package/build/services/quorum/index.d.ts +1 -0
  41. package/build/services/quorum/index.js +10 -0
  42. package/build/services/signaler/stream.js +25 -29
  43. package/build/services/store/clients/ioredis.js +1 -0
  44. package/build/services/store/index.d.ts +40 -4
  45. package/build/services/store/index.js +114 -9
  46. package/build/services/task/index.d.ts +5 -4
  47. package/build/services/task/index.js +12 -14
  48. package/build/types/activity.d.ts +35 -5
  49. package/build/types/durable.d.ts +4 -0
  50. package/build/types/index.d.ts +1 -1
  51. package/build/types/job.d.ts +18 -1
  52. package/build/types/quorum.d.ts +11 -7
  53. package/build/types/stream.d.ts +4 -1
  54. package/build/types/stream.js +2 -0
  55. package/modules/enums.ts +32 -0
  56. package/modules/errors.ts +24 -9
  57. package/modules/key.ts +4 -1
  58. package/modules/utils.ts +5 -0
  59. package/package.json +3 -1
  60. package/services/activities/activity.ts +34 -8
  61. package/services/activities/await.ts +11 -4
  62. package/services/activities/cycle.ts +10 -3
  63. package/services/activities/hook.ts +8 -3
  64. package/services/activities/index.ts +2 -2
  65. package/services/activities/interrupt.ts +159 -0
  66. package/services/activities/signal.ts +9 -3
  67. package/services/activities/trigger.ts +21 -5
  68. package/services/activities/worker.ts +10 -3
  69. package/services/collator/index.ts +10 -1
  70. package/services/compiler/deployer.ts +1 -3
  71. package/services/connector/index.ts +3 -5
  72. package/services/durable/client.ts +8 -4
  73. package/services/durable/factory.ts +65 -284
  74. package/services/durable/handle.ts +55 -9
  75. package/services/durable/meshos.ts +2 -3
  76. package/services/durable/worker.ts +9 -2
  77. package/services/durable/workflow.ts +66 -2
  78. package/services/engine/index.ts +74 -26
  79. package/services/hotmesh/index.ts +14 -4
  80. package/services/quorum/index.ts +9 -0
  81. package/services/signaler/stream.ts +27 -24
  82. package/services/store/clients/ioredis.ts +1 -0
  83. package/services/store/index.ts +119 -11
  84. package/services/task/index.ts +18 -18
  85. package/types/activity.ts +38 -8
  86. package/types/durable.ts +8 -4
  87. package/types/index.ts +1 -1
  88. package/types/job.ts +30 -1
  89. package/types/quorum.ts +13 -8
  90. package/types/stream.ts +3 -0
  91. package/build/services/activities/iterate.d.ts +0 -9
  92. package/build/services/activities/iterate.js +0 -13
  93. package/services/activities/iterate.ts +0 -26
@@ -18,13 +18,19 @@ const getWorkflowYAML = (app: string, version: string) => {
18
18
  graphs:
19
19
  - subscribes: ${app}.execute
20
20
  publishes: ${app}.executed
21
- expire: 120
21
+ expire:
22
+ '@pipe':
23
+ - ['{t1.output.data.originJobId}', 0, '{t1.output.data.expire}']
24
+ - ['{@conditional.ternary}']
25
+
22
26
  input:
23
27
  schema:
24
28
  type: object
25
29
  properties:
26
30
  parentWorkflowId:
27
31
  type: string
32
+ originJobId:
33
+ type: string
28
34
  workflowId:
29
35
  type: string
30
36
  arguments:
@@ -33,6 +39,8 @@ const getWorkflowYAML = (app: string, version: string) => {
33
39
  type: string
34
40
  backoffCoefficient:
35
41
  type: number
42
+ expire:
43
+ type: number
36
44
  output:
37
45
  schema:
38
46
  type: object
@@ -49,10 +57,7 @@ const getWorkflowYAML = (app: string, version: string) => {
49
57
  stats:
50
58
  id: '{$self.input.data.workflowId}'
51
59
  key: '{$self.input.data.parentWorkflowId}'
52
- granularity: infinity
53
- measures:
54
- - measure: index
55
- target: '{$self.input.data.parentWorkflowId}'
60
+ parent: '{$self.input.data.originJobId}'
56
61
  job:
57
62
  maps:
58
63
  done: false
@@ -83,10 +88,13 @@ const getWorkflowYAML = (app: string, version: string) => {
83
88
  properties:
84
89
  workflowId:
85
90
  type: string
91
+ originJobId:
92
+ type: string
86
93
  arguments:
87
94
  type: array
88
95
  maps:
89
96
  workflowId: '{t1.output.data.workflowId}'
97
+ originJobId: '{t1.output.data.originJobId}'
90
98
  arguments: '{t1.output.data.arguments}'
91
99
  output:
92
100
  schema:
@@ -146,18 +154,6 @@ const getWorkflowYAML = (app: string, version: string) => {
146
154
  response: '{$self.output.data.response}'
147
155
  done: '{$self.output.data.done}'
148
156
 
149
- a2:
150
- title: Wait for cleanup signal
151
- type: hook
152
- hook:
153
- type: object
154
- properties:
155
- done:
156
- type: boolean
157
- job:
158
- maps:
159
- workflowId: '{t1.output.data.workflowId}'
160
-
161
157
  sig:
162
158
  title: Signal In - Receive signals
163
159
  type: hook
@@ -199,12 +195,15 @@ const getWorkflowYAML = (app: string, version: string) => {
199
195
  properties:
200
196
  workflowId:
201
197
  type: string
198
+ originJobId:
199
+ type: string
202
200
  workflowDimension:
203
201
  type: string
204
202
  arguments:
205
203
  type: array
206
204
  maps:
207
205
  workflowId: '{t1.output.data.workflowId}'
206
+ originJobId: '{t1.output.data.originJobId}'
208
207
  workflowDimension: '{sig.output.metadata.dad}'
209
208
  arguments: '{sig.hook.data.arguments}'
210
209
  output:
@@ -256,7 +255,7 @@ const getWorkflowYAML = (app: string, version: string) => {
256
255
  maps:
257
256
  duration: '{$self.output.data.duration}'
258
257
  index: '{$self.output.data.index}'
259
-
258
+
260
259
  siga594:
261
260
  title: Signal In - Wait for signals
262
261
  type: await
@@ -279,6 +278,8 @@ const getWorkflowYAML = (app: string, version: string) => {
279
278
  type: number
280
279
  parentWorkflowId:
281
280
  type: string
281
+ originJobId:
282
+ type: string
282
283
  cycleWorkflowId:
283
284
  type: string
284
285
  baseWorkflowId:
@@ -290,6 +291,10 @@ const getWorkflowYAML = (app: string, version: string) => {
290
291
  '@pipe':
291
292
  - ['{$job.metadata.jid}', '-w']
292
293
  - ['{@string.concat}']
294
+ originJobId:
295
+ '@pipe':
296
+ - ['{t1.output.data.originJobId}', '{t1.output.data.originJobId}', '{$job.metadata.jid}']
297
+ - ['{@conditional.ternary}']
293
298
  cycleWorkflowId:
294
299
  '@pipe':
295
300
  - ['-', '{$job.metadata.jid}', '-$wfc', '{sig.output.metadata.dad}', '-', '{sigw1.output.data.index}']
@@ -331,6 +336,8 @@ const getWorkflowYAML = (app: string, version: string) => {
331
336
  type: string
332
337
  parentWorkflowId:
333
338
  type: string
339
+ originJobId:
340
+ type: string
334
341
  maps:
335
342
  duration: '{sigw1.output.data.duration}'
336
343
  index: '{sigw1.output.data.index}'
@@ -338,6 +345,11 @@ const getWorkflowYAML = (app: string, version: string) => {
338
345
  '@pipe':
339
346
  - ['{$job.metadata.jid}', '-s']
340
347
  - ['{@string.concat}']
348
+ originJobId:
349
+ '@pipe':
350
+ - ['{t1.output.data.originJobId}', '{t1.output.data.originJobId}', '{$job.metadata.jid}']
351
+ - ['{@conditional.ternary}']
352
+
341
353
  workflowId:
342
354
  '@pipe':
343
355
  - ['-', '{$job.metadata.jid}', '-$sleep', '{sig.output.metadata.dad}', '-', '{sigw1.output.data.index}']
@@ -410,6 +422,8 @@ const getWorkflowYAML = (app: string, version: string) => {
410
422
  type: number
411
423
  parentWorkflowId:
412
424
  type: string
425
+ originJobId:
426
+ type: string
413
427
  cycleWorkflowId:
414
428
  type: string
415
429
  baseWorkflowId:
@@ -421,6 +435,10 @@ const getWorkflowYAML = (app: string, version: string) => {
421
435
  '@pipe':
422
436
  - ['{$job.metadata.jid}', '-w']
423
437
  - ['{@string.concat}']
438
+ originJobId:
439
+ '@pipe':
440
+ - ['{t1.output.data.originJobId}', '{t1.output.data.originJobId}', '{$job.metadata.jid}']
441
+ - ['{@conditional.ternary}']
424
442
  cycleWorkflowId:
425
443
  '@pipe':
426
444
  - ['-', '{$job.metadata.jid}', '-$wfc-', '{w1.output.data.index}']
@@ -462,6 +480,8 @@ const getWorkflowYAML = (app: string, version: string) => {
462
480
  type: string
463
481
  parentWorkflowId:
464
482
  type: string
483
+ originJobId:
484
+ type: string
465
485
  maps:
466
486
  duration: '{w1.output.data.duration}'
467
487
  index: '{w1.output.data.index}'
@@ -469,6 +489,10 @@ const getWorkflowYAML = (app: string, version: string) => {
469
489
  '@pipe':
470
490
  - ['{$job.metadata.jid}', '-s']
471
491
  - ['{@string.concat}']
492
+ originJobId:
493
+ '@pipe':
494
+ - ['{t1.output.data.originJobId}', '{t1.output.data.originJobId}', '{$job.metadata.jid}']
495
+ - ['{@conditional.ternary}']
472
496
  workflowId:
473
497
  '@pipe':
474
498
  - ['-', '{$job.metadata.jid}', '-$sleep-', '{w1.output.data.index}']
@@ -519,154 +543,6 @@ const getWorkflowYAML = (app: string, version: string) => {
519
543
  - ['{a1.output.data.duration}', '{t1.output.data.backoffCoefficient}']
520
544
  - ['{@math.multiply}']
521
545
 
522
- s1:
523
- title: Awaken activity flows so they end and self-clean
524
- type: signal
525
- subtype: all
526
- key_name: parentWorkflowId
527
- key_value:
528
- '@pipe':
529
- - ['{$job.metadata.jid}', '-a']
530
- - ['{@string.concat}']
531
- topic: ${app}.activity.awaken
532
- resolver:
533
- schema:
534
- type: object
535
- properties:
536
- data:
537
- type: object
538
- properties:
539
- parentWorkflowId:
540
- type: string
541
- scrub:
542
- type: boolean
543
- maps:
544
- data:
545
- parentWorkflowId:
546
- '@pipe':
547
- - ['{$job.metadata.jid}', '-a']
548
- - ['{@string.concat}']
549
-
550
- scrub: true
551
- signal:
552
- schema:
553
- type: object
554
- properties:
555
- done:
556
- type: boolean
557
- maps:
558
- done: true
559
-
560
- s2:
561
- title: Awaken sleeping flows so they end and self-clean
562
- type: signal
563
- subtype: all
564
- key_name: parentWorkflowId
565
- key_value:
566
- '@pipe':
567
- - ['{$job.metadata.jid}', '-s']
568
- - ['{@string.concat}']
569
- topic: ${app}.sleep.awaken
570
- resolver:
571
- schema:
572
- type: object
573
- properties:
574
- data:
575
- type: object
576
- properties:
577
- parentWorkflowId:
578
- type: string
579
- scrub:
580
- type: boolean
581
- maps:
582
- data:
583
- parentWorkflowId:
584
- '@pipe':
585
- - ['{$job.metadata.jid}', '-s']
586
- - ['{@string.concat}']
587
- scrub: true
588
- signal:
589
- schema:
590
- type: object
591
- properties:
592
- done:
593
- type: boolean
594
- maps:
595
- done: true
596
-
597
- s3:
598
- title: Awaken WFS flows so they end and self-clean
599
- type: signal
600
- subtype: all
601
- key_name: parentWorkflowId
602
- key_value:
603
- '@pipe':
604
- - ['{$job.metadata.jid}', '-w']
605
- - ['{@string.concat}']
606
- topic: ${app}.wfs.awaken
607
- resolver:
608
- schema:
609
- type: object
610
- properties:
611
- data:
612
- type: object
613
- properties:
614
- parentWorkflowId:
615
- type: string
616
- scrub:
617
- type: boolean
618
- maps:
619
- data:
620
- parentWorkflowId:
621
- '@pipe':
622
- - ['{$job.metadata.jid}', '-w']
623
- - ['{@string.concat}']
624
- scrub: true
625
- signal:
626
- schema:
627
- type: object
628
- properties:
629
- done:
630
- type: boolean
631
- maps:
632
- done: true
633
-
634
- s4:
635
- title: Awaken child flows so they end and self-clean
636
- type: signal
637
- subtype: all
638
- key_name: parentWorkflowId
639
- key_value:
640
- '@pipe':
641
- - ['{$job.metadata.jid}', '-f']
642
- - ['{@string.concat}']
643
- topic: ${app}.childflow.awaken
644
- resolver:
645
- schema:
646
- type: object
647
- properties:
648
- data:
649
- type: object
650
- properties:
651
- parentWorkflowId:
652
- type: string
653
- scrub:
654
- type: boolean
655
- maps:
656
- data:
657
- parentWorkflowId:
658
- '@pipe':
659
- - ['{$job.metadata.jid}', '-f']
660
- - ['{@string.concat}']
661
- scrub: true
662
- signal:
663
- schema:
664
- type: object
665
- properties:
666
- done:
667
- type: boolean
668
- maps:
669
- done: true
670
546
  s5:
671
547
  title: Close Signal In Channel
672
548
  type: signal
@@ -684,14 +560,6 @@ const getWorkflowYAML = (app: string, version: string) => {
684
560
  transitions:
685
561
  t1:
686
562
  - to: a1
687
- - to: a2
688
- conditions:
689
- match:
690
- - expected: true
691
- actual:
692
- '@pipe':
693
- - ['{$job.metadata.key}', true, false]
694
- - ['{@conditional.ternary}']
695
563
  - to: sig
696
564
  sig:
697
565
  - to: siga1
@@ -714,12 +582,8 @@ const getWorkflowYAML = (app: string, version: string) => {
714
582
  code: 599
715
583
  siga594:
716
584
  - to: sigc594
717
- conditions:
718
- code: 202
719
585
  siga595:
720
586
  - to: sigc595
721
- conditions:
722
- code: 202
723
587
  siga592:
724
588
  - to: sigc592
725
589
  siga599:
@@ -739,42 +603,19 @@ const getWorkflowYAML = (app: string, version: string) => {
739
603
  - to: a599
740
604
  conditions:
741
605
  code: 599
742
- - to: s3
743
- conditions:
744
- code: [200, 598, 597, 596]
745
- - to: s1
746
- conditions:
747
- code: [200, 598, 597, 596]
748
- - to: s2
749
- conditions:
750
- code: [200, 598, 597, 596]
751
- - to: s4
752
- conditions:
753
- code: [200, 598, 597, 596]
754
606
  - to: s5
755
607
  conditions:
756
608
  code: [200, 598, 597, 596]
757
609
  a594:
758
610
  - to: c594
759
- conditions:
760
- code: 202
761
611
  a595:
762
612
  - to: c595
763
- conditions:
764
- code: 202
765
613
  a592:
766
614
  - to: c592
767
615
  a599:
768
616
  - to: c599
769
617
 
770
618
  hooks:
771
- ${app}.childflow.awaken:
772
- - to: a2
773
- conditions:
774
- match:
775
- - expected: '{t1.output.data.workflowId}'
776
- actual: '{$self.hook.data.id}'
777
-
778
619
  ${app}.flow.signal:
779
620
  - to: sig
780
621
  conditions:
@@ -785,7 +626,7 @@ const getWorkflowYAML = (app: string, version: string) => {
785
626
  - subscribes: ${app}.activity.execute
786
627
  publishes: ${app}.activity.executed
787
628
 
788
- expire: 120
629
+ expire: 0
789
630
 
790
631
  input:
791
632
  schema:
@@ -793,6 +634,8 @@ const getWorkflowYAML = (app: string, version: string) => {
793
634
  properties:
794
635
  parentWorkflowId:
795
636
  type: string
637
+ originJobId:
638
+ type: string
796
639
  workflowId:
797
640
  type: string
798
641
  workflowTopic:
@@ -817,16 +660,12 @@ const getWorkflowYAML = (app: string, version: string) => {
817
660
  stats:
818
661
  id: '{$self.input.data.workflowId}'
819
662
  key: '{$self.input.data.parentWorkflowId}'
820
- granularity: infinity
821
- measures:
822
- - measure: index
823
- target: '{$self.input.data.parentWorkflowId}'
663
+ parent: '{$self.input.data.originJobId}'
824
664
 
825
665
  w1a:
826
666
  title: Activity Worker - Calls Activity Functions
827
667
  type: worker
828
668
  topic: '{t1a.output.data.workflowTopic}'
829
- emit: true
830
669
  input:
831
670
  schema:
832
671
  type: object
@@ -858,36 +697,14 @@ const getWorkflowYAML = (app: string, version: string) => {
858
697
  response: '{$self.output.data.response}'
859
698
  done: true
860
699
 
861
- s1a:
862
- title: Awaken activity flows so they end and self-clean
863
- type: hook
864
- hook:
865
- type: object
866
- properties:
867
- done:
868
- type: boolean
869
- job:
870
- maps:
871
- workflowId: '{t1a.output.data.workflowId}'
872
-
873
700
  transitions:
874
701
  t1a:
875
702
  - to: w1a
876
- w1a:
877
- - to: s1a
878
-
879
- hooks:
880
- ${app}.activity.awaken:
881
- - to: s1a
882
- conditions:
883
- match:
884
- - expected: '{t1a.output.data.workflowId}'
885
- actual: '{$self.hook.data.id}'
886
703
 
887
704
  - subscribes: ${app}.sleep.execute
888
705
  publishes: ${app}.sleep.executed
889
706
 
890
- expire: 120
707
+ expire: 0
891
708
 
892
709
  input:
893
710
  schema:
@@ -895,6 +712,8 @@ const getWorkflowYAML = (app: string, version: string) => {
895
712
  properties:
896
713
  parentWorkflowId:
897
714
  type: string
715
+ originJobId:
716
+ type: string
898
717
  workflowId:
899
718
  type: string
900
719
  duration:
@@ -920,50 +739,27 @@ const getWorkflowYAML = (app: string, version: string) => {
920
739
  stats:
921
740
  id: '{$self.input.data.workflowId}'
922
741
  key: '{$self.input.data.parentWorkflowId}'
923
- granularity: infinity
924
- measures:
925
- - measure: index
926
- target: '{$self.input.data.parentWorkflowId}'
742
+ parent: '{$self.input.data.originJobId}'
927
743
 
928
744
  a1s:
929
745
  title: Sleep for a duration
930
746
  type: hook
931
747
  sleep: '{t1s.output.data.duration}'
932
- emit: true
933
-
934
- a2s:
935
- title: Awaken sleep flows so they end and self-clean
936
- type: hook
937
- hook:
938
- type: object
939
- properties:
940
- done:
941
- type: boolean
942
748
  job:
943
749
  maps:
944
750
  done: true
945
751
  duration: '{t1s.output.data.duration}'
946
752
  index: '{t1s.output.data.index}'
947
753
  workflowId: '{t1s.output.data.workflowId}'
948
-
754
+
949
755
  transitions:
950
756
  t1s:
951
757
  - to: a1s
952
- a1s:
953
- - to: a2s
954
-
955
- hooks:
956
- ${app}.sleep.awaken:
957
- - to: a2s
958
- conditions:
959
- match:
960
- - expected: '{t1s.output.data.workflowId}'
961
- actual: '{$self.hook.data.id}'
962
758
 
963
759
  - subscribes: ${app}.wfsc.execute
964
760
  publishes: ${app}.wfsc.executed
965
761
 
966
- expire: 120
762
+ expire: 0
967
763
 
968
764
  input:
969
765
  schema:
@@ -983,6 +779,8 @@ const getWorkflowYAML = (app: string, version: string) => {
983
779
  type: number
984
780
  parentWorkflowId:
985
781
  type: string
782
+ originJobId:
783
+ type: string
986
784
  cycleWorkflowId:
987
785
  type: string
988
786
  baseWorkflowId:
@@ -1001,6 +799,7 @@ const getWorkflowYAML = (app: string, version: string) => {
1001
799
  type: trigger
1002
800
  stats:
1003
801
  id: '{$self.input.data.cycleWorkflowId}'
802
+ parent: '{$self.input.data.originJobId}'
1004
803
 
1005
804
  a1wc:
1006
805
  title: Pivot - All Cycling Descendants Point Here
@@ -1076,7 +875,6 @@ const getWorkflowYAML = (app: string, version: string) => {
1076
875
  title: Call WFS workflow
1077
876
  type: await
1078
877
  topic: ${app}.wfs.execute
1079
- emit: true
1080
878
  input:
1081
879
  schema:
1082
880
  type: object
@@ -1084,6 +882,9 @@ const getWorkflowYAML = (app: string, version: string) => {
1084
882
  parentWorkflowId:
1085
883
  type: string
1086
884
  description: used to forge the cleanup key
885
+ originJobId:
886
+ type: string
887
+ description: used for dependency cleanup
1087
888
  signalId:
1088
889
  type: string
1089
890
  description: used to forge the custom hookid
@@ -1092,6 +893,7 @@ const getWorkflowYAML = (app: string, version: string) => {
1092
893
  description: the baseId + index
1093
894
  maps:
1094
895
  parentWorkflowId: '{t1wc.output.data.parentWorkflowId}'
896
+ originJobId: '{t1wc.output.data.originJobId}'
1095
897
  signalId: '{a1wc.output.data.targetSignal.signal}'
1096
898
  workflowId:
1097
899
  '@pipe':
@@ -1132,7 +934,7 @@ const getWorkflowYAML = (app: string, version: string) => {
1132
934
  - subscribes: ${app}.wfs.execute
1133
935
  publishes: ${app}.wfs.executed
1134
936
 
1135
- expire: 120
937
+ expire: 0
1136
938
 
1137
939
  input:
1138
940
  schema:
@@ -1141,6 +943,9 @@ const getWorkflowYAML = (app: string, version: string) => {
1141
943
  parentWorkflowId:
1142
944
  type: string
1143
945
  description: used to forge the cleanup key
946
+ originJobId:
947
+ type: string
948
+ description: used for dependency cleanup
1144
949
  workflowId:
1145
950
  type: string
1146
951
  description: used to forge the cleanup hookid
@@ -1165,15 +970,11 @@ const getWorkflowYAML = (app: string, version: string) => {
1165
970
  stats:
1166
971
  id: '{$self.input.data.workflowId}'
1167
972
  key: '{$self.input.data.parentWorkflowId}'
1168
- granularity: infinity
1169
- measures:
1170
- - measure: index
1171
- target: '{$self.input.data.parentWorkflowId}'
973
+ parent: '{$self.input.data.originJobId}'
1172
974
 
1173
975
  a1ww:
1174
976
  title: WFS - signal entry point
1175
977
  type: hook
1176
- emit: true
1177
978
  hook:
1178
979
  type: object
1179
980
  properties:
@@ -1184,24 +985,11 @@ const getWorkflowYAML = (app: string, version: string) => {
1184
985
  signalData: '{$self.hook.data}'
1185
986
  workflowId: '{t1ww.output.data.workflowId}'
1186
987
  signalId: '{t1ww.output.data.signalId}'
1187
-
1188
- a2ww:
1189
- title: WFS - cleanup signal entry point
1190
- type: hook
1191
- hook:
1192
- type: object
1193
- properties:
1194
- done:
1195
- type: boolean
1196
- job:
1197
- maps:
1198
988
  done: true
1199
- workflowId: '{t1ww.output.data.workflowId}'
1200
989
 
1201
990
  transitions:
1202
991
  t1ww:
1203
992
  - to: a1ww
1204
- - to: a2ww
1205
993
 
1206
994
  hooks:
1207
995
  ${app}.wfs.signal:
@@ -1209,14 +997,7 @@ const getWorkflowYAML = (app: string, version: string) => {
1209
997
  conditions:
1210
998
  match:
1211
999
  - expected: '{t1ww.output.data.signalId}'
1212
- actual: '{$self.hook.data.id}'
1213
- ${app}.wfs.awaken:
1214
- - to: a2ww
1215
- conditions:
1216
- match:
1217
- - expected: '{t1ww.output.data.workflowId}'
1218
- actual: '{$self.hook.data.id}'
1219
-
1000
+ actual: '{$self.hook.data.id}'
1220
1001
  `;
1221
1002
  };
1222
1003