[Workflows] Returning an entity that was added to an EF context causes the activity to retry.
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 378
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 6
Description
## In what area(s)?
/area runtime
> /area operator
> /area placement
> /area docs
> /area test-and-release
## What version of Dapr?
1.12 (.NET SDK)
## Expected Behavior
The developer should be able to return any type of entity as part of a workflow activity payload.
## Actual Behavior
When using .NET SDK to execute a workflow activity, if the payload contains an entity that was added to an Entity Framework DbContext, the activity will fail silently and then the workflow system will retry it. There is no obvious indication that the activity has failed at all other than the retry.
## Steps to Reproduce the Problem
1. Create an activity that contains a DbContext
2. Create an entity and add it to a table in the context and save
3. Return the same entity in the activity payload
4. Observe that the activity is retried a minute later
NOTE: The issue only occurs when the entity is added to the context via the `Add` method. Querying an entity and returning works as expected.
## Release Note
RELEASE NOTE:
Contributor guide
Assessment
This issue has not been assessed yet.