Interface ContextAwareBotService

    • Method Detail

      • invokeBot

        default BotActionResult invokeBot​(HistoricActionInstance actionInstance,
                                          ActionDefinition actionDefinition,
                                          Map<String,​Object> payload)
        Description copied from interface: BotService
        Whenever an action definition is triggered, an action instance is created and this method is invoked in order to execute the action. You need to provide an action result according the execution and follow up needed.

        API NOTE: Prefer overriding BotService.invokeBot(BotInvocationContext) instead and leave this empty. Alternatively use ContextAwareBotService instead, to avoid overriding an empty method.

        Specified by:
        invokeBot in interface BotService
        Parameters:
        actionInstance - the action instance to run
        actionDefinition - the action definition where the action instance is based on
        payload - the optional payload containing the necessary information to run the action
      • invokeBot

        BotActionResult invokeBot​(BotInvocationContext context)
        Description copied from interface: BotService
        Whenever an action definition is triggered, an action instance is created and this method is invoked in order to execute the action. You need to provide an action result according the execution and follow up needed.
        Specified by:
        invokeBot in interface BotService
        Parameters:
        context - context objects related to the invocation
        Returns:
        the result of invoking the action