Skip to content

workflow history propagation docs#5153

Open
cicoyle wants to merge 1 commit intodapr:v1.18from
cicoyle:feature/wf-ctx-propagation
Open

workflow history propagation docs#5153
cicoyle wants to merge 1 commit intodapr:v1.18from
cicoyle:feature/wf-ctx-propagation

Conversation

@cicoyle
Copy link
Copy Markdown
Contributor

@cicoyle cicoyle commented Apr 30, 2026

workflow history propagation docs

Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
Copilot AI review requested due to automatic review settings April 30, 2026 20:09
@cicoyle cicoyle requested review from a team as code owners April 30, 2026 20:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
@cicoyle cicoyle changed the title workflow history context propagation docs workflow history propagation docs May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants