Skip to content

quickstart for workflows history propagation#1315

Open
cicoyle wants to merge 1 commit into
dapr:masterfrom
cicoyle:feat-wf-hist-propagation
Open

quickstart for workflows history propagation#1315
cicoyle wants to merge 1 commit into
dapr:masterfrom
cicoyle:feat-wf-hist-propagation

Conversation

@cicoyle
Copy link
Copy Markdown
Contributor

@cicoyle cicoyle commented May 20, 2026

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
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

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 on lines +3 to +4
This directory contains Go quickstart examples for the Dapr Workflows.
Each example is self-contained: it has its own `README`, `dapr.yaml`, and `makefile`.
Comment thread workflows/go/sdk/makefile
Comment on lines +5 to +13
APPS := $(patsubst %/makefile,%,$(wildcard */makefile))

.PHONY: validate all install_mm $(APPS)

validate all install_mm: $(APPS)

$(APPS):
@echo "==> $(MAKECMDGOALS) in $@"
@$(MAKE) -C $@ $(MAKECMDGOALS)
Comment on lines +1 to +8
module dapr_example_patient_intake

go 1.26.3

require (
github.com/dapr/durabletask-go v0.11.4-0.20260519200427-df9b47275282
github.com/dapr/go-sdk v1.14.1
)
Comment on lines +32 to +36

replace (
github.com/dapr/dapr => github.com/cicoyle/dapr v0.0.0-20260520192256-ce26937116c8
github.com/dapr/go-sdk => github.com/cicoyle/go-sdk v0.0.0-20260430202748-ec4a0fbd960c
)

require (
github.com/dapr/durabletask-go v0.11.4-0.20260519200427-df9b47275282
github.com/dapr/go-sdk v1.14.1
├── main.go # registry + worker setup, schedules one workflow run
├── models.go # PatientRecord, ComplianceResult, DispenseResult
├── workflow.go # workflow + activity definitions, history helpers
└── go.mod # see note above re: PR #823
Comment on lines +4 to +6
// In a real deployment the Name / DOB / MRN fields are protected health info
// and would be candidates for redaction when the record is propagated downstream
// this is a future add for history propagation.
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>
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