[Sample Request] Payment workflow with idempotency, state machine, and compensation flow
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- java
调研方向
首先阅读现有的 HelloSaga 和 MoneyTransfer sample,以了解 SAGA 和 compensation 的演示方式。围绕所要求的七个状态、幂等性处理、retry backoff 以及 child-workflow compensation 定义该 sample;当一个完整统一的 payment workflow 演示出全部四种行为时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Hi, I'd like to contribute a new sample demonstrating a production-grade payment workflow pattern.
What it would cover:
- 7-state payment state machine (INITIATED → VALIDATING → PROCESSING → COMPLETED / FAILED / CANCELLED / COMPENSATING)
- Idempotency key deduplication before any state mutation
- Exponential backoff with jitter on retries
- Compensation flow as a child workflow on failure
Why it's useful:
The existing HelloSaga and MoneyTransfer samples demonstrate SAGA and basic compensation, but none show the full combination of idempotency + state machine transitions + compensation in a single cohesive example. This pattern is extremely common in fintech/payment backends.
Happy to submit a PR if this is welcome. Let me know if there's a preferred package structure or naming convention I should follow.
- 主要语言
- Java
- 星标
- 258
- 派生
- 189
- 平均合并
- 6 天 4 小时
- 30 天内合并 PR
- 4
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
temporalio/samples-java 的其他 Issue
-
bug
难度 3/5 1-2 天 新手友好度 45/100
temporalio/samples-java#749 ·
-
enhancement
难度 3/5 1-2 天 新手友好度 35/100
temporalio/samples-java#687 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 35/100
temporalio/samples-java#635 · 1 条评论 ·
-
enhancement
难度 3/5 1-2 天 新手友好度 35/100
temporalio/samples-java#606 · 4 个 reaction ·
-
enhancement
难度 3/5 1-2 天 新手友好度 48/100
temporalio/samples-java#597 ·
查看 temporalio/samples-java 的全部 Issue
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 90/100
apache/cloudstack#14222 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
-
1.0.0-alpha2 Type/Improvement
难度 2/5 1-3 小时 新手友好度 68/100
wso2/dpdp-accelerator#272 ·
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
apache/rocketmq-dashboard#4860 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
infinispan/infinispan#18150 ·