Custom Action is the important method to extend Bot App functionalities through C# in Bot Framework Composer for the low code bot solution. Using it, we can create complicated actions for our bots, including re-constructing turn activity results, image converting, math algorithms, adaptive responses to different channels, etc. This official article provides good sample steps to build a simple Customer Action:
However there are still several key parts should be paid attention to. The Custom Action cannot work as expected if we ignore them. Here are details:
And it is Case Sensitive.
This has been pointed out in the article. Usually developers will not miss this point.
dialog error: Type <MyCustomActionDialog> not registered in factory.
In the appsettings.json file of the bot project (located at YourBotApp\settings)to include the MyCustomActionDialog in the runtimeSettings/components array.
This is easily to be ignored because it is a sub step in the official document.
bf dialog:merge "*.schema" "!**/sdk-backup.schema" "*.uischema" "!**/sdk-backup.uischema" "!**/sdk.override.uischema" "!**/generated" "../*.csproj" "../package.json" -o $SCHEMA_FILE
bf dialog:merge "*.schema" "!**/sdk-backup.schema" "*.uischema" "!**/sdk-backup.uischema" "!**/sdk.override.uischema" "!../generated" "!../dialogs/imported" "../*.csproj" "../package.json" -o $SCHEMA_FILE
Otherwise, you will see similar errors during merging schema:
For more details of this issue, refer to:
Deactivated action. Components of $kind "Microsoft.AdaptiveDialog" are not supported
For details of the problem, refer to this github issue:
With above tips, you should be able to successfully build Custom Action for latest Bot Framework Composer Project.
Happy Bot Development!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.