Skip to content

quickstart for workflows history propagation - #1315

Merged
alicejgibbons merged 9 commits into
dapr:release-1.18from
cicoyle:feat-wf-hist-propagation
May 28, 2026
Merged

alicejgibbons merged 9 commits into
dapr:release-1.18from
cicoyle:feat-wf-hist-propagation

Conversation

@cicoyle

@cicoyle cicoyle commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

go-sdk example: scenario is a patient intake / e-prescribing pipeline.

Before merging, I need to update the go.mod versions.

Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
@cicoyle
cicoyle requested a review from a team as a code owner May 20, 2026 20:18
Copilot AI review requested due to automatic review settings May 20, 2026 20:18
@cicoyle
cicoyle requested a review from a team as a code owner May 20, 2026 20:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR restructures the workflows/go/sdk area into a multi-example “landing page” layout and introduces a new Go workflow quickstart demonstrating workflow history propagation (patient intake / e-prescribing scenario).

Changes:

  • Replaces the single long Go SDK README with a landing page that links to multiple examples.
  • Adds a new patient-intake example that demonstrates PropagateLineage() vs PropagateOwnHistory() and downstream verification of upstream steps.
  • Updates workflows/go/sdk build/validate workflow to fan out to sub-example makefiles; adjusts order-processor supporting files accordingly.

Reviewed changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
workflows/go/sdk/README.md New landing page describing available Go workflow examples and how to run them.
workflows/go/sdk/makefile Fans make targets out to subdirectories that contain a makefile.
workflows/go/sdk/order-processor/README.md Moves the original order-processor documentation into the example folder.
workflows/go/sdk/order-processor/makefile Adds per-example makefile including shared docker.mk/validate.mk.
workflows/go/sdk/order-processor/dapr.yaml Fixes paths to match the new directory structure (resourcesPath, appDirPath).
workflows/go/sdk/patient-intake/main.go New runnable demo app that starts a worker, schedules one workflow instance, waits, and exits.
workflows/go/sdk/patient-intake/workflow.go Implements workflows/activities and history-inspection helpers for the propagation demo.
workflows/go/sdk/patient-intake/models.go Defines model types used as workflow/activity inputs/outputs.
workflows/go/sdk/patient-intake/README.md Documents the propagation scenario, scope modes, and run instructions.
workflows/go/sdk/patient-intake/go.mod Adds a new module for the example (currently using a fork via replace).
workflows/go/sdk/patient-intake/go.sum Dependency lockfile for the new example module.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread workflows/go/sdk/README.md Resolved
Comment thread workflows/go/sdk/makefile Resolved
Comment thread workflows/go/sdk/patient-intake/go.mod Resolved
Comment thread workflows/go/sdk/patient-intake/go.mod Resolved
nelson-parente added a commit to nelson-parente/quickstarts that referenced this pull request May 20, 2026
Aligns the Python workflow history propagation quickstart with the canonical
Go reference (dapr/go-sdk#823, dapr#1315) so all SDK quickstarts
share the same patient intake / e-prescribing scenario.

- Swap credit-card/fraud scenario for patient-intake/e-prescribing
- Adopt PatientIntake -> PrescribeMedication -> ComplianceAudit hierarchy
- Add is_replaying guards around all print() calls inside workflows
- Use Cassie's PascalCase activity/workflow names for cross-SDK consistency

Signed-off-by: Nelson Parente <nelson_parente@live.com.pt>
nelson-parente added a commit to nelson-parente/quickstarts that referenced this pull request May 20, 2026
Aligns the .NET workflow history propagation quickstart with the canonical
Go reference (dapr/go-sdk#823, dapr#1315) so all SDK quickstarts
share the same patient intake / e-prescribing scenario.

- Swap credit-card/fraud scenario for patient-intake/e-prescribing
- Adopt PatientIntake -> PrescribeMedication -> ComplianceAudit hierarchy
- Add IsReplaying guards around all Console.WriteLine inside workflows
- DispenseMedicationWorkflow still wraps the activity for OwnHistory
  (.NET SDK propagation is on ChildWorkflowTaskOptions only)
- Add event-level history walking in DispenseMedicationWorkflow

Signed-off-by: Nelson Parente <nelson_parente@live.com.pt>
cicoyle added 5 commits May 22, 2026 11:20
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>

@alicejgibbons alicejgibbons left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@cicoyle can we update this to the 1.18 release branch and move it to the tutorials section. The folder should be something like history-propagation: https://github.com/dapr/quickstarts/tree/master/tutorials/workflow

Even though there is no go parent folder for now this is fine, we can always add the other go sections later :)

@MyMirelHub

Copy link
Copy Markdown
Contributor

I would be keen on a negative scenario to see the pharmacy refusing to dispense because it receives missing history/lineage

@cicoyle
cicoyle changed the base branch from master to release-1.18 May 27, 2026 16:55
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
@cicoyle
cicoyle requested a review from alicejgibbons May 27, 2026 21:19

@MyMirelHub MyMirelHub left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

Signed-off-by: Cassandra Coyle <cassie@diagrid.io>

@alicejgibbons alicejgibbons left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm!!

@alicejgibbons
alicejgibbons merged commit 61f883d into dapr:release-1.18 May 28, 2026
7 checks passed
nelson-parente added a commit to nelson-parente/quickstarts that referenced this pull request May 28, 2026
Aligns the Python workflow history propagation quickstart with Cassie's
canonical Go version that merged into release-1.18
(dapr#1315, tutorials/workflow/go/history-propagation).

Changes to match the canonical structure:

- Move from workflows/python/sdk-context-propagation/order-processor/ to
  tutorials/workflow/python/history-propagation/, matching the Go sibling
  at tutorials/workflow/go/history-propagation/
- Split the monolithic app.py into app.py / workflow.py / models.py,
  mirroring main.go / workflow.go / models.go
- Add ForwardLineage flag to PatientRecord and run both scenarios
  back-to-back (happy path + negative), purging state after each so the
  app exits on its own
- Make DispenseMedication refuse to dispense when no propagated history
  is received, returning a refused DispenseResult with a Reason field
- Match the Go README: title, propagation-scope table, STEP markers,
  expected output for both scenarios
- dapr.yaml: appID=patient-app (was order-processor),
  resourcesPath=../../resources (was ../../components),
  appLogDestination/daprdLogDestination=console to match sister Python
  tutorials and Cassie's Go example
- Use correct Python SDK API names: get_last_workflow_by_name /
  get_last_activity_by_name (the earlier draft used get_workflow_by_name
  / get_activity_by_name, which were renamed in dapr/python-sdk#1025)

Signed-off-by: Nelson Parente <nelson_parente@live.com.pt>
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.

4 participants