dapr / dapr/cpp-sdk

Add Compensation Workflow Pattern Example

Aperta
#67 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Makefile
Stelle
38
Fork
16
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Similar to this compensation workflow pattern example in the java sdk, we should have an example of how to do compensation logic in cpp.

[Here is the example code.](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/workflows/compensation)
[Here is the readme for it.](https://github.com/dapr/java-sdk/blob/master/examples/src/main/java/io/dapr/examples/workflows/README.md#compensation-pattern)
[Here are the docs for it.](https://github.com/dapr/docs/pull/4665)

We can still improve it after the fact, but we should have a clear example how users can implement this workflow pattern.

We can eventually add something like the following, but in cpp:
```
ctx.CallActivityWithCompensation(ctx,
"BookFlight", nil,
"CancelFlight", nil)
if err != nil {
// Compensate
return err
}
```

The ask for now is to simply show users how they can implement this pattern in an example.

RELEASE NOTE:
**ADD** Workflow Compensation Pattern Example

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.