workflow history propagation docs#5153
Open
cicoyle wants to merge 1 commit intodapr:v1.18from
Open
Conversation
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds documentation for “workflow history propagation” and links it from existing workflow docs to explain how a parent workflow can optionally share execution history with child workflows/activities.
Changes:
- Adds a new page describing workflow history propagation concepts, scopes, usage, and security considerations.
- Links the new page from the workflow overview and features/concepts pages.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-overview.md | Adds a new “History propagation” section linking to the new doc page. |
| daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-history-propagation.md | New doc page covering propagation scopes, setup, consuming history, and cross-app/security notes. |
| daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md | Adds a short “Workflow history propagation” section and links to the detailed page. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```go | ||
| import ( | ||
| "github.com/dapr/durabletask-go/api" | ||
| "github.com/dapr/durabletask-go/task" |
Comment on lines
+21
to
+24
| | Scope | What gets sent | When to use it | | ||
| | ----- |-----------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------| | ||
| | `PropagateLineage` | Caller's own events plus the full ancestor chain inherited from the caller's own parent | Full chain-of-custody, downstream wants to see everything that happened before, all the way to the root | | ||
| | `PropagateOwnHistory` | Caller's own events only, ancestral lineage is dropped | Trust boundary — the caller is willing to vouch for what *it* did but the receiver shouldn't see further upstream | |
Comment on lines
+66
to
+74
| // The history exposes both raw events and per-app/per-instance chunks. | ||
| fmt.Printf("scope: %s, %d events from apps %v\n", | ||
| ph.Scope(), len(ph.Events()), ph.GetAppIDs()) | ||
|
|
||
| // Drill into a specific upstream workflow's activities: | ||
| merchantWf, err := ph.GetWorkflowByName("MerchantCheckout") | ||
| if err != nil { | ||
| return nil, fmt.Errorf("expected MerchantCheckout in propagated history: %w", err) | ||
| } |
Comment on lines
+70
to
+77
| // Drill into a specific upstream workflow's activities: | ||
| merchantWf, err := ph.GetWorkflowByName("MerchantCheckout") | ||
| if err != nil { | ||
| return nil, fmt.Errorf("expected MerchantCheckout in propagated history: %w", err) | ||
| } | ||
| validation, err := merchantWf.GetActivityByName("ValidateMerchant") | ||
| if err != nil { | ||
| return nil, fmt.Errorf("expected ValidateMerchant in propagated history: %w", err) |
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.
workflow history propagation docs