@@ -5,15 +5,21 @@ This solution demonstrates all five Catalyst APIs through a comprehensive order
55## Services Overview
66
77** Core Services:**
8+ <<<<<<< HEAD
89
10+ =======
11+ >>>>>>> 8b5c2f858ff4bcbd9abf90c471bda26d22e72658
912- ** order-processor** : Main workflow engine with approval handling and circuit breaker patterns
1013- ** inventory** : Inventory management using Catalyst State API
1114- ** payments** : Payment processing with failure simulation
1215- ** shipping** : Shipping coordination service
1316- ** notifications** : React UI for real-time workflow monitoring
1417
1518** Advanced Workflow Services:**
19+ <<<<<<< HEAD
1620
21+ =======
22+ >>>>>>> 8b5c2f858ff4bcbd9abf90c471bda26d22e72658
1723- ** batch-processor** : Bulk order processing with parent-child workflows
1824- ** returns** : Return processing with workflow chaining and external events
1925- ** chaos-engineer** : Failure simulation and resilience testing for dashboard debugging
@@ -46,6 +52,7 @@ diagrid dev run -f dapr.yaml --project $WORKFLOW_PROJECT_NAME
4652```
4753
4854## Core Workflows
55+ <<<<<<< HEAD
4956
5057### 1. Basic Order Processing
5158
@@ -180,3 +187,123 @@ States: `closed` (healthy) → `open` (failing) → `half-open` (testing recover
1801875 . ** Advanced Debugging** : Use ` advanced-chaos-demo.http ` for complex failure scenarios
181188
182189** Live Monitoring** : Keep ` http://localhost:8080 ` open during demos for real-time notifications.
190+ =======
191+
192+ ### 1. Basic Order Processing
193+ - Standard order workflow with inventory, payment, and shipping
194+ - Approval workflow for high-value orders (>$1000)
195+ - Circuit breaker patterns for service resilience
196+
197+ ### 2. Bulk Order Processing (Parent-Child Workflows)
198+ - ** Parent Workflow** : Orchestrates multiple items in a single order
199+ - ** Child Workflows** : Each item processed independently with parallel execution
200+ - ** Approval Integration** : High-value items require individual approval
201+ - ** Failure Isolation** : Partial failures don't affect other items
202+
203+ ** Example Usage:**
204+ ``` json
205+ POST http://localhost:3007/bulk-orders
206+ {
207+ "customer" : " alice" ,
208+ "items" : [
209+ {"item" : " apple" , "quantity" : 2 , "price" : 50.0 },
210+ {"item" : " orange" , "quantity" : 1 , "price" : 75.0 }
211+ ]
212+ }
213+ ```
214+
215+ ### 3. Return Processing (Workflow Chaining)
216+ - ** Workflow Chaining** : Returns reference and validate against original orders
217+ - ** Dynamic Child Workflows** : Different processing paths by return type:
218+ - ** Defective** : Full refund, no restocking (disposal)
219+ - ** Standard** : Sequential refund then inventory restocking
220+ - ** Expedited** : Parallel refund and restocking for speed
221+ - ** External Events** : Manager approval for high-value returns (>$500)
222+
223+ ** Example Usage:**
224+ ``` json
225+ POST http://localhost:3008/returns
226+ {
227+ "original_order_id" : " order_john_abc123" ,
228+ "customer" : " john" ,
229+ "item" : " apple" ,
230+ "reason" : " defective" ,
231+ "return_value" : 75.0
232+ }
233+ ```
234+
235+ ### 4. Chaos Engineering & Failure Simulation
236+ - ** Comprehensive Failure Types** : Timeouts, network errors, database failures, memory issues
237+ - ** Advanced Workflow Failures** : External event starvation, zombie child workflows, activity limbo
238+ - ** Circuit Breaker Testing** : Real-time monitoring of service resilience
239+ - ** Dashboard Integration** : Rich diagnostic events for monitoring systems
240+
241+ ## Testing & Demo Files
242+
243+ ### Manual Testing (VS Code REST Client)
244+ - ** ` test-commands.http ` ** : Basic workflow testing (orders, approvals, status checks)
245+ - ** ` bulk-demo.http ` ** : Bulk order processing demonstration (5-10 minutes)
246+ - ** ` return-demo.http ` ** : Return workflow testing (8-12 minutes)
247+ - ** ` chaos-demo.http ` ** : Basic chaos engineering patterns (10-15 minutes)
248+ - ** ` advanced-chaos-demo.http ` ** : Advanced workflow failures (15-20 minutes)
249+
250+ ### Automated Testing (Bash Scripts)
251+ - ** ` run-chaos-demo.sh ` ** : Basic chaos patterns (8-12 minutes)
252+ - ** ` run-advanced-chaos-demo.sh ` ** : Multi-service failures (8-12 minutes)
253+ - ** ` run-advanced-workflow-chaos-demo.sh ` ** : Advanced workflow debugging (15-20 minutes)
254+
255+ ## Key Features
256+
257+ ### Enhanced Activity Naming
258+ All workflows use descriptive activity names for clear dashboard visualization:
259+
260+ ** Bulk Processing:**
261+ - ` announce_bulk_order_started ` → ` announce_child_workflow_spawned ` → ` announce_waiting_for_children `
262+ - ` announce_item_success ` / ` announce_item_failure ` → ` announce_bulk_order_completed `
263+
264+ ** Returns Processing:**
265+ - ` announce_return_request_received ` → ` announce_return_validation_started ` → ` announce_return_approval_required `
266+ - ` announce_defective_return_started ` / ` announce_standard_refund_processing ` / ` announce_expedited_parallel_processing `
267+
268+ ** Chaos Engineering:**
269+ - ` announce_failure_injection_started ` → ` execute_retry_policy_test ` → ` execute_circuit_breaker_test `
270+ - ` announce_external_event_starvation_started ` → ` announce_child_workflow_zombie_detected `
271+
272+ ### Circuit Breaker Monitoring
273+ Real-time circuit breaker status available at:
274+ ``` http
275+ GET http://localhost:3006/circuit-breakers
276+ ```
277+
278+ States: ` closed ` (healthy) → ` open ` (failing) → ` half-open ` (testing recovery)
279+
280+ ### Dashboard Integration
281+ - ** Correlation IDs** : End-to-end workflow tracing
282+ - ** Severity Levels** : INFO, WARNING, ERROR, CRITICAL
283+ - ** Rich Context** : Execution times, retry counts, failure details
284+ - ** Real-time Updates** : Live notifications via pub/sub
285+
286+ ## Advanced Scenarios
287+
288+ ### Chaos Engineering Failure Types
289+ - ** Basic** : Timeouts, network errors, service unavailability
290+ - ** Advanced** : External event starvation, zombie child workflows, activity execution limbo, distributed transaction failures
291+ - ** Recovery** : Manual intervention simulation and automated recovery procedures
292+
293+ ### Monitoring Endpoints
294+ - ` /chaos/events ` - Diagnostic events for dashboards
295+ - ` /chaos/advanced-failures ` - Advanced failure states
296+ - ` /chaos/zombie-workflows ` - Zombie workflow detection
297+ - ` /chaos/missed-events ` - External event tracking
298+
299+ ## Quick Start
300+
301+ 1 . ** Basic Order** : Use ` test-commands.http ` for simple workflow testing
302+ 2 . ** Bulk Orders** : Use ` bulk-demo.http ` for parent-child workflow patterns
303+ 3 . ** Returns** : Use ` return-demo.http ` for workflow chaining examples
304+ 4 . ** Chaos Testing** : Use ` chaos-demo.http ` for resilience validation
305+ 5 . ** Advanced Debugging** : Use ` advanced-chaos-demo.http ` for complex failure scenarios
306+
307+ ** Live Monitoring** : Keep ` http://localhost:8080 ` open during demos for real-time notifications.
308+
309+ >>>>>>> 8b5c2f858ff4bcbd9abf90c471bda26d22e72658
0 commit comments