@yiyi_zhang/reactflow-ui 0.1.0 → 0.2.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.
- package/README.md +2 -1
- package/dist/components/ConfirmDialog.d.ts +1 -1
- package/dist/components/nodes/DynamicPlaceholderNode.d.ts +5 -0
- package/dist/components/nodes/PlusNode.d.ts +3 -0
- package/dist/config/taskTypes.d.ts +1 -1
- package/dist/hooks/useNodeExecution.d.ts +2 -1
- package/dist/parser/conductorGenerator.d.ts +8 -0
- package/dist/reactflow-ui.es.js +7424 -6763
- package/dist/reactflow-ui.umd.js +28 -17
- package/dist/sample-executions/fork-dynamic.json +138 -0
- package/dist/sample-executions/human-approval.json +119 -0
- package/dist/sample-executions/loop-iterations.json +169 -0
- package/dist/sample-executions/mixed-status.json +155 -0
- package/dist/sample-executions/retry-tasks.json +124 -0
- package/dist/sample-executions/switch-branches.json +136 -0
- package/dist/types/conductor.d.ts +20 -1
- package/dist/types/workflow.d.ts +5 -1
- package/dist/utils/validationRules.d.ts +25 -0
- package/package.json +1 -1
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"workflowId": "wf_dynamic_fork_demo_001",
|
|
3
|
+
"status": "COMPLETED",
|
|
4
|
+
"startTime": 1704546000000,
|
|
5
|
+
"endTime": 1704546080000,
|
|
6
|
+
"input": { "region": "us-east", "services": ["auth", "payment", "notification"] },
|
|
7
|
+
"output": { "deployedCount": 3, "status": "All services deployed" },
|
|
8
|
+
"workflowDefinition": {
|
|
9
|
+
"name": "dynamic_deployment_workflow",
|
|
10
|
+
"description": "FORK_JOIN_DYNAMIC 演示:运行时动态生成并行部署任务",
|
|
11
|
+
"version": 1,
|
|
12
|
+
"tasks": [
|
|
13
|
+
{
|
|
14
|
+
"name": "prepare_deployment",
|
|
15
|
+
"taskReferenceName": "prepare_ref",
|
|
16
|
+
"type": "HTTP",
|
|
17
|
+
"inputParameters": {
|
|
18
|
+
"uri": "https://deploy-api.example.com/prepare",
|
|
19
|
+
"method": "POST"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "dynamic_deploy_fork",
|
|
24
|
+
"taskReferenceName": "deploy_fork_ref",
|
|
25
|
+
"type": "FORK_JOIN_DYNAMIC",
|
|
26
|
+
"inputParameters": {
|
|
27
|
+
"dynamicTasks": "${prepare_ref.output.tasks}",
|
|
28
|
+
"dynamicTasksInput": "${prepare_ref.output.taskInputs}"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "join_deployments",
|
|
33
|
+
"taskReferenceName": "deploy_join_ref",
|
|
34
|
+
"type": "JOIN",
|
|
35
|
+
"joinOn": []
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "verify_deployments",
|
|
39
|
+
"taskReferenceName": "verify_ref",
|
|
40
|
+
"type": "SIMPLE",
|
|
41
|
+
"inputParameters": {
|
|
42
|
+
"region": "${workflow.input.region}"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "notify_team",
|
|
47
|
+
"taskReferenceName": "notify_ref",
|
|
48
|
+
"type": "KAFKA_PUBLISH",
|
|
49
|
+
"inputParameters": {
|
|
50
|
+
"topic": "deployment-events"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"schemaVersion": 2
|
|
55
|
+
},
|
|
56
|
+
"tasks": [
|
|
57
|
+
{
|
|
58
|
+
"taskId": "task_prepare_001",
|
|
59
|
+
"referenceTaskName": "prepare_ref",
|
|
60
|
+
"status": "COMPLETED",
|
|
61
|
+
"taskType": "HTTP",
|
|
62
|
+
"startTime": 1704546000000,
|
|
63
|
+
"endTime": 1704546005000,
|
|
64
|
+
"inputData": { "uri": "https://deploy-api.example.com/prepare" },
|
|
65
|
+
"outputData": {
|
|
66
|
+
"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" }
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"taskId": "task_fork_001",
|
|
75
|
+
"referenceTaskName": "deploy_fork_ref",
|
|
76
|
+
"status": "COMPLETED",
|
|
77
|
+
"taskType": "FORK",
|
|
78
|
+
"startTime": 1704546006000,
|
|
79
|
+
"endTime": 1704546006100
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"taskId": "task_deploy_auth_001",
|
|
83
|
+
"referenceTaskName": "deploy_auth_ref",
|
|
84
|
+
"status": "COMPLETED",
|
|
85
|
+
"taskType": "SIMPLE",
|
|
86
|
+
"startTime": 1704546007000,
|
|
87
|
+
"endTime": 1704546025000,
|
|
88
|
+
"inputData": { "service": "auth", "version": "2.1.0" },
|
|
89
|
+
"outputData": { "deployed": true, "endpoint": "auth.internal:8080" }
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"taskId": "task_deploy_payment_001",
|
|
93
|
+
"referenceTaskName": "deploy_payment_ref",
|
|
94
|
+
"status": "COMPLETED",
|
|
95
|
+
"taskType": "SIMPLE",
|
|
96
|
+
"startTime": 1704546007000,
|
|
97
|
+
"endTime": 1704546030000,
|
|
98
|
+
"inputData": { "service": "payment", "version": "3.0.1" },
|
|
99
|
+
"outputData": { "deployed": true, "endpoint": "payment.internal:8081" }
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"taskId": "task_deploy_notification_001",
|
|
103
|
+
"referenceTaskName": "deploy_notification_ref",
|
|
104
|
+
"status": "COMPLETED",
|
|
105
|
+
"taskType": "HTTP",
|
|
106
|
+
"startTime": 1704546007000,
|
|
107
|
+
"endTime": 1704546020000,
|
|
108
|
+
"inputData": { "service": "notification", "version": "1.5.2" },
|
|
109
|
+
"outputData": { "deployed": true, "endpoint": "notify.internal:8082" }
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"taskId": "task_join_001",
|
|
113
|
+
"referenceTaskName": "deploy_join_ref",
|
|
114
|
+
"status": "COMPLETED",
|
|
115
|
+
"taskType": "JOIN",
|
|
116
|
+
"startTime": 1704546031000,
|
|
117
|
+
"endTime": 1704546031500
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"taskId": "task_verify_001",
|
|
121
|
+
"referenceTaskName": "verify_ref",
|
|
122
|
+
"status": "COMPLETED",
|
|
123
|
+
"taskType": "SIMPLE",
|
|
124
|
+
"startTime": 1704546032000,
|
|
125
|
+
"endTime": 1704546045000,
|
|
126
|
+
"outputData": { "allHealthy": true, "checks": 3 }
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"taskId": "task_notify_001",
|
|
130
|
+
"referenceTaskName": "notify_ref",
|
|
131
|
+
"status": "COMPLETED",
|
|
132
|
+
"taskType": "KAFKA_PUBLISH",
|
|
133
|
+
"startTime": 1704546046000,
|
|
134
|
+
"endTime": 1704546048000,
|
|
135
|
+
"outputData": { "messageId": "msg_deploy_complete_123" }
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"workflowId": "wf_human_demo_001",
|
|
3
|
+
"status": "RUNNING",
|
|
4
|
+
"startTime": 1704546000000,
|
|
5
|
+
"input": { "requestId": "req_budget_approval", "amount": 50000, "department": "Engineering" },
|
|
6
|
+
"workflowDefinition": {
|
|
7
|
+
"name": "budget_approval_workflow",
|
|
8
|
+
"description": "HUMAN 任务演示:预算审批流,当前等待人工审批",
|
|
9
|
+
"version": 1,
|
|
10
|
+
"tasks": [
|
|
11
|
+
{
|
|
12
|
+
"name": "submit_request",
|
|
13
|
+
"taskReferenceName": "submit_ref",
|
|
14
|
+
"type": "SIMPLE",
|
|
15
|
+
"inputParameters": { "requestId": "${workflow.input.requestId}" }
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "auto_validate",
|
|
19
|
+
"taskReferenceName": "validate_ref",
|
|
20
|
+
"type": "INLINE",
|
|
21
|
+
"inputParameters": {
|
|
22
|
+
"expression": "${workflow.input.amount} <= 100000"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "manager_approval",
|
|
27
|
+
"taskReferenceName": "manager_approval_ref",
|
|
28
|
+
"type": "HUMAN",
|
|
29
|
+
"inputParameters": {
|
|
30
|
+
"assignee": "manager@example.com",
|
|
31
|
+
"taskName": "Approve Budget Request",
|
|
32
|
+
"displayName": "Budget Approval",
|
|
33
|
+
"formData": {
|
|
34
|
+
"requestId": "${workflow.input.requestId}",
|
|
35
|
+
"amount": "${workflow.input.amount}",
|
|
36
|
+
"department": "${workflow.input.department}"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "route_approval_result",
|
|
42
|
+
"taskReferenceName": "route_result_ref",
|
|
43
|
+
"type": "SWITCH",
|
|
44
|
+
"inputParameters": { "switchCaseValue": "${manager_approval_ref.output.decision}" },
|
|
45
|
+
"evaluatorType": "value-param",
|
|
46
|
+
"expression": "switchCaseValue",
|
|
47
|
+
"decisionCases": {
|
|
48
|
+
"APPROVED": [
|
|
49
|
+
{
|
|
50
|
+
"name": "process_approved_budget",
|
|
51
|
+
"taskReferenceName": "process_approved_ref",
|
|
52
|
+
"type": "HTTP",
|
|
53
|
+
"inputParameters": {
|
|
54
|
+
"uri": "https://finance-api.example.com/allocate",
|
|
55
|
+
"method": "POST"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"REJECTED": [
|
|
60
|
+
{
|
|
61
|
+
"name": "notify_rejection",
|
|
62
|
+
"taskReferenceName": "notify_rejection_ref",
|
|
63
|
+
"type": "EVENT",
|
|
64
|
+
"inputParameters": { "sink": "sqs:rejection-events" }
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"defaultCase": []
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "archive_request",
|
|
72
|
+
"taskReferenceName": "archive_ref",
|
|
73
|
+
"type": "SET_VARIABLE",
|
|
74
|
+
"inputParameters": {
|
|
75
|
+
"archived": true,
|
|
76
|
+
"archiveTime": "${workflow.endTime}"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"schemaVersion": 2
|
|
81
|
+
},
|
|
82
|
+
"tasks": [
|
|
83
|
+
{
|
|
84
|
+
"taskId": "task_submit_001",
|
|
85
|
+
"referenceTaskName": "submit_ref",
|
|
86
|
+
"status": "COMPLETED",
|
|
87
|
+
"taskType": "SIMPLE",
|
|
88
|
+
"startTime": 1704546000000,
|
|
89
|
+
"endTime": 1704546003000,
|
|
90
|
+
"inputData": { "requestId": "req_budget_approval" },
|
|
91
|
+
"outputData": { "submitted": true, "ticketId": "TKT-2024-001" }
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"taskId": "task_validate_001",
|
|
95
|
+
"referenceTaskName": "validate_ref",
|
|
96
|
+
"status": "COMPLETED",
|
|
97
|
+
"taskType": "INLINE",
|
|
98
|
+
"startTime": 1704546004000,
|
|
99
|
+
"endTime": 1704546005000,
|
|
100
|
+
"outputData": { "result": true, "validationPassed": true }
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"taskId": "task_human_approval_001",
|
|
104
|
+
"referenceTaskName": "manager_approval_ref",
|
|
105
|
+
"status": "IN_PROGRESS",
|
|
106
|
+
"taskType": "HUMAN",
|
|
107
|
+
"startTime": 1704546006000,
|
|
108
|
+
"inputData": {
|
|
109
|
+
"assignee": "manager@example.com",
|
|
110
|
+
"taskName": "Approve Budget Request",
|
|
111
|
+
"formData": {
|
|
112
|
+
"requestId": "req_budget_approval",
|
|
113
|
+
"amount": 50000,
|
|
114
|
+
"department": "Engineering"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
{
|
|
2
|
+
"workflowId": "wf_loop_demo_001",
|
|
3
|
+
"status": "COMPLETED",
|
|
4
|
+
"startTime": 1704546000000,
|
|
5
|
+
"endTime": 1704546120000,
|
|
6
|
+
"input": { "maxRetries": 3, "dataItems": ["A", "B", "C"] },
|
|
7
|
+
"output": { "processedCount": 3, "status": "All items processed" },
|
|
8
|
+
"workflowDefinition": {
|
|
9
|
+
"name": "data_processing_loop",
|
|
10
|
+
"description": "DO_WHILE 循环演示:逐项处理数据,循环 3 次",
|
|
11
|
+
"version": 1,
|
|
12
|
+
"tasks": [
|
|
13
|
+
{
|
|
14
|
+
"name": "fetch_data",
|
|
15
|
+
"taskReferenceName": "fetch_data_ref",
|
|
16
|
+
"type": "HTTP",
|
|
17
|
+
"inputParameters": {
|
|
18
|
+
"uri": "https://api.example.com/data",
|
|
19
|
+
"method": "GET"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "process_data_loop",
|
|
24
|
+
"taskReferenceName": "loop_ref",
|
|
25
|
+
"type": "DO_WHILE",
|
|
26
|
+
"loopCondition": "${loop_ref.output.iteration} < ${workflow.input.maxRetries}",
|
|
27
|
+
"loopOver": [
|
|
28
|
+
{
|
|
29
|
+
"name": "process_item",
|
|
30
|
+
"taskReferenceName": "process_item_ref",
|
|
31
|
+
"type": "SIMPLE",
|
|
32
|
+
"inputParameters": {
|
|
33
|
+
"item": "${fetch_data_ref.output.items[${loop_ref.output.iteration}]}"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "validate_item",
|
|
38
|
+
"taskReferenceName": "validate_item_ref",
|
|
39
|
+
"type": "INLINE",
|
|
40
|
+
"inputParameters": {
|
|
41
|
+
"expression": "$.processedItem !== null"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "aggregate_results",
|
|
48
|
+
"taskReferenceName": "aggregate_ref",
|
|
49
|
+
"type": "JSON_JQ_TRANSFORM",
|
|
50
|
+
"inputParameters": {
|
|
51
|
+
"queryExpression": ".items | length"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "send_completion_event",
|
|
56
|
+
"taskReferenceName": "completion_event_ref",
|
|
57
|
+
"type": "EVENT",
|
|
58
|
+
"inputParameters": {
|
|
59
|
+
"sink": "sqs:workflow-events"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"schemaVersion": 2
|
|
64
|
+
},
|
|
65
|
+
"tasks": [
|
|
66
|
+
{
|
|
67
|
+
"taskId": "task_fetch_001",
|
|
68
|
+
"referenceTaskName": "fetch_data_ref",
|
|
69
|
+
"status": "COMPLETED",
|
|
70
|
+
"taskType": "HTTP",
|
|
71
|
+
"startTime": 1704546000000,
|
|
72
|
+
"endTime": 1704546003000,
|
|
73
|
+
"inputData": { "uri": "https://api.example.com/data", "method": "GET" },
|
|
74
|
+
"outputData": { "items": ["A", "B", "C"], "count": 3 }
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"taskId": "task_loop_001",
|
|
78
|
+
"referenceTaskName": "loop_ref",
|
|
79
|
+
"status": "COMPLETED",
|
|
80
|
+
"taskType": "DO_WHILE",
|
|
81
|
+
"startTime": 1704546004000,
|
|
82
|
+
"endTime": 1704546090000
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"taskId": "task_process_item_iter1",
|
|
86
|
+
"referenceTaskName": "process_item_ref",
|
|
87
|
+
"status": "COMPLETED",
|
|
88
|
+
"taskType": "SIMPLE",
|
|
89
|
+
"iteration": 1,
|
|
90
|
+
"startTime": 1704546005000,
|
|
91
|
+
"endTime": 1704546015000,
|
|
92
|
+
"inputData": { "item": "A" },
|
|
93
|
+
"outputData": { "processedItem": "A_processed", "success": true }
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"taskId": "task_validate_item_iter1",
|
|
97
|
+
"referenceTaskName": "validate_item_ref",
|
|
98
|
+
"status": "COMPLETED",
|
|
99
|
+
"taskType": "INLINE",
|
|
100
|
+
"iteration": 1,
|
|
101
|
+
"startTime": 1704546016000,
|
|
102
|
+
"endTime": 1704546018000,
|
|
103
|
+
"inputData": { "expression": "$.processedItem !== null" },
|
|
104
|
+
"outputData": { "result": true }
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"taskId": "task_process_item_iter2",
|
|
108
|
+
"referenceTaskName": "process_item_ref",
|
|
109
|
+
"status": "COMPLETED",
|
|
110
|
+
"taskType": "SIMPLE",
|
|
111
|
+
"iteration": 2,
|
|
112
|
+
"startTime": 1704546020000,
|
|
113
|
+
"endTime": 1704546030000,
|
|
114
|
+
"inputData": { "item": "B" },
|
|
115
|
+
"outputData": { "processedItem": "B_processed", "success": true }
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"taskId": "task_validate_item_iter2",
|
|
119
|
+
"referenceTaskName": "validate_item_ref",
|
|
120
|
+
"status": "COMPLETED",
|
|
121
|
+
"taskType": "INLINE",
|
|
122
|
+
"iteration": 2,
|
|
123
|
+
"startTime": 1704546031000,
|
|
124
|
+
"endTime": 1704546033000,
|
|
125
|
+
"inputData": { "expression": "$.processedItem !== null" },
|
|
126
|
+
"outputData": { "result": true }
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"taskId": "task_process_item_iter3",
|
|
130
|
+
"referenceTaskName": "process_item_ref",
|
|
131
|
+
"status": "COMPLETED",
|
|
132
|
+
"taskType": "SIMPLE",
|
|
133
|
+
"iteration": 3,
|
|
134
|
+
"startTime": 1704546035000,
|
|
135
|
+
"endTime": 1704546055000,
|
|
136
|
+
"inputData": { "item": "C" },
|
|
137
|
+
"outputData": { "processedItem": "C_processed", "success": true }
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"taskId": "task_validate_item_iter3",
|
|
141
|
+
"referenceTaskName": "validate_item_ref",
|
|
142
|
+
"status": "COMPLETED",
|
|
143
|
+
"taskType": "INLINE",
|
|
144
|
+
"iteration": 3,
|
|
145
|
+
"startTime": 1704546056000,
|
|
146
|
+
"endTime": 1704546058000,
|
|
147
|
+
"inputData": { "expression": "$.processedItem !== null" },
|
|
148
|
+
"outputData": { "result": true }
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"taskId": "task_aggregate_001",
|
|
152
|
+
"referenceTaskName": "aggregate_ref",
|
|
153
|
+
"status": "COMPLETED",
|
|
154
|
+
"taskType": "JSON_JQ_TRANSFORM",
|
|
155
|
+
"startTime": 1704546092000,
|
|
156
|
+
"endTime": 1704546094000,
|
|
157
|
+
"outputData": { "count": 3 }
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"taskId": "task_event_001",
|
|
161
|
+
"referenceTaskName": "completion_event_ref",
|
|
162
|
+
"status": "COMPLETED",
|
|
163
|
+
"taskType": "EVENT",
|
|
164
|
+
"startTime": 1704546095000,
|
|
165
|
+
"endTime": 1704546097000,
|
|
166
|
+
"outputData": { "eventId": "evt_12345" }
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
{
|
|
2
|
+
"workflowId": "wf_mixed_status_demo_001",
|
|
3
|
+
"status": "RUNNING",
|
|
4
|
+
"startTime": 1704546000000,
|
|
5
|
+
"input": { "environment": "production", "version": "3.2.1" },
|
|
6
|
+
"workflowDefinition": {
|
|
7
|
+
"name": "cicd_pipeline_workflow",
|
|
8
|
+
"description": "混合状态演示:CI/CD 流水线,包含完成、运行中、失败和等待中的任务",
|
|
9
|
+
"version": 1,
|
|
10
|
+
"tasks": [
|
|
11
|
+
{
|
|
12
|
+
"name": "checkout_code",
|
|
13
|
+
"taskReferenceName": "checkout_ref",
|
|
14
|
+
"type": "SIMPLE",
|
|
15
|
+
"inputParameters": { "repo": "https://github.com/example/service" }
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "run_tests",
|
|
19
|
+
"taskReferenceName": "test_fork_ref",
|
|
20
|
+
"type": "FORK_JOIN",
|
|
21
|
+
"forkTasks": [
|
|
22
|
+
[
|
|
23
|
+
{
|
|
24
|
+
"name": "unit_tests",
|
|
25
|
+
"taskReferenceName": "unit_test_ref",
|
|
26
|
+
"type": "SIMPLE"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
{
|
|
31
|
+
"name": "integration_tests",
|
|
32
|
+
"taskReferenceName": "integration_test_ref",
|
|
33
|
+
"type": "HTTP",
|
|
34
|
+
"inputParameters": { "uri": "https://test-runner.internal/run" }
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
[
|
|
38
|
+
{
|
|
39
|
+
"name": "security_scan",
|
|
40
|
+
"taskReferenceName": "security_scan_ref",
|
|
41
|
+
"type": "SIMPLE"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "join_tests",
|
|
48
|
+
"taskReferenceName": "test_join_ref",
|
|
49
|
+
"type": "JOIN",
|
|
50
|
+
"joinOn": ["unit_test_ref", "integration_test_ref", "security_scan_ref"]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "build_image",
|
|
54
|
+
"taskReferenceName": "build_ref",
|
|
55
|
+
"type": "SIMPLE",
|
|
56
|
+
"inputParameters": { "version": "${workflow.input.version}" }
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "deploy_to_staging",
|
|
60
|
+
"taskReferenceName": "deploy_staging_ref",
|
|
61
|
+
"type": "HTTP",
|
|
62
|
+
"inputParameters": {
|
|
63
|
+
"uri": "https://deploy-api.internal/staging",
|
|
64
|
+
"method": "POST"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "smoke_tests",
|
|
69
|
+
"taskReferenceName": "smoke_test_ref",
|
|
70
|
+
"type": "SIMPLE"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "deploy_to_production",
|
|
74
|
+
"taskReferenceName": "deploy_prod_ref",
|
|
75
|
+
"type": "HTTP",
|
|
76
|
+
"inputParameters": {
|
|
77
|
+
"uri": "https://deploy-api.internal/production",
|
|
78
|
+
"method": "POST"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "notify_release",
|
|
83
|
+
"taskReferenceName": "release_notify_ref",
|
|
84
|
+
"type": "KAFKA_PUBLISH",
|
|
85
|
+
"inputParameters": { "topic": "releases" }
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"schemaVersion": 2
|
|
89
|
+
},
|
|
90
|
+
"tasks": [
|
|
91
|
+
{
|
|
92
|
+
"taskId": "task_checkout_001",
|
|
93
|
+
"referenceTaskName": "checkout_ref",
|
|
94
|
+
"status": "COMPLETED",
|
|
95
|
+
"taskType": "SIMPLE",
|
|
96
|
+
"startTime": 1704546000000,
|
|
97
|
+
"endTime": 1704546010000,
|
|
98
|
+
"inputData": { "repo": "https://github.com/example/service", "branch": "main" },
|
|
99
|
+
"outputData": { "commitHash": "a1b2c3d4", "filesChanged": 23 }
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"taskId": "task_fork_001",
|
|
103
|
+
"referenceTaskName": "test_fork_ref",
|
|
104
|
+
"status": "COMPLETED",
|
|
105
|
+
"taskType": "FORK",
|
|
106
|
+
"startTime": 1704546011000,
|
|
107
|
+
"endTime": 1704546011100
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"taskId": "task_unit_test_001",
|
|
111
|
+
"referenceTaskName": "unit_test_ref",
|
|
112
|
+
"status": "COMPLETED",
|
|
113
|
+
"taskType": "SIMPLE",
|
|
114
|
+
"startTime": 1704546012000,
|
|
115
|
+
"endTime": 1704546035000,
|
|
116
|
+
"outputData": { "passed": 142, "failed": 0, "coverage": "87%" }
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"taskId": "task_integration_test_001",
|
|
120
|
+
"referenceTaskName": "integration_test_ref",
|
|
121
|
+
"status": "FAILED",
|
|
122
|
+
"taskType": "HTTP",
|
|
123
|
+
"retryCount": 0,
|
|
124
|
+
"startTime": 1704546012000,
|
|
125
|
+
"endTime": 1704546045000,
|
|
126
|
+
"reasonForIncompletion": "Test suite failed: 3 integration tests failed (UserAuth, PaymentFlow, NotificationService)"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"taskId": "task_security_scan_001",
|
|
130
|
+
"referenceTaskName": "security_scan_ref",
|
|
131
|
+
"status": "COMPLETED",
|
|
132
|
+
"taskType": "SIMPLE",
|
|
133
|
+
"startTime": 1704546012000,
|
|
134
|
+
"endTime": 1704546040000,
|
|
135
|
+
"outputData": { "vulnerabilities": 0, "grade": "A" }
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"taskId": "task_test_join_001",
|
|
139
|
+
"referenceTaskName": "test_join_ref",
|
|
140
|
+
"status": "FAILED",
|
|
141
|
+
"taskType": "JOIN",
|
|
142
|
+
"startTime": 1704546046000,
|
|
143
|
+
"endTime": 1704546046500,
|
|
144
|
+
"reasonForIncompletion": "One or more parallel branches failed"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"taskId": "task_build_001",
|
|
148
|
+
"referenceTaskName": "build_ref",
|
|
149
|
+
"status": "IN_PROGRESS",
|
|
150
|
+
"taskType": "SIMPLE",
|
|
151
|
+
"startTime": 1704546047000,
|
|
152
|
+
"inputData": { "version": "3.2.1", "skipTests": true }
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
}
|