Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Dapr Task Execution ID Workflow Example

Step

Prepare

  • Dapr installed
  • Redis available at localhost:6379 for the workflow state store

Build

cargo build -p examples --example workflow-taskexecutionid

Run Workflow

dapr run --app-id workflow-taskexecutionid \
         --dapr-grpc-port 50001 \
         --log-level debug \
         --resources-path ./config \
         -- cargo run --example workflow-taskexecutionid

Result

The workflow schedules the RetryN activity twice with a retry policy. Each invocation is tagged with a unique invocation_id that the workflow includes in the activity input. Because Dapr replays the same input on every retry of a given scheduled task, RetryN combines orchestration_id and invocation_id into a deterministic deduplication key that is stable across retries of one logical activity call but differs between distinct invocations. The activity fails until the final retry attempt, then completes successfully — producing two independent RetryN 1..5 sequences.