-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Labels
Description
As part of an orchestration, I have an activity to store some metadata to a database before awaiting an external event.
The activity is defined like this:
[DurableTask("CreateAwaitedEvent")]
public class CreateAwaitedEventActivity : TaskActivity<CreateAwaitedEventActivityInput, Guid>
{
public CreateAwaitedEventActivity(AppDbContext dbContext) { ... }
public override async Task<Guid> RunAsync(TaskActivityContext context, CreateAwaitedEventActivityInput input) { ... }
}
public record CreateAwaitedEventActivityInput(EventType EventType, string OrchestratorId, Dictionary<string, object> Properties);
The activity is called from the orchestrator:
var eventId = await context.CallCreateAwaitedEventAsync(new CreateAwaitedEventActivityInput(EventType.ConfirmDeploymentPlan, context.InstanceId, new Dictionary<string, object>()
{
{"ComponentContext", input},
{"PlanResult", planResult}
}));
Inside of the activity, the objects added to the dictionary has changed from it's original type to JsonElements, as shown in the following picture:
Is this a bug or expected behavior?
Is the behavior documented anywhere?
Can it be prevented?
The problem might be related to issue #36 which was marked solved back in 2022.