Open krassussofficial opened 2 years ago
When i put this example together, it was also necessary to update Composer: https://github.com/EricDahlvang/BotFramework-Composer/pull/3/files
I believe this can now be accomplished with ForEachWidget in the schema: https://github.com/microsoft/BotFramework-Composer/issues/8448#issuecomment-888454224
Hi @EricDahlvang,
I'm trying to use your DoWhile custom action in Bot Frameowrk Composer 2.x. I used the three code snippets: DoWhile.cs
`
using System; using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; using AdaptiveExpressions.Properties; using Newtonsoft.Json;
namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Actions { ///
/// Executes a set of actions while an expression evaluates to true.
///
public class DoWhile : ActionScope
{
///
/// Class identifier.
///
[JsonProperty("$kind")]
public const string Kind = "Microsoft.DoWhile";
}`
Microsoft.DoWhile.schema
`{ "$schema": "https://schemas.botframework.com/schemas/component/v1.0/component.schema", "$role": "implements(Microsoft.IDialog)", "title": "Do While Loop", "description": "Execute actions while a condition is true.", "type": "object", "properties": {
} }`
DoWhileBotComponent.cs
` using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs.Adaptive.Actions;
using Microsoft.Bot.Builder.Dialogs.Declarative;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
public class DeclarativeCoreBotComponent : BotComponent
{ public override void ConfigureServices(IServiceCollection services, IConfiguration configuration) { services.AddSingleton(sp => new DeclarativeType(DoWhile.Kind));
}
}`
The schemas merged but I'm getting the following error in composer: "Deactivated action. Components of $kind "DoWhile" are not supported. Replace with a different component or create a custom component."
I'm confused about how can I fix it
Also I noticed that my DoWhile action has no space for condition parameter:
Any help will be greatly appreciated!