Class BpmnStartProcessInstanceBot
- java.lang.Object
-
- com.flowable.platform.service.bot.AbstractStartWorkInstanceBot
-
- com.flowable.platform.service.bot.BpmnStartProcessInstanceBot
-
- All Implemented Interfaces:
BotService
public class BpmnStartProcessInstanceBot extends AbstractStartWorkInstanceBot
An action bot starting a new process instance and passing in the provided payload. The model key is taken from the signal name of the action definition. The action instance and action definition is set as a transient variable on the process instance as well, if the process needs information like the scope of the action or anything from the action definition.- Author:
- Filip Hrisafov, Micha Kiener
-
-
Field Summary
Fields Modifier and Type Field Description protected RuntimeService
runtimeService
-
Fields inherited from class com.flowable.platform.service.bot.AbstractStartWorkInstanceBot
ACTION_DEFINITION_ID_VAR_NAME, ACTION_INSTANCE_ID_VAR_NAME, ACTION_SCOPE_ID_VAR_NAME, ACTION_SCOPE_TYPE_VAR_NAME, objectMapper
-
-
Constructor Summary
Constructors Constructor Description BpmnStartProcessInstanceBot(RuntimeService runtimeService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescription()
Returns the optional description of this bot, describing its capabilities or prerequisites.String
getKey()
Returns the key of this bot which is used to linkActionDefinition
s to this bot.String
getName()
Returns the name of this bot, typically used as the label for it.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 class com.flowable.platform.service.bot.AbstractStartWorkInstanceBot
createActionResult, createTransientVariables, getAndRemoveOutcomeFromPayload, getWorkDefinitionKey
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.flowable.action.api.bot.BotService
invokeBot
-
-
-
-
Field Detail
-
runtimeService
protected RuntimeService runtimeService
-
-
Constructor Detail
-
BpmnStartProcessInstanceBot
public BpmnStartProcessInstanceBot(RuntimeService runtimeService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Detail
-
getKey
public String getKey()
Description copied from interface:BotService
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
public String getName()
Description copied from interface:BotService
Returns the name of this bot, typically used as the label for it.- Returns:
- the name of this bot
-
getDescription
public String getDescription()
Description copied from interface:BotService
Returns the optional description of this bot, describing its capabilities or prerequisites.- Returns:
- the optional description of this bot
-
invokeBot
public 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.- 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
-
-