Class ScriptEvaluationBot
- java.lang.Object
-
- com.flowable.platform.service.bot.ScriptEvaluationBot
-
- All Implemented Interfaces:
BotService
,ContextAwareBotService
public class ScriptEvaluationBot extends Object implements ContextAwareBotService
-
-
Field Summary
Fields Modifier and Type Field Description protected com.fasterxml.jackson.databind.ObjectMapper
objectMapper
protected PlatformEngineConfiguration
platformEngineConfiguration
-
Constructor Summary
Constructors Constructor Description ScriptEvaluationBot(com.fasterxml.jackson.databind.ObjectMapper objectMapper, PlatformEngineConfiguration platformEngineConfiguration)
-
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(BotInvocationContext context)
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.flowable.action.api.bot.ContextAwareBotService
invokeBot
-
-
-
-
Field Detail
-
platformEngineConfiguration
protected PlatformEngineConfiguration platformEngineConfiguration
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Detail
-
ScriptEvaluationBot
public ScriptEvaluationBot(com.fasterxml.jackson.databind.ObjectMapper objectMapper, PlatformEngineConfiguration platformEngineConfiguration)
-
-
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.- Specified by:
getKey
in interfaceBotService
- 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.- Specified by:
getName
in interfaceBotService
- 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.- Specified by:
getDescription
in interfaceBotService
- Returns:
- the optional description of this bot
-
invokeBot
public 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
- Specified by:
invokeBot
in interfaceContextAwareBotService
- Parameters:
context
- context objects related to the invocation- Returns:
- the result of invoking the action
-
-