Package com.flowable.action.api.bot
Interface BotService
- All Known Implementing Classes:
BpmnCancelProcessBot
,BpmnCompletedUserTaskBot
,BpmnInjectDynamicSubProcessBot
,BpmnStartProcessInstanceBot
,BpmnTestActionBot
,CmmnCancelCaseBot
,CmmnCompletedHumanTaskBot
,CmmnStartCaseInstanceBot
,CmmnStartPlanItemInstanceBot
,CmmnUserEventListenerBot
,PlatformSignalProcessBot
,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 Summary
Modifier and Type Method Description java.lang.String
getDescription()
Returns the optional description of this bot, describing its capabilities or prerequisites.java.lang.String
getKey()
Returns the key of this bot which is used to linkActionDefinition
s to this bot.java.lang.String
getName()
Returns the name of this bot, typically used as the label for it.BotActionResult
invokeBot(HistoricActionInstance actionInstance, ActionDefinition actionDefinition, java.util.Map<java.lang.String,java.lang.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
-
getKey
java.lang.String getKey()Returns the key of this bot which is used to linkActionDefinition
s to this bot.- Returns:
- the key of this bot, which needs to be unique amongst other bots
-
getName
java.lang.String getName()Returns the name of this bot, typically used as the label for it.- Returns:
- the name of this bot
-
getDescription
java.lang.String getDescription()Returns the optional description of this bot, describing its capabilities or prerequisites.- Returns:
- the optional description of this bot
-
invokeBot
BotActionResult invokeBot(HistoricActionInstance actionInstance, ActionDefinition actionDefinition, java.util.Map<java.lang.String,java.lang.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.- 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- Returns:
- the result of invoking the action
-