Botframework-composer: Docs: Schemas folder missing for adding custom actions

Created on 6 Jun 2020  路  6Comments  路  Source: microsoft/BotFramework-Composer

Describe the bug

The documentation on Custom Actions says in step 5:

Navigate to to the Schemas (bot/runtime/azurewebapp/Schemas) folder and then run the command update.sh.

You will see that the partial schema (MultiplyDialog.schema inside customaction/Schemas) has been appended to the default sdk.schema file to generate one single consolidated sdk.schema file.

Copy the newly generated sdk.schema into the schemas (bot/schemas) folder at the root of the ejected runtime.

In version v1.0.1 of the Bot Framework Composer, after ejecting the runtime, the Schemas folder is missing in both:

  • bot/runtime/azurewebapp
  • bot/runtime/azurefunctions

It appears the schema files & corresponding scripts have moved to:

  • bot/schemas

Version


image

Browser

  • [x] Electron distribution
  • [ ] Chrome
  • [ ] Safari
  • [ ] Firefox
  • [ ] Edge

OS

  • [ ] macOS
  • [x] Windows
  • [ ] Ubuntu

To Reproduce

Steps to reproduce the behavior:

  1. Eject the runtime as described here.
  2. When trying to update the Schema files, you will find the mentioned Schemas folder is not present in both azurewebapp or azurefunctions.

Expected behavior

The documentation should be updated to reflect the functioning of the new scripts path, and the sdk.schema does not need to be copied anymore:

  • Navigate to to the schemas (bot/schemas) folder. This folder contains a Powershell script and a bash script. Run either of these scripts ./update-schema.ps1 -runtime azurewebapp or sh ./update-schema.sh -runtime azurewebapp. To use the Azure Functions runtime, run the script with -runtime azurefunctions. The runtime azurewebapp is chosen by default if no argument is passed.

  • Validate that the partial schema (MultiplyDialog.schema inside customaction/Schema) has been appended to the default sdk.schema file to generate one single consolidated sdk.schema file.

The above steps should have generated a new sdk.schema file inside schemas folder for Composer to use. Reload the bot and you should be able to include your new custom action!

Screenshots

Ejected runtime generated on v1.0.0:

image

Ejected runtime on v1.0.1:

image

image

Additional context

  • An additional remark on this related docs page:
    When testing in the Bot Framework Emulator, Composer will always use the azurewebapp runtime, even if afterward you deploy to Azure Functions. It means that during development you will need to make the changes to the .csproj and startup.cs files in both the azurewebapp and azurefunctions folders.
Documentation custom action

Most helpful comment

@bartbilliet it was moved to the botfolder/schemas folder. For now, you can just run updateSchema command under the schemas folder, you don't need to do an extra copy from runtime/schemas to schemas folder right now.

@zxyanliu please help update the doc based on the above.

All 6 comments

@bartbilliet I just reproduced this issue. Thanks for reporting.
@luhan2017 Please let me know if there anything I should update in the doc.

@bartbilliet it was moved to the botfolder/schemas folder. For now, you can just run updateSchema command under the schemas folder, you don't need to do an extra copy from runtime/schemas to schemas folder right now.

@zxyanliu please help update the doc based on the above.

Hi @bartbilliet, here is a working PR to address this issue. Please also be noted that you might need to restart your electron to see the custom action enabled in Composer UI when testing it. I also added a Note box in the PR for this known issue. The content will go live soon.

Thanks!

@zxyanliu I believe the composer-docs-pr repo might be private, as I'm unable to follow the PR link. Anyway, I'll see when the content goes live then. Thanks for the updates! :-)

Hey @bartbilliet thanks again for reporting this issue. The content has been updated and will go live soon.
Thanks for helping me with this @luhan2017 @srinaath.

Hey @bartbilliet the content has been updated and is live now. Thanks again for your feedback, we appreciate it! : -)

Was this page helpful?
0 / 5 - 0 ratings