M54: harden operations and demo resilience
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"jsCode": "const e = $json.body ?? $json;\nif (e.event_type !== 'vehicle.returned.v1') throw new Error('Unsupported event type');\nconst reasons = e.data?.attention_reasons ?? [];\nreturn [{json: {event_id: e.event_id, event_type: e.event_type, aggregate_ref: e.aggregate.public_ref, follow_up: reasons.length ? 'attention_required' : 'cleaning', summary: reasons.join('; ') || 'Create cleaning follow-up'}}];"
|
||||
"jsCode": "const e = $json.body ?? $json;\nif (e.event_type !== 'vehicle.returned.v1') throw new Error('Unsupported event type');\nconst reasons = e.data?.attention_reasons ?? [];\nreturn [{json: {event_id: e.event_id, correlation_id: e.correlation_id, event_type: e.event_type, aggregate_ref: e.aggregate.public_ref, follow_up: reasons.length ? 'attention_required' : 'cleaning', summary: reasons.join('; ') || 'Create cleaning follow-up'}}];"
|
||||
},
|
||||
"id": "validate-node",
|
||||
"name": "Validate and derive follow-up",
|
||||
@@ -52,7 +52,7 @@
|
||||
"rawContentType": "application/json",
|
||||
"body": "={{JSON.stringify($json)}}",
|
||||
"options": {
|
||||
"timeout": 15000
|
||||
"timeout": 2000
|
||||
}
|
||||
},
|
||||
"id": "callback-node",
|
||||
@@ -66,7 +66,7 @@
|
||||
}
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"maxTries": 3,
|
||||
"maxTries": 2,
|
||||
"waitBetweenTries": 1000
|
||||
},
|
||||
{
|
||||
@@ -84,7 +84,7 @@
|
||||
{ "name": "execution_id", "value": "={{ $execution.id }}" },
|
||||
{ "name": "status", "value": "succeeded" }
|
||||
]},
|
||||
"options": { "timeout": 15000 }
|
||||
"options": { "timeout": 2000 }
|
||||
},
|
||||
"id": "heartbeat-node",
|
||||
"name": "Report workflow heartbeat",
|
||||
@@ -93,7 +93,7 @@
|
||||
"position": [980, 300],
|
||||
"credentials": { "httpHeaderAuth": { "name": "Fleet Ops Service Token" } },
|
||||
"retryOnFail": true,
|
||||
"maxTries": 3,
|
||||
"maxTries": 2,
|
||||
"waitBetweenTries": 1000
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user