When using a ObjectExpression
Not Working:

Working:


@LouisEugeneMSFT can you take a look at this?
@cxbuilders , could you provide a demo of a bot project with your custom action so that we can repro the issue on our end?
In the meantime, using ValueExpression instead of ObjectExpression should unblock you.
@LouisEugeneMSFT
http://cxbuilders.com/temp/PlayGround.zip
Let me know when you have it, then I can remove it again
@cxbuilders We've reproduced the issue with ObjectExpression and I'm following up with the team to diagnose why the value isn't being parsed into the argument. I should get back to you today or tomorrow with results.
ObjectExpression is designed to deserialize a JSON object to a strongly typed class in C#. So given the example above the expectation would be that you have a Resize class defined somewhere and your property would actually be ObjectExpression<Resize>. 聽If you want to take in an object with an arbitrary shape (or you just want to use JObject) then you should use ValueExpression instead.
One trick is that just because your actions property is internally using a ValueExpression that doesn't mean your schema had to match that. You can have your schema defined as an ObjectExpression to get the correct property editor and it will still deserialize properly into a ValueExpression. @cxbuilders
@Stevenic I created the sample bot that clearly shows the problem. Not sure if you looked at that? I thought the issue was reproduced?
I see... It looks like you're using 4.11 so its possible this was a regression introduced recently as I know I've tried both approaches in the past and they both worked. 聽@GeoffCoxMSFT 聽and @LouisEugeneMSFT 聽we should move this issue to the SDK repo and assign to @boydc2014 . 聽Dong it looks like there may be a regression in the binding code for ObjectExpression. Can someone on your team take a look?
@cxbuilders
Please try adding a ObjectExpressionConverter for MyObject:
public IEnumerable<JsonConverter> GetConverters(ResourceExplorer resourceExplorer, SourceContext sourceContext)
{
yield return new ObjectExpressionConverter<MyObject>();
}
@cxbuilders have you tried Eric's approach?
@GeoffCoxMSFT do you want to take Steve's suggestion and move this to the SDK repo?
@tonyanziano as described in my initial report I have a workaround. Also I think it's clear from @Stevenic response this is a bug.
Transferred to the sdk repo and marked for triage.
I think this is by design.
Hi @boydc2014, per @Stevenic's comment, can you check if this issue a regression?
@hcyang i checked 4.10, and the behavior was the same.
@EricDahlvang I have tried adding the ObjectExpressionConverter to the MyObject class, but there is no difference, it also gets never called?
@Stevenic I am now using the valueExpression in the Custom Action, with the ObjectExpression in the schema. This works great and I can do the casting myself.
This solves my problems, so from my side it's all ok!