Package com.flowable.action.api.bot
Interface ContextAwareBotService
- All Superinterfaces:
BotService
- All Known Implementing Classes:
ScriptEvaluationBot
The context object aware variant of BotService.
Adapts to the new BotService.invokeBot(BotInvocationContext)
method
and does not force to implement the discouraged invokeBot(HistoricActionInstance, ActionDefinition, Map)
method.
Override BotService.getName()
and BotService.getDescription()
if required.
- Author:
- Arthur Hupka-Merle
-
Method Summary
Modifier and TypeMethodDescriptioninvokeBot
(BotInvocationContext context) Whenever an action definition is triggered, an action instance is created and this method is invoked in order to execute the action.default BotActionResult
invokeBot
(HistoricActionInstance actionInstance, ActionDefinition actionDefinition, Map<String, Object> payload) Whenever an action definition is triggered, an action instance is created and this method is invoked in order to execute the action.Methods inherited from interface com.flowable.action.api.bot.BotService
getDescription, getKey, getName
-
Method Details
-
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 useContextAwareBotService
instead, to avoid overriding an empty method.- Specified by:
invokeBot
in interfaceBotService
- Parameters:
actionInstance
- the action instance to runactionDefinition
- the action definition where the action instance is based onpayload
- the optional payload containing the necessary information to run the action
-
invokeBot
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 interfaceBotService
- Parameters:
context
- context objects related to the invocation- Returns:
- the result of invoking the action
-