Package com.flowable.action.api.bot
Interface BotService
- All Known Subinterfaces:
- ContextAwareBotService
- All Known Implementing Classes:
- AbstractStartWorkInstanceBot,- BpmnCancelProcessBot,- BpmnCompletedUserTaskBot,- BpmnInjectDynamicSubProcessBot,- BpmnStartProcessInstanceBot,- BpmnTaskStartProgressBot,- BpmnTestActionBot,- CmmnCancelCaseBot,- CmmnCompletedHumanTaskBot,- CmmnReactivateCaseInstanceBot,- CmmnStartCaseInstanceBot,- CmmnStartPlanItemInstanceBot,- CmmnTaskStartProgressBot,- CmmnUserEventListenerBot,- PlatformSignalProcessBot,- ScriptEvaluationBot,- UserManagementBot
public interface BotService
Implement this bot service interface to provide an execution for action definitions based on this bot. Use the
 
ActionRepositoryService to deploy your action definitions based on this bot to make them available at runtime.
 Whenever such an action is executed, an ActionInstance is created ant this bot is invoked accordingly.- Author:
- Juan Ramos, Tijs Rademakers, Micha Kiener
- 
Method SummaryModifier and TypeMethodDescriptiondefault StringReturns the optional description of this bot, describing its capabilities or prerequisites.getKey()Returns the key of this bot which is used to linkActionDefinitions to this bot.default StringgetName()Returns the name of this bot, typically used as the label for it.default BotActionResultinvokeBot(BotInvocationContext botInvocationContext) Whenever an action definition is triggered, an action instance is created and this method is invoked in order to execute the action.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.
- 
Method Details- 
getKeyString getKey()Returns the key of this bot which is used to linkActionDefinitions to this bot.- Returns:
- the key of this bot, which needs to be unique amongst other bots
 
- 
getNameReturns the name of this bot, typically used as the label for it.- Returns:
- the name of this bot
 
- 
getDescriptionReturns the optional description of this bot, describing its capabilities or prerequisites.- Returns:
- the optional description of this bot
 
- 
invokeBotBotActionResult 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. You need to provide an action result according the execution and follow up needed.API NOTE: Prefer overriding invokeBot(BotInvocationContext)instead and leave this empty. Alternatively useContextAwareBotServiceinstead, to avoid overriding an empty method.- 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
 
- 
invokeBotWhenever 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.- Parameters:
- botInvocationContext- context objects related to the invocation
- Returns:
- the result of invoking the action
 
 
-