Search code examples
node.jstypescriptbotframeworkbot-framework-composer

Custom Action for Composer 2.0 bot not executing


I'm attempting to implement the MultiplyDialog example using the Node Runtime as a demo for future custom actions.

Code related to this question can be found here: https://github.com/alexstojda/adaptive-dialogs-custom-action

The problem: The dialog never executes (MultiplyDialog.beginDialog(...) is never called)

I followed these instructions to setup the custom action, making relevant adjustments for use in node where applicable, notably:

  1. Installing the MultiplyDialog package using npm install ../multiply_dialog_package from within empty_bot
  2. Updating empty_bot/settings/appsettings.json to include the component:
  "runtimeSettings": {
    ...
    "components": [
      {
        "name": "multiply-dialog-package" 
      }
    ],
  }

The bot starts with no errors, and the component's configureServices is called, but when the Dialog is called, there is no log output in the console, and dialog.result remains undefined in the next step of the action.

Any advice or help would be much appreciated :)


Solution

  • Solution provided by @joshgummersall via GitHub

    Hey @alexstojda,

    I tend to use yarn workspaces for development work. It's a more reliable way of linking together local packages for development. In this case, that was all I needed to do to get the multiply dialog working locally using the Bot Framework Emulator. To test this out:

    $ cd path/to/repo 
    $ git pull 
    $ npm install -g yarn 
    $ yarn 
    $ yarn dev I
    

    Tested this inside a Vagrant VM to ensure I had a clean system.