Class UserManagementBot
- java.lang.Object
-
- com.flowable.platform.service.bot.UserManagementBot
-
- All Implemented Interfaces:
BotService
public class UserManagementBot extends Object implements BotService
Implements a bot managing user based action definitions.- Author:
- Micha Kiener
-
-
Field Summary
Fields Modifier and Type Field Description protected PlatformIdentityServiceplatformIdentityServiceprotected UserPermissionServiceuserPermissionService
-
Constructor Summary
Constructors Constructor Description UserManagementBot(PlatformIdentityService platformIdentityService, UserPermissionService userPermissionService)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()Returns the optional description of this bot, describing its capabilities or prerequisites.StringgetKey()Returns the key of this bot which is used to linkActionDefinitions to this bot.StringgetName()Returns the name of this bot, typically used as the label for it.BotActionResultinvokeBot(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.protected static voidverifyHasPermission(Supplier<Optional<String>> messageSupplier)
-
-
-
Field Detail
-
platformIdentityService
protected final PlatformIdentityService platformIdentityService
-
userPermissionService
protected final UserPermissionService userPermissionService
-
-
Constructor Detail
-
UserManagementBot
public UserManagementBot(PlatformIdentityService platformIdentityService, UserPermissionService userPermissionService)
-
-
Method Detail
-
getKey
public String getKey()
Description copied from interface:BotServiceReturns the key of this bot which is used to linkActionDefinitions to this bot.- Specified by:
getKeyin interfaceBotService- Returns:
- the key of this bot, which needs to be unique amongst other bots
-
getName
public String getName()
Description copied from interface:BotServiceReturns the name of this bot, typically used as the label for it.- Specified by:
getNamein interfaceBotService- Returns:
- the name of this bot
-
getDescription
public String getDescription()
Description copied from interface:BotServiceReturns the optional description of this bot, describing its capabilities or prerequisites.- Specified by:
getDescriptionin interfaceBotService- Returns:
- the optional description of this bot
-
invokeBot
public BotActionResult invokeBot(HistoricActionInstance actionInstance, ActionDefinition actionDefinition, Map<String,Object> payload)
Description copied from interface:BotServiceWhenever 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:
invokeBotin 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- Returns:
- the result of invoking the action
-
-