-
Notifications
You must be signed in to change notification settings - Fork 1
Analyze the code, build and run the bot (NodeJS)
To build and run the service using latest version of Visual Studio Code
- Launch the latest version of Visual Studio Code.
- Open the bots/sharepointMessagingExtensionsActionBot.js file
- In the SharepointMessagingExtensionsActionBot class you'll find these following methods:
async OnSharePointTaskGetCardViewAsync(context, taskModuleRequest)
...
async OnSharePointTaskGetQuickViewAsync(context, taskModuleRequest)
...
async OnSharePointTaskGetPropertyPaneConfigurationAsync(context, taskModuleRequest)
...
async OnSharePointTaskSetPropertyPaneConfigurationAsync(context, taskModuleRequest)
Let's quickly review what those methods are and how they get used by ACEs infrastructure:
OnSharePointTaskGetCardViewAsync
This method gets called when a card view is rendered. As a card may have multiple views, each view rendering calls this method. The code in the sample generates this output:
OnSharePointTaskGetQuickViewAsync
This method gets called when a quick view is rendered. As a card may have multiple quick views, each view rendering calls this method. The code in the sample generates this output:
After doing this, you'll see your quick view render as follows:
OnSharePointTaskGetPropertyPaneConfigurationAsync
This method gets called when the dahsboard operator configures the card and opens the property pane. Developers can use this method to surface configuration options for the operator to configure a specific instance of the card.
OnSharePointTaskSetPropertyPaneConfigurationAsync
This method gets called when the dashboard operator commits the changes in the property pane.
You can find out more about this data, how it's rendered and the different card view templates at https://aka.ms/spfx or more specifically Build your first SharePoint Adaptive Card Extension | Microsoft Learn.
To run the project:
- Navigate to BotPoweredAcePreview/labs/NewBotACE/nodejs and run the below in your VS Code terminal:
npm start
- When you see the below in your terminal, your bot is ready!