You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-8Lines changed: 32 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -355,7 +355,7 @@ graph TD
355
355
}
356
356
```
357
357
358
-
## CheckoutWorkflow sample
358
+
## CheckoutService sample
359
359
360
360
```mermaid
361
361
flowchart LR
@@ -366,7 +366,7 @@ A --> B
366
366
A --> C
367
367
```
368
368
369
-
The CheckoutWorkflowSample app contains workflow that processes an order. The workflow takes an `OrderItem` as input and returns a `CheckoutResult` as output. The `CheckoutWorkflow` workflow uses these activities:
369
+
The CheckoutService app contains workflow that processes an order. The workflow takes an `OrderItem` as input and returns a `CheckoutResult` as output. The `CheckoutWorkflow` workflow uses these activities:
370
370
371
371
- `NotifyActivity`: Notifies the customer of the progress of the order.
372
372
- `CheckInventoryActivity`: Checks if the inventory is sufficient.
@@ -410,12 +410,26 @@ The `InventoryController` also uses Dapr's state management building block.
410
410
411
411
### Run the PaymentService app
412
412
413
-
The CheckoutWorkflowSample app relies on the PaymentService app to process the payment. The PaymentService app is a small ASP.NET app that exposes two endpoints:
413
+
The CheckoutService app relies on the PaymentService app to process the payment. The PaymentService app is a small ASP.NET app that exposes two endpoints:
414
414
415
415
- `/pay`: processes the payment
416
416
- `/refund`: refunds the payment
417
417
418
-
This service will be started first before the CheckoutWorkflowSample app is started.
418
+
The PaymentService app uses the Dapr Configuration API to read the `isPaymentSuccess` configuration item from the configuration store (Redis). If the item key is not present, or if the item value is set to the string "true", the payment will be successful. If the item value is set to the string "false", the payment will fail. Use this setting to simulate a failed payment and check the workflow result.
419
+
420
+
Setting the configuration item is done via the redis-cli in the dapr_redis docker container:
0 commit comments