Package com.flowable.action.api.bot
Interface ContextAwareBotService
-
- All Superinterfaces:
BotService
- All Known Implementing Classes:
ScriptEvaluationBot
public interface ContextAwareBotService extends BotService
The context object aware variant of BotService.Adapts to the new
BotService.invokeBot(BotInvocationContext)
method and does not force to implement the discouragedinvokeBot(HistoricActionInstance, ActionDefinition, Map)
method. OverrideBotService.getName()
andBotService.getDescription()
if required.- Author:
- Arthur Hupka-Merle
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description BotActionResult
invokeBot(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 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 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
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 interfaceBotService
- Parameters:
context
- context objects related to the invocation- Returns:
- the result of invoking the action
-
-