Azure / Azure/durabletask

Easy way to set DataConverter for entire orchestration?

Aperta
#392 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
C#
Stelle
1.7k
Fork
335
Merge medio
2g 23h
PR unite (30g)
6

Descrizione

Hello!

I was using a custom struct as an input and return value throughout one of my orchestrations, and I spotted problems with the value transferring between the orchestrations and the tasks. I realised the struct probably wasn't playing ball with JSON.NET, so found a constructor on TaskHubClient that accepted a `DataConverter` that I could pass a `JsonDataConverter` to with custom serialization settings, and custom `JsonConverter`s - hurrah!

I was surprised that this only affected the conversion of the initial inputs to the orchestration and not the conversion between the orchestration, suborchestrations, and tasks.

I found another `DataConverter` on the `OrchestrationContext`, and another on the `TaskOrchestration` itself, and one on the `AsyncTaskActivity` class - that's quite a few, and I'm sure there are benefits to them all using their own `DataConverters`, but is there an easy way to specify a default `DataConverter` that gets used across an entire orchestration instance (and maybe all orchestration instances)? I might very well be missing an easy way to do this, I confess!

Thanks!

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia tracciando l'utilizzo di DataConverter attraverso TaskHubClient, OrchestrationContext, TaskOrchestration e AsyncTaskActivity. Determina come vengono selezionati i convertitori tra orchestrazioni, sotto-orchestrazioni e task; il lavoro è completato quando un valore predefinito definito e utilizzabile può coprire in modo coerente l'ambito di orchestrazione richiesto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
backend, distributed-systems
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.