Skip to content

Commit 65487c0

Browse files
committed
README.md fixes
1 parent 1c91e82 commit 65487c0

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ Instead, it must be manually restarted by using the flow's associated control-pa
463463

464464
**Control Panel:**
465465

466-
Using the flows control panel both the parameter and scrapbook may be changed before the flow is retried.
466+
Using the flow's control panel the parameter may be changed before the flow is retried.
467467

468468
For instance, assuming it is determined that the products where not shipped for a certain order, then the following code re-invokes the order with the state changed accordingly.
469469

@@ -491,21 +491,23 @@ As a result the order-flow can be implemented as follows:
491491
```csharp
492492
public async Task ProcessOrder(Order order)
493493
{
494-
Log.Logger.Information($"ORDER_PROCESSOR: Processing of order '{order.OrderId}' started");
494+
Log.Logger.Information($"ORDER_PROCESSOR: Processing of order '{order.OrderId}' started");
495+
496+
var transactionId = await Capture(Guid.NewGuid);
495497

496-
await _bus.Send(new ReserveFunds(order.OrderId, order.TotalPrice, Scrapbook.TransactionId, order.CustomerId));
498+
await _bus.Send(new ReserveFunds(order.OrderId, order.TotalPrice, transactionId, order.CustomerId));
497499
await Message<FundsReserved>();
498-
500+
499501
await _bus.Send(new ShipProducts(order.OrderId, order.CustomerId, order.ProductIds));
500502
await Message<ProductsShipped>();
501-
502-
await _bus.Send(new CaptureFunds(order.OrderId, order.CustomerId, Scrapbook.TransactionId));
503+
504+
await _bus.Send(new CaptureFunds(order.OrderId, order.CustomerId, transactionId));
503505
await Message<FundsCaptured>();
504506

505507
await _bus.Send(new SendOrderConfirmationEmail(order.OrderId, order.CustomerId));
506508
await Message<OrderConfirmationEmailSent>();
507509

508-
Log.Logger.ForContext<OrderProcessor>().Information($"Processing of order '{order.OrderId}' completed");
510+
Log.Logger.ForContext<OrderProcessor>().Information($"Processing of order '{order.OrderId}' completed");
509511
}
510512
```
511513
There is a bit more going on in the example above compared to the previous RPC-example.

0 commit comments

Comments
 (0)