elsa-core/test/unit/Elsa.Workflows.Runtime.UnitTests/LogPersistence
Sipke Schoorstra d4c00f13ed
fix(runtime): read InternalState from logPersistenceConfig (#8126)
* fix(runtime): read InternalState from logPersistenceConfig

Honor Studio-written customProperties.logPersistenceConfig.internalState
and fall back to workflow internalState, then default/ResolveMode.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* test(runtime): register activity context in InternalState evaluator tests

ActivityTestFixture.BuildAsync does not add the context to
WorkflowExecutionContext.ActivityExecutionContexts, which
GetPersistenceDefaultsAsync requires.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* fix(runtime): evaluate workflow InternalState with root context

Use the workflow/root ExpressionExecutionContext for workflow-level
internalState (parity with default), and keep the activity context
for the activity override. Look up component records by activity name.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-09-13 23:09:36 +02:00
..
ActivityPropertyLogPersistenceEvaluatorTests.cs fix(runtime): read InternalState from logPersistenceConfig (#8126) 2026-09-13 23:09:36 +02:00