Skip to content

Commit b98c9c1

Browse files
committed
feat(plugin-registry-base): add consumable workflow
1 parent 4c96885 commit b98c9c1

File tree

1 file changed

+21
-0
lines changed
  • packages/plugin-registry-base/assets/code/microservice/type-mixin/workflows

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
attributes:
2+
consumedAt: :timestamp
3+
canceledAt: :timestamp
4+
status:
5+
type: workflow
6+
default: CREATED
7+
cascadePopulate:
8+
CREATED: { createdAt: '@now' }
9+
CONSUMED: { consumedAt: '@now' }
10+
CANCELED: { canceledAt: '@now' }
11+
cascadeClear:
12+
CREATED: [ consumedAt, canceledAt ]
13+
CONSUMED: [ canceledAt ]
14+
CANCELED: [ ]
15+
config:
16+
steps: [CREATED, CONSUMED, CANCELED]
17+
transitions:
18+
undefined: [CREATED]
19+
CREATED: [CONSUMED, CANCELED]
20+
CONSUMED: [CANCELED]
21+
CANCELED: []

0 commit comments

Comments
 (0)