Conversation
amayers
reviewed
Jul 25, 2025
| Perhaps it's a simple boolean function indicating whether or not the child actually has any work to do: | ||
|
|
||
| ```kotlin | ||
| state = if (stepTwoWorkflow.isThisNecessary()) RunStepTwo else RunStepThree |
There was a problem hiding this comment.
This only works if the stepTwoWorkflow is created and stored in the state a head of time, before you get to the apply(action) method. If your stepTwoWorkflow can't be created until you get into the apply(action) with a specific action/state, then you are out of luck.
Contributor
Author
There was a problem hiding this comment.
Typically in Kotlin child workflows are DI injected (available as constructor parameters of the parent), and actions are inner objects of the parent workflow with access to its injected dependencies.
In Swift, didn't a change just land to make the parent workflow available from the action? cc @jamieQ
The One and Done entry was bad advice, or at least incomplete. Updated to describe the Skippable Workflow pattern we've been using with a lot of success lately.
steve-the-edwards
approved these changes
Jul 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The One and Done entry was bad advice, or at least incomplete. Updated to describe the Skippable Workflow pattern we've been using with a lot of success lately.