@yiyi_zhang/reactflow-ui 0.2.0 → 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.
@@ -3,8 +3,18 @@
3
3
  "status": "COMPLETED",
4
4
  "startTime": 1704546000000,
5
5
  "endTime": 1704546080000,
6
- "input": { "region": "us-east", "services": ["auth", "payment", "notification"] },
7
- "output": { "deployedCount": 3, "status": "All services deployed" },
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
+ },
8
18
  "workflowDefinition": {
9
19
  "name": "dynamic_deployment_workflow",
10
20
  "description": "FORK_JOIN_DYNAMIC 演示:运行时动态生成并行部署任务",
@@ -51,7 +61,8 @@
51
61
  }
52
62
  }
53
63
  ],
54
- "schemaVersion": 2
64
+ "schemaVersion": 2,
65
+ "restartable": true
55
66
  },
56
67
  "tasks": [
57
68
  {
@@ -61,12 +72,26 @@
61
72
  "taskType": "HTTP",
62
73
  "startTime": 1704546000000,
63
74
  "endTime": 1704546005000,
64
- "inputData": { "uri": "https://deploy-api.example.com/prepare" },
75
+ "inputData": {
76
+ "uri": "https://deploy-api.example.com/prepare"
77
+ },
65
78
  "outputData": {
66
79
  "tasks": [
67
- { "name": "deploy_auth", "taskReferenceName": "deploy_auth_ref", "type": "SIMPLE" },
68
- { "name": "deploy_payment", "taskReferenceName": "deploy_payment_ref", "type": "SIMPLE" },
69
- { "name": "deploy_notification", "taskReferenceName": "deploy_notification_ref", "type": "HTTP" }
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
+ }
70
95
  ]
71
96
  }
72
97
  },
@@ -85,8 +110,14 @@
85
110
  "taskType": "SIMPLE",
86
111
  "startTime": 1704546007000,
87
112
  "endTime": 1704546025000,
88
- "inputData": { "service": "auth", "version": "2.1.0" },
89
- "outputData": { "deployed": true, "endpoint": "auth.internal:8080" }
113
+ "inputData": {
114
+ "service": "auth",
115
+ "version": "2.1.0"
116
+ },
117
+ "outputData": {
118
+ "deployed": true,
119
+ "endpoint": "auth.internal:8080"
120
+ }
90
121
  },
91
122
  {
92
123
  "taskId": "task_deploy_payment_001",
@@ -95,8 +126,14 @@
95
126
  "taskType": "SIMPLE",
96
127
  "startTime": 1704546007000,
97
128
  "endTime": 1704546030000,
98
- "inputData": { "service": "payment", "version": "3.0.1" },
99
- "outputData": { "deployed": true, "endpoint": "payment.internal:8081" }
129
+ "inputData": {
130
+ "service": "payment",
131
+ "version": "3.0.1"
132
+ },
133
+ "outputData": {
134
+ "deployed": true,
135
+ "endpoint": "payment.internal:8081"
136
+ }
100
137
  },
101
138
  {
102
139
  "taskId": "task_deploy_notification_001",
@@ -105,8 +142,14 @@
105
142
  "taskType": "HTTP",
106
143
  "startTime": 1704546007000,
107
144
  "endTime": 1704546020000,
108
- "inputData": { "service": "notification", "version": "1.5.2" },
109
- "outputData": { "deployed": true, "endpoint": "notify.internal:8082" }
145
+ "inputData": {
146
+ "service": "notification",
147
+ "version": "1.5.2"
148
+ },
149
+ "outputData": {
150
+ "deployed": true,
151
+ "endpoint": "notify.internal:8082"
152
+ }
110
153
  },
111
154
  {
112
155
  "taskId": "task_join_001",
@@ -123,7 +166,10 @@
123
166
  "taskType": "SIMPLE",
124
167
  "startTime": 1704546032000,
125
168
  "endTime": 1704546045000,
126
- "outputData": { "allHealthy": true, "checks": 3 }
169
+ "outputData": {
170
+ "allHealthy": true,
171
+ "checks": 3
172
+ }
127
173
  },
128
174
  {
129
175
  "taskId": "task_notify_001",
@@ -132,7 +178,9 @@
132
178
  "taskType": "KAFKA_PUBLISH",
133
179
  "startTime": 1704546046000,
134
180
  "endTime": 1704546048000,
135
- "outputData": { "messageId": "msg_deploy_complete_123" }
181
+ "outputData": {
182
+ "messageId": "msg_deploy_complete_123"
183
+ }
136
184
  }
137
185
  ]
138
- }
186
+ }
@@ -2,7 +2,11 @@
2
2
  "workflowId": "wf_human_demo_001",
3
3
  "status": "RUNNING",
4
4
  "startTime": 1704546000000,
5
- "input": { "requestId": "req_budget_approval", "amount": 50000, "department": "Engineering" },
5
+ "input": {
6
+ "requestId": "req_budget_approval",
7
+ "amount": 50000,
8
+ "department": "Engineering"
9
+ },
6
10
  "workflowDefinition": {
7
11
  "name": "budget_approval_workflow",
8
12
  "description": "HUMAN 任务演示:预算审批流,当前等待人工审批",
@@ -12,7 +16,9 @@
12
16
  "name": "submit_request",
13
17
  "taskReferenceName": "submit_ref",
14
18
  "type": "SIMPLE",
15
- "inputParameters": { "requestId": "${workflow.input.requestId}" }
19
+ "inputParameters": {
20
+ "requestId": "${workflow.input.requestId}"
21
+ }
16
22
  },
17
23
  {
18
24
  "name": "auto_validate",
@@ -41,7 +47,9 @@
41
47
  "name": "route_approval_result",
42
48
  "taskReferenceName": "route_result_ref",
43
49
  "type": "SWITCH",
44
- "inputParameters": { "switchCaseValue": "${manager_approval_ref.output.decision}" },
50
+ "inputParameters": {
51
+ "switchCaseValue": "${manager_approval_ref.output.decision}"
52
+ },
45
53
  "evaluatorType": "value-param",
46
54
  "expression": "switchCaseValue",
47
55
  "decisionCases": {
@@ -61,7 +69,9 @@
61
69
  "name": "notify_rejection",
62
70
  "taskReferenceName": "notify_rejection_ref",
63
71
  "type": "EVENT",
64
- "inputParameters": { "sink": "sqs:rejection-events" }
72
+ "inputParameters": {
73
+ "sink": "sqs:rejection-events"
74
+ }
65
75
  }
66
76
  ]
67
77
  },
@@ -77,7 +87,8 @@
77
87
  }
78
88
  }
79
89
  ],
80
- "schemaVersion": 2
90
+ "schemaVersion": 2,
91
+ "restartable": true
81
92
  },
82
93
  "tasks": [
83
94
  {
@@ -87,8 +98,13 @@
87
98
  "taskType": "SIMPLE",
88
99
  "startTime": 1704546000000,
89
100
  "endTime": 1704546003000,
90
- "inputData": { "requestId": "req_budget_approval" },
91
- "outputData": { "submitted": true, "ticketId": "TKT-2024-001" }
101
+ "inputData": {
102
+ "requestId": "req_budget_approval"
103
+ },
104
+ "outputData": {
105
+ "submitted": true,
106
+ "ticketId": "TKT-2024-001"
107
+ }
92
108
  },
93
109
  {
94
110
  "taskId": "task_validate_001",
@@ -97,7 +113,10 @@
97
113
  "taskType": "INLINE",
98
114
  "startTime": 1704546004000,
99
115
  "endTime": 1704546005000,
100
- "outputData": { "result": true, "validationPassed": true }
116
+ "outputData": {
117
+ "result": true,
118
+ "validationPassed": true
119
+ }
101
120
  },
102
121
  {
103
122
  "taskId": "task_human_approval_001",
@@ -116,4 +135,4 @@
116
135
  }
117
136
  }
118
137
  ]
119
- }
138
+ }
@@ -3,8 +3,18 @@
3
3
  "status": "COMPLETED",
4
4
  "startTime": 1704546000000,
5
5
  "endTime": 1704546120000,
6
- "input": { "maxRetries": 3, "dataItems": ["A", "B", "C"] },
7
- "output": { "processedCount": 3, "status": "All items processed" },
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
+ },
8
18
  "workflowDefinition": {
9
19
  "name": "data_processing_loop",
10
20
  "description": "DO_WHILE 循环演示:逐项处理数据,循环 3 次",
@@ -60,7 +70,8 @@
60
70
  }
61
71
  }
62
72
  ],
63
- "schemaVersion": 2
73
+ "schemaVersion": 2,
74
+ "restartable": true
64
75
  },
65
76
  "tasks": [
66
77
  {
@@ -70,8 +81,18 @@
70
81
  "taskType": "HTTP",
71
82
  "startTime": 1704546000000,
72
83
  "endTime": 1704546003000,
73
- "inputData": { "uri": "https://api.example.com/data", "method": "GET" },
74
- "outputData": { "items": ["A", "B", "C"], "count": 3 }
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
+ }
75
96
  },
76
97
  {
77
98
  "taskId": "task_loop_001",
@@ -89,8 +110,13 @@
89
110
  "iteration": 1,
90
111
  "startTime": 1704546005000,
91
112
  "endTime": 1704546015000,
92
- "inputData": { "item": "A" },
93
- "outputData": { "processedItem": "A_processed", "success": true }
113
+ "inputData": {
114
+ "item": "A"
115
+ },
116
+ "outputData": {
117
+ "processedItem": "A_processed",
118
+ "success": true
119
+ }
94
120
  },
95
121
  {
96
122
  "taskId": "task_validate_item_iter1",
@@ -100,8 +126,12 @@
100
126
  "iteration": 1,
101
127
  "startTime": 1704546016000,
102
128
  "endTime": 1704546018000,
103
- "inputData": { "expression": "$.processedItem !== null" },
104
- "outputData": { "result": true }
129
+ "inputData": {
130
+ "expression": "$.processedItem !== null"
131
+ },
132
+ "outputData": {
133
+ "result": true
134
+ }
105
135
  },
106
136
  {
107
137
  "taskId": "task_process_item_iter2",
@@ -111,8 +141,13 @@
111
141
  "iteration": 2,
112
142
  "startTime": 1704546020000,
113
143
  "endTime": 1704546030000,
114
- "inputData": { "item": "B" },
115
- "outputData": { "processedItem": "B_processed", "success": true }
144
+ "inputData": {
145
+ "item": "B"
146
+ },
147
+ "outputData": {
148
+ "processedItem": "B_processed",
149
+ "success": true
150
+ }
116
151
  },
117
152
  {
118
153
  "taskId": "task_validate_item_iter2",
@@ -122,8 +157,12 @@
122
157
  "iteration": 2,
123
158
  "startTime": 1704546031000,
124
159
  "endTime": 1704546033000,
125
- "inputData": { "expression": "$.processedItem !== null" },
126
- "outputData": { "result": true }
160
+ "inputData": {
161
+ "expression": "$.processedItem !== null"
162
+ },
163
+ "outputData": {
164
+ "result": true
165
+ }
127
166
  },
128
167
  {
129
168
  "taskId": "task_process_item_iter3",
@@ -133,8 +172,13 @@
133
172
  "iteration": 3,
134
173
  "startTime": 1704546035000,
135
174
  "endTime": 1704546055000,
136
- "inputData": { "item": "C" },
137
- "outputData": { "processedItem": "C_processed", "success": true }
175
+ "inputData": {
176
+ "item": "C"
177
+ },
178
+ "outputData": {
179
+ "processedItem": "C_processed",
180
+ "success": true
181
+ }
138
182
  },
139
183
  {
140
184
  "taskId": "task_validate_item_iter3",
@@ -144,8 +188,12 @@
144
188
  "iteration": 3,
145
189
  "startTime": 1704546056000,
146
190
  "endTime": 1704546058000,
147
- "inputData": { "expression": "$.processedItem !== null" },
148
- "outputData": { "result": true }
191
+ "inputData": {
192
+ "expression": "$.processedItem !== null"
193
+ },
194
+ "outputData": {
195
+ "result": true
196
+ }
149
197
  },
150
198
  {
151
199
  "taskId": "task_aggregate_001",
@@ -154,7 +202,9 @@
154
202
  "taskType": "JSON_JQ_TRANSFORM",
155
203
  "startTime": 1704546092000,
156
204
  "endTime": 1704546094000,
157
- "outputData": { "count": 3 }
205
+ "outputData": {
206
+ "count": 3
207
+ }
158
208
  },
159
209
  {
160
210
  "taskId": "task_event_001",
@@ -163,7 +213,9 @@
163
213
  "taskType": "EVENT",
164
214
  "startTime": 1704546095000,
165
215
  "endTime": 1704546097000,
166
- "outputData": { "eventId": "evt_12345" }
216
+ "outputData": {
217
+ "eventId": "evt_12345"
218
+ }
167
219
  }
168
220
  ]
169
- }
221
+ }
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "workflowId": "wf_mixed_status_demo_001",
3
- "status": "RUNNING",
3
+ "status": "FAILED",
4
4
  "startTime": 1704546000000,
5
+ "endTime": 1704546050000,
6
+ "reasonForIncompletion": "Workflow failed: integration tests failed, blocking downstream tasks",
5
7
  "input": { "environment": "production", "version": "3.2.1" },
6
8
  "workflowDefinition": {
7
9
  "name": "cicd_pipeline_workflow",
8
10
  "description": "混合状态演示:CI/CD 流水线,包含完成、运行中、失败和等待中的任务",
9
11
  "version": 1,
12
+ "restartable": true,
10
13
  "tasks": [
11
14
  {
12
15
  "name": "checkout_code",
@@ -146,9 +149,10 @@
146
149
  {
147
150
  "taskId": "task_build_001",
148
151
  "referenceTaskName": "build_ref",
149
- "status": "IN_PROGRESS",
152
+ "status": "CANCELED",
150
153
  "taskType": "SIMPLE",
151
154
  "startTime": 1704546047000,
155
+ "endTime": 1704546048000,
152
156
  "inputData": { "version": "3.2.1", "skipTests": true }
153
157
  }
154
158
  ]
@@ -3,8 +3,14 @@
3
3
  "status": "COMPLETED",
4
4
  "startTime": 1704546000000,
5
5
  "endTime": 1704546180000,
6
- "input": { "orderId": "ord_9876", "maxRetries": 3 },
7
- "output": { "orderStatus": "PROCESSED", "transactionId": "txn_abc123" },
6
+ "input": {
7
+ "orderId": "ord_9876",
8
+ "maxRetries": 3
9
+ },
10
+ "output": {
11
+ "orderStatus": "PROCESSED",
12
+ "transactionId": "txn_abc123"
13
+ },
8
14
  "workflowDefinition": {
9
15
  "name": "payment_processing_workflow",
10
16
  "description": "重试机制演示:支付任务重试 2 次后成功,通知任务首次成功",
@@ -14,7 +20,9 @@
14
20
  "name": "validate_order",
15
21
  "taskReferenceName": "validate_order_ref",
16
22
  "type": "SIMPLE",
17
- "inputParameters": { "orderId": "${workflow.input.orderId}" }
23
+ "inputParameters": {
24
+ "orderId": "${workflow.input.orderId}"
25
+ }
18
26
  },
19
27
  {
20
28
  "name": "process_payment",
@@ -25,7 +33,9 @@
25
33
  "inputParameters": {
26
34
  "uri": "https://payment-api.example.com/charge",
27
35
  "method": "POST",
28
- "body": { "orderId": "${workflow.input.orderId}" }
36
+ "body": {
37
+ "orderId": "${workflow.input.orderId}"
38
+ }
29
39
  }
30
40
  },
31
41
  {
@@ -33,7 +43,9 @@
33
43
  "taskReferenceName": "update_inventory_ref",
34
44
  "type": "SIMPLE",
35
45
  "retryCount": 2,
36
- "inputParameters": { "orderId": "${workflow.input.orderId}" }
46
+ "inputParameters": {
47
+ "orderId": "${workflow.input.orderId}"
48
+ }
37
49
  },
38
50
  {
39
51
  "name": "send_confirmation",
@@ -45,7 +57,8 @@
45
57
  }
46
58
  }
47
59
  ],
48
- "schemaVersion": 2
60
+ "schemaVersion": 2,
61
+ "restartable": true
49
62
  },
50
63
  "tasks": [
51
64
  {
@@ -55,8 +68,13 @@
55
68
  "taskType": "SIMPLE",
56
69
  "startTime": 1704546000000,
57
70
  "endTime": 1704546005000,
58
- "inputData": { "orderId": "ord_9876" },
59
- "outputData": { "valid": true, "amount": 99.99 }
71
+ "inputData": {
72
+ "orderId": "ord_9876"
73
+ },
74
+ "outputData": {
75
+ "valid": true,
76
+ "amount": 99.99
77
+ }
60
78
  },
61
79
  {
62
80
  "taskId": "task_payment_retry0",
@@ -66,7 +84,10 @@
66
84
  "retryCount": 0,
67
85
  "startTime": 1704546006000,
68
86
  "endTime": 1704546016000,
69
- "inputData": { "orderId": "ord_9876", "amount": 99.99 },
87
+ "inputData": {
88
+ "orderId": "ord_9876",
89
+ "amount": 99.99
90
+ },
70
91
  "reasonForIncompletion": "Connection timeout: payment gateway unreachable"
71
92
  },
72
93
  {
@@ -77,7 +98,10 @@
77
98
  "retryCount": 1,
78
99
  "startTime": 1704546026000,
79
100
  "endTime": 1704546036000,
80
- "inputData": { "orderId": "ord_9876", "amount": 99.99 },
101
+ "inputData": {
102
+ "orderId": "ord_9876",
103
+ "amount": 99.99
104
+ },
81
105
  "reasonForIncompletion": "HTTP 503: Service Temporarily Unavailable"
82
106
  },
83
107
  {
@@ -88,8 +112,14 @@
88
112
  "retryCount": 2,
89
113
  "startTime": 1704546046000,
90
114
  "endTime": 1704546056000,
91
- "inputData": { "orderId": "ord_9876", "amount": 99.99 },
92
- "outputData": { "transactionId": "txn_abc123", "status": "APPROVED" }
115
+ "inputData": {
116
+ "orderId": "ord_9876",
117
+ "amount": 99.99
118
+ },
119
+ "outputData": {
120
+ "transactionId": "txn_abc123",
121
+ "status": "APPROVED"
122
+ }
93
123
  },
94
124
  {
95
125
  "taskId": "task_inventory_retry0",
@@ -109,7 +139,10 @@
109
139
  "retryCount": 1,
110
140
  "startTime": 1704546077000,
111
141
  "endTime": 1704546085000,
112
- "outputData": { "updated": true, "newStock": 42 }
142
+ "outputData": {
143
+ "updated": true,
144
+ "newStock": 42
145
+ }
113
146
  },
114
147
  {
115
148
  "taskId": "task_confirm_001",
@@ -118,7 +151,10 @@
118
151
  "taskType": "HTTP",
119
152
  "startTime": 1704546086000,
120
153
  "endTime": 1704546090000,
121
- "outputData": { "emailSent": true, "messageId": "msg_confirm_456" }
154
+ "outputData": {
155
+ "emailSent": true,
156
+ "messageId": "msg_confirm_456"
157
+ }
122
158
  }
123
159
  ]
124
- }
160
+ }