Open noaht8um opened 1 year ago
Hi @noaht8um:
Thanks for reaching out. I'm aware of at least 1 serialization bug related to Activity invocations, but I think this particular case is working.
For the following orchestrator code:
param($Context)
$output = @()
$InputData = [PSCustomObject]@{
Data = "Tokyo"
Documents = "Seattle"
SyncDataType = "London"
}
$output += Invoke-DurableActivity -FunctionName 'Hello' -Input $InputData
$output
And this Activity
param($name)
Write-Host $name.GetType()
Write-Host $name.Keys
Write-Host $name.Values
"Hello $name!"
I get the following trace:
[2023-09-01T21:22:36.779Z] Executing 'Functions.Hello' (Reason='(null)', Id=53f33107-7a1a-496e-9c07-e6d57d7ce782)
[2023-09-01T21:22:36.814Z] INFORMATION: System.Collections.Hashtable
[2023-09-01T21:22:36.816Z] INFORMATION: SyncDataType Documents Data
[2023-09-01T21:22:36.818Z] INFORMATION: London Seattle Tokyo
[2023-09-01T21:22:36.823Z] Executed 'Functions.Hello' (Succeeded, Id=53f33107-7a1a-496e-9c07-e6d57d7ce782, Duration=47ms)
In the trace above, I can see the keys and values of the hashmap. Is this what you're seeing on your end as well?
Related Issue: https://github.com/Azure/azure-functions-durable-extension/issues/1922
If I build up a ps object with sub-objects in an orchestration function and send that to an activity function, it ends up as a hashtable on the other side:
Maybe this is just a limitation but I want to be sure before I use workarounds. I can get it to work if I do the following:
Then in the activity function