dapr / dapr/cpp-sdk

Add Compensation Workflow Pattern Example

オープン
#67 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Makefile
スター
38
フォーク
16
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず、リンクされている Java SDK の compensation example、その workflows/README.md セクション、およびリンクされている Dapr docs の pull request を確認します。次に、対応する C++ workflow example のエントリーポイントを特定し、ユーザーが compensation pattern を実行でき、その内容を理解できるようにします。完了とは、example が pattern を明確に示している状態です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp
領域
backend
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。