Improve lifecycle docs on Workflow, RenderContext
#356 opened on 2021/03/05
Repository metrics
- Stars
- (1,120 個のスター)
- PR merge metrics
- (平均マージ 55d 8h) (30d で 9 merged PRs)
説明
Quoth @Armaxis:
In Workflow.kt docs there’s a paragraph stating:
This context allows the workflow to interact with the outside world by doing things like listening for events, subscribing to streams of data, rendering child workflows, and performing cleanup when the workflow is about to be torn down by its parent. See the documentation on
RenderContextfor more information about what it can do. I searched around theRenderContextbut haven’t found anything about the cleanup process of workflows. Is there anywhere I can read more in-depth?
Context: I was searching for a way to cancel payment when Workflow is no longer rendered, and it took quite some time to find
LifecycleWorker. I wish Workflow would point better to it?
My first instinct was to search for
onCleared/onCanceledsomewhere in workflows -> then dig aroundRenderContext-> Cmd+F for cancel ->LifecycleWorker