Class WeChatTemplateMessageBot

java.lang.Object
com.flowable.engage.external.system.wechat.WeChatTemplateMessageBot
All Implemented Interfaces:
com.flowable.action.api.bot.BotService

public class WeChatTemplateMessageBot
extends java.lang.Object
implements com.flowable.action.api.bot.BotService
An action bot handling the action definition to send a WeChat template message based on a template handled by the template engine.
Author:
Micha Kiener
  • Field Details

  • Constructor Details

  • Method Details

    • getKey

      public java.lang.String getKey()
      Specified by:
      getKey in interface com.flowable.action.api.bot.BotService
    • getName

      public java.lang.String getName()
      Specified by:
      getName in interface com.flowable.action.api.bot.BotService
    • getDescription

      public java.lang.String getDescription()
      Specified by:
      getDescription in interface com.flowable.action.api.bot.BotService
    • invokeBot

      public com.flowable.action.api.bot.BotActionResult invokeBot​(com.flowable.action.api.history.HistoricActionInstance actionInstance, com.flowable.action.api.repository.ActionDefinition actionDefinition, java.util.Map<java.lang.String,​java.lang.Object> payload)
      Specified by:
      invokeBot in interface com.flowable.action.api.bot.BotService
    • extractTemplateParameters

      protected java.util.Map<java.lang.String,​java.lang.String> extractTemplateParameters​(java.util.List<com.flowable.template.api.repository.TemplateParameter> templateParameters, java.util.Map<java.lang.String,​java.lang.Object> payload)
      Extract all the template parameters from the payload.
      Parameters:
      templateParameters -
      payload -
      Returns:
      a map of the extracted parameters
    • checkTemplateParametersSize

      protected void checkTemplateParametersSize​(java.util.Map<java.lang.String,​java.lang.String> templateParameters)
      Check if the total size of all the template parameters do not exceed the maximum allowed size which is given by WeChat.
      Parameters:
      templateParameters -