OrleansContrib / Orleans.Sagas

A distributed saga implementation for Orleans
MIT License
155 stars 28 forks source link

Getting SagaProperties added to context from activities #51

Closed ElanHasson closed 3 years ago

ElanHasson commented 3 years ago

In my activities I'm emitting state information into SagaProperties.

How can I access them after/during the saga execution?

creyke commented 3 years ago

Saga properties are available for subsequent activities via the IActivityContext for example like this.

ElanHasson commented 3 years ago

Right-- That's what I did.

context.SagaProperties doesn't seem to carry through.

I did a context.SagaProperties.Add() in Activity A and the context.SagaProperties is an empty set in activity B.

creyke commented 3 years ago

I just tested this on the .NET 5 samples (dependency injection sample) and it appears to be working.

It's worth noting that the internal existingProperties collection is the one you want to be checking...

image

ElanHasson commented 3 years ago

Let me dig deeper and see, will get back to you.

ElanHasson commented 3 years ago

I see them in the list-- My problem was the type was abstract.