@yiyi_zhang/reactflow-ui 0.1.0 → 0.3.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.
@@ -0,0 +1,186 @@
1
+ {
2
+ "workflowId": "wf_dynamic_fork_demo_001",
3
+ "status": "COMPLETED",
4
+ "startTime": 1704546000000,
5
+ "endTime": 1704546080000,
6
+ "input": {
7
+ "region": "us-east",
8
+ "services": [
9
+ "auth",
10
+ "payment",
11
+ "notification"
12
+ ]
13
+ },
14
+ "output": {
15
+ "deployedCount": 3,
16
+ "status": "All services deployed"
17
+ },
18
+ "workflowDefinition": {
19
+ "name": "dynamic_deployment_workflow",
20
+ "description": "FORK_JOIN_DYNAMIC 演示:运行时动态生成并行部署任务",
21
+ "version": 1,
22
+ "tasks": [
23
+ {
24
+ "name": "prepare_deployment",
25
+ "taskReferenceName": "prepare_ref",
26
+ "type": "HTTP",
27
+ "inputParameters": {
28
+ "uri": "https://deploy-api.example.com/prepare",
29
+ "method": "POST"
30
+ }
31
+ },
32
+ {
33
+ "name": "dynamic_deploy_fork",
34
+ "taskReferenceName": "deploy_fork_ref",
35
+ "type": "FORK_JOIN_DYNAMIC",
36
+ "inputParameters": {
37
+ "dynamicTasks": "${prepare_ref.output.tasks}",
38
+ "dynamicTasksInput": "${prepare_ref.output.taskInputs}"
39
+ }
40
+ },
41
+ {
42
+ "name": "join_deployments",
43
+ "taskReferenceName": "deploy_join_ref",
44
+ "type": "JOIN",
45
+ "joinOn": []
46
+ },
47
+ {
48
+ "name": "verify_deployments",
49
+ "taskReferenceName": "verify_ref",
50
+ "type": "SIMPLE",
51
+ "inputParameters": {
52
+ "region": "${workflow.input.region}"
53
+ }
54
+ },
55
+ {
56
+ "name": "notify_team",
57
+ "taskReferenceName": "notify_ref",
58
+ "type": "KAFKA_PUBLISH",
59
+ "inputParameters": {
60
+ "topic": "deployment-events"
61
+ }
62
+ }
63
+ ],
64
+ "schemaVersion": 2,
65
+ "restartable": true
66
+ },
67
+ "tasks": [
68
+ {
69
+ "taskId": "task_prepare_001",
70
+ "referenceTaskName": "prepare_ref",
71
+ "status": "COMPLETED",
72
+ "taskType": "HTTP",
73
+ "startTime": 1704546000000,
74
+ "endTime": 1704546005000,
75
+ "inputData": {
76
+ "uri": "https://deploy-api.example.com/prepare"
77
+ },
78
+ "outputData": {
79
+ "tasks": [
80
+ {
81
+ "name": "deploy_auth",
82
+ "taskReferenceName": "deploy_auth_ref",
83
+ "type": "SIMPLE"
84
+ },
85
+ {
86
+ "name": "deploy_payment",
87
+ "taskReferenceName": "deploy_payment_ref",
88
+ "type": "SIMPLE"
89
+ },
90
+ {
91
+ "name": "deploy_notification",
92
+ "taskReferenceName": "deploy_notification_ref",
93
+ "type": "HTTP"
94
+ }
95
+ ]
96
+ }
97
+ },
98
+ {
99
+ "taskId": "task_fork_001",
100
+ "referenceTaskName": "deploy_fork_ref",
101
+ "status": "COMPLETED",
102
+ "taskType": "FORK",
103
+ "startTime": 1704546006000,
104
+ "endTime": 1704546006100
105
+ },
106
+ {
107
+ "taskId": "task_deploy_auth_001",
108
+ "referenceTaskName": "deploy_auth_ref",
109
+ "status": "COMPLETED",
110
+ "taskType": "SIMPLE",
111
+ "startTime": 1704546007000,
112
+ "endTime": 1704546025000,
113
+ "inputData": {
114
+ "service": "auth",
115
+ "version": "2.1.0"
116
+ },
117
+ "outputData": {
118
+ "deployed": true,
119
+ "endpoint": "auth.internal:8080"
120
+ }
121
+ },
122
+ {
123
+ "taskId": "task_deploy_payment_001",
124
+ "referenceTaskName": "deploy_payment_ref",
125
+ "status": "COMPLETED",
126
+ "taskType": "SIMPLE",
127
+ "startTime": 1704546007000,
128
+ "endTime": 1704546030000,
129
+ "inputData": {
130
+ "service": "payment",
131
+ "version": "3.0.1"
132
+ },
133
+ "outputData": {
134
+ "deployed": true,
135
+ "endpoint": "payment.internal:8081"
136
+ }
137
+ },
138
+ {
139
+ "taskId": "task_deploy_notification_001",
140
+ "referenceTaskName": "deploy_notification_ref",
141
+ "status": "COMPLETED",
142
+ "taskType": "HTTP",
143
+ "startTime": 1704546007000,
144
+ "endTime": 1704546020000,
145
+ "inputData": {
146
+ "service": "notification",
147
+ "version": "1.5.2"
148
+ },
149
+ "outputData": {
150
+ "deployed": true,
151
+ "endpoint": "notify.internal:8082"
152
+ }
153
+ },
154
+ {
155
+ "taskId": "task_join_001",
156
+ "referenceTaskName": "deploy_join_ref",
157
+ "status": "COMPLETED",
158
+ "taskType": "JOIN",
159
+ "startTime": 1704546031000,
160
+ "endTime": 1704546031500
161
+ },
162
+ {
163
+ "taskId": "task_verify_001",
164
+ "referenceTaskName": "verify_ref",
165
+ "status": "COMPLETED",
166
+ "taskType": "SIMPLE",
167
+ "startTime": 1704546032000,
168
+ "endTime": 1704546045000,
169
+ "outputData": {
170
+ "allHealthy": true,
171
+ "checks": 3
172
+ }
173
+ },
174
+ {
175
+ "taskId": "task_notify_001",
176
+ "referenceTaskName": "notify_ref",
177
+ "status": "COMPLETED",
178
+ "taskType": "KAFKA_PUBLISH",
179
+ "startTime": 1704546046000,
180
+ "endTime": 1704546048000,
181
+ "outputData": {
182
+ "messageId": "msg_deploy_complete_123"
183
+ }
184
+ }
185
+ ]
186
+ }
@@ -0,0 +1,138 @@
1
+ {
2
+ "workflowId": "wf_human_demo_001",
3
+ "status": "RUNNING",
4
+ "startTime": 1704546000000,
5
+ "input": {
6
+ "requestId": "req_budget_approval",
7
+ "amount": 50000,
8
+ "department": "Engineering"
9
+ },
10
+ "workflowDefinition": {
11
+ "name": "budget_approval_workflow",
12
+ "description": "HUMAN 任务演示:预算审批流,当前等待人工审批",
13
+ "version": 1,
14
+ "tasks": [
15
+ {
16
+ "name": "submit_request",
17
+ "taskReferenceName": "submit_ref",
18
+ "type": "SIMPLE",
19
+ "inputParameters": {
20
+ "requestId": "${workflow.input.requestId}"
21
+ }
22
+ },
23
+ {
24
+ "name": "auto_validate",
25
+ "taskReferenceName": "validate_ref",
26
+ "type": "INLINE",
27
+ "inputParameters": {
28
+ "expression": "${workflow.input.amount} <= 100000"
29
+ }
30
+ },
31
+ {
32
+ "name": "manager_approval",
33
+ "taskReferenceName": "manager_approval_ref",
34
+ "type": "HUMAN",
35
+ "inputParameters": {
36
+ "assignee": "manager@example.com",
37
+ "taskName": "Approve Budget Request",
38
+ "displayName": "Budget Approval",
39
+ "formData": {
40
+ "requestId": "${workflow.input.requestId}",
41
+ "amount": "${workflow.input.amount}",
42
+ "department": "${workflow.input.department}"
43
+ }
44
+ }
45
+ },
46
+ {
47
+ "name": "route_approval_result",
48
+ "taskReferenceName": "route_result_ref",
49
+ "type": "SWITCH",
50
+ "inputParameters": {
51
+ "switchCaseValue": "${manager_approval_ref.output.decision}"
52
+ },
53
+ "evaluatorType": "value-param",
54
+ "expression": "switchCaseValue",
55
+ "decisionCases": {
56
+ "APPROVED": [
57
+ {
58
+ "name": "process_approved_budget",
59
+ "taskReferenceName": "process_approved_ref",
60
+ "type": "HTTP",
61
+ "inputParameters": {
62
+ "uri": "https://finance-api.example.com/allocate",
63
+ "method": "POST"
64
+ }
65
+ }
66
+ ],
67
+ "REJECTED": [
68
+ {
69
+ "name": "notify_rejection",
70
+ "taskReferenceName": "notify_rejection_ref",
71
+ "type": "EVENT",
72
+ "inputParameters": {
73
+ "sink": "sqs:rejection-events"
74
+ }
75
+ }
76
+ ]
77
+ },
78
+ "defaultCase": []
79
+ },
80
+ {
81
+ "name": "archive_request",
82
+ "taskReferenceName": "archive_ref",
83
+ "type": "SET_VARIABLE",
84
+ "inputParameters": {
85
+ "archived": true,
86
+ "archiveTime": "${workflow.endTime}"
87
+ }
88
+ }
89
+ ],
90
+ "schemaVersion": 2,
91
+ "restartable": true
92
+ },
93
+ "tasks": [
94
+ {
95
+ "taskId": "task_submit_001",
96
+ "referenceTaskName": "submit_ref",
97
+ "status": "COMPLETED",
98
+ "taskType": "SIMPLE",
99
+ "startTime": 1704546000000,
100
+ "endTime": 1704546003000,
101
+ "inputData": {
102
+ "requestId": "req_budget_approval"
103
+ },
104
+ "outputData": {
105
+ "submitted": true,
106
+ "ticketId": "TKT-2024-001"
107
+ }
108
+ },
109
+ {
110
+ "taskId": "task_validate_001",
111
+ "referenceTaskName": "validate_ref",
112
+ "status": "COMPLETED",
113
+ "taskType": "INLINE",
114
+ "startTime": 1704546004000,
115
+ "endTime": 1704546005000,
116
+ "outputData": {
117
+ "result": true,
118
+ "validationPassed": true
119
+ }
120
+ },
121
+ {
122
+ "taskId": "task_human_approval_001",
123
+ "referenceTaskName": "manager_approval_ref",
124
+ "status": "IN_PROGRESS",
125
+ "taskType": "HUMAN",
126
+ "startTime": 1704546006000,
127
+ "inputData": {
128
+ "assignee": "manager@example.com",
129
+ "taskName": "Approve Budget Request",
130
+ "formData": {
131
+ "requestId": "req_budget_approval",
132
+ "amount": 50000,
133
+ "department": "Engineering"
134
+ }
135
+ }
136
+ }
137
+ ]
138
+ }
@@ -0,0 +1,221 @@
1
+ {
2
+ "workflowId": "wf_loop_demo_001",
3
+ "status": "COMPLETED",
4
+ "startTime": 1704546000000,
5
+ "endTime": 1704546120000,
6
+ "input": {
7
+ "maxRetries": 3,
8
+ "dataItems": [
9
+ "A",
10
+ "B",
11
+ "C"
12
+ ]
13
+ },
14
+ "output": {
15
+ "processedCount": 3,
16
+ "status": "All items processed"
17
+ },
18
+ "workflowDefinition": {
19
+ "name": "data_processing_loop",
20
+ "description": "DO_WHILE 循环演示:逐项处理数据,循环 3 次",
21
+ "version": 1,
22
+ "tasks": [
23
+ {
24
+ "name": "fetch_data",
25
+ "taskReferenceName": "fetch_data_ref",
26
+ "type": "HTTP",
27
+ "inputParameters": {
28
+ "uri": "https://api.example.com/data",
29
+ "method": "GET"
30
+ }
31
+ },
32
+ {
33
+ "name": "process_data_loop",
34
+ "taskReferenceName": "loop_ref",
35
+ "type": "DO_WHILE",
36
+ "loopCondition": "${loop_ref.output.iteration} < ${workflow.input.maxRetries}",
37
+ "loopOver": [
38
+ {
39
+ "name": "process_item",
40
+ "taskReferenceName": "process_item_ref",
41
+ "type": "SIMPLE",
42
+ "inputParameters": {
43
+ "item": "${fetch_data_ref.output.items[${loop_ref.output.iteration}]}"
44
+ }
45
+ },
46
+ {
47
+ "name": "validate_item",
48
+ "taskReferenceName": "validate_item_ref",
49
+ "type": "INLINE",
50
+ "inputParameters": {
51
+ "expression": "$.processedItem !== null"
52
+ }
53
+ }
54
+ ]
55
+ },
56
+ {
57
+ "name": "aggregate_results",
58
+ "taskReferenceName": "aggregate_ref",
59
+ "type": "JSON_JQ_TRANSFORM",
60
+ "inputParameters": {
61
+ "queryExpression": ".items | length"
62
+ }
63
+ },
64
+ {
65
+ "name": "send_completion_event",
66
+ "taskReferenceName": "completion_event_ref",
67
+ "type": "EVENT",
68
+ "inputParameters": {
69
+ "sink": "sqs:workflow-events"
70
+ }
71
+ }
72
+ ],
73
+ "schemaVersion": 2,
74
+ "restartable": true
75
+ },
76
+ "tasks": [
77
+ {
78
+ "taskId": "task_fetch_001",
79
+ "referenceTaskName": "fetch_data_ref",
80
+ "status": "COMPLETED",
81
+ "taskType": "HTTP",
82
+ "startTime": 1704546000000,
83
+ "endTime": 1704546003000,
84
+ "inputData": {
85
+ "uri": "https://api.example.com/data",
86
+ "method": "GET"
87
+ },
88
+ "outputData": {
89
+ "items": [
90
+ "A",
91
+ "B",
92
+ "C"
93
+ ],
94
+ "count": 3
95
+ }
96
+ },
97
+ {
98
+ "taskId": "task_loop_001",
99
+ "referenceTaskName": "loop_ref",
100
+ "status": "COMPLETED",
101
+ "taskType": "DO_WHILE",
102
+ "startTime": 1704546004000,
103
+ "endTime": 1704546090000
104
+ },
105
+ {
106
+ "taskId": "task_process_item_iter1",
107
+ "referenceTaskName": "process_item_ref",
108
+ "status": "COMPLETED",
109
+ "taskType": "SIMPLE",
110
+ "iteration": 1,
111
+ "startTime": 1704546005000,
112
+ "endTime": 1704546015000,
113
+ "inputData": {
114
+ "item": "A"
115
+ },
116
+ "outputData": {
117
+ "processedItem": "A_processed",
118
+ "success": true
119
+ }
120
+ },
121
+ {
122
+ "taskId": "task_validate_item_iter1",
123
+ "referenceTaskName": "validate_item_ref",
124
+ "status": "COMPLETED",
125
+ "taskType": "INLINE",
126
+ "iteration": 1,
127
+ "startTime": 1704546016000,
128
+ "endTime": 1704546018000,
129
+ "inputData": {
130
+ "expression": "$.processedItem !== null"
131
+ },
132
+ "outputData": {
133
+ "result": true
134
+ }
135
+ },
136
+ {
137
+ "taskId": "task_process_item_iter2",
138
+ "referenceTaskName": "process_item_ref",
139
+ "status": "COMPLETED",
140
+ "taskType": "SIMPLE",
141
+ "iteration": 2,
142
+ "startTime": 1704546020000,
143
+ "endTime": 1704546030000,
144
+ "inputData": {
145
+ "item": "B"
146
+ },
147
+ "outputData": {
148
+ "processedItem": "B_processed",
149
+ "success": true
150
+ }
151
+ },
152
+ {
153
+ "taskId": "task_validate_item_iter2",
154
+ "referenceTaskName": "validate_item_ref",
155
+ "status": "COMPLETED",
156
+ "taskType": "INLINE",
157
+ "iteration": 2,
158
+ "startTime": 1704546031000,
159
+ "endTime": 1704546033000,
160
+ "inputData": {
161
+ "expression": "$.processedItem !== null"
162
+ },
163
+ "outputData": {
164
+ "result": true
165
+ }
166
+ },
167
+ {
168
+ "taskId": "task_process_item_iter3",
169
+ "referenceTaskName": "process_item_ref",
170
+ "status": "COMPLETED",
171
+ "taskType": "SIMPLE",
172
+ "iteration": 3,
173
+ "startTime": 1704546035000,
174
+ "endTime": 1704546055000,
175
+ "inputData": {
176
+ "item": "C"
177
+ },
178
+ "outputData": {
179
+ "processedItem": "C_processed",
180
+ "success": true
181
+ }
182
+ },
183
+ {
184
+ "taskId": "task_validate_item_iter3",
185
+ "referenceTaskName": "validate_item_ref",
186
+ "status": "COMPLETED",
187
+ "taskType": "INLINE",
188
+ "iteration": 3,
189
+ "startTime": 1704546056000,
190
+ "endTime": 1704546058000,
191
+ "inputData": {
192
+ "expression": "$.processedItem !== null"
193
+ },
194
+ "outputData": {
195
+ "result": true
196
+ }
197
+ },
198
+ {
199
+ "taskId": "task_aggregate_001",
200
+ "referenceTaskName": "aggregate_ref",
201
+ "status": "COMPLETED",
202
+ "taskType": "JSON_JQ_TRANSFORM",
203
+ "startTime": 1704546092000,
204
+ "endTime": 1704546094000,
205
+ "outputData": {
206
+ "count": 3
207
+ }
208
+ },
209
+ {
210
+ "taskId": "task_event_001",
211
+ "referenceTaskName": "completion_event_ref",
212
+ "status": "COMPLETED",
213
+ "taskType": "EVENT",
214
+ "startTime": 1704546095000,
215
+ "endTime": 1704546097000,
216
+ "outputData": {
217
+ "eventId": "evt_12345"
218
+ }
219
+ }
220
+ ]
221
+ }