Class ConversationManagementBot
java.lang.Object
com.flowable.engage.engine.impl.bot.ConversationManagementBot
- All Implemented Interfaces:
BotService
A service bot supporting basic conversation management functionality like joining or dropping participants, archiving, etc.
- Author:
- Micha Kiener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ConversationPermissionService
protected final ConversationService
protected String
The user id of the digital assistant used in ticket and desk conversations, defaults to the digital assistant user, if not changed.protected final PlatformIdentityService
protected final MessageService
protected final com.fasterxml.jackson.databind.ObjectMapper
protected final TaskService
-
Constructor Summary
ConstructorsConstructorDescriptionConversationManagementBot
(ConversationService conversationService, TaskService taskService, MessageService messageService, ConversationPermissionService conversationPermissionService, PlatformIdentityService identityService, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected BotActionResult
addParticipantsToConversation
(Collection<String> participantIds, String conversationId, Map<String, Object> payload) protected BotActionResult
archiveConversation
(String conversationId) protected String
createTask
(String conversationId, String subject, String description, Date dueDate, String ownerId, String assigneeId) protected Boolean
getBooleanValueOrDefault
(Object value, Boolean defaultValue) protected Boolean
getBooleanValueOrNull
(Object value) protected String
getConversationName
(Conversation conversation) protected Integer
getIntegerValueOrNull
(Object value) getKey()
getName()
protected String
getStringValueOrNull
(Object value) getUserName
(String userId, String tenantId) protected BotActionResult
handleCreateNewConversationTask
(String conversationId, String currentUserId, Map<String, Object> payload) protected BotActionResult
handleCreateNewTopicAction
(String conversationId, String currentUserId, Map<String, Object> payload, String userIdForPermissionChecks) invokeBot
(HistoricActionInstance actionInstance, ActionDefinition actionDefinition, Map<String, Object> payload) protected BotActionResult
removeParticipantsFromConversation
(Collection<String> participantIds, String conversationId) void
setDigitalAssistantUserId
(String digitalAssistantUserId) protected void
validateAddParticipantsPermission
(Collection<String> participantIds, String conversationId) protected void
validateArchiveConversationPermission
(String conversationId) protected void
validateDropParticipantsPermission
(Collection<String> participantIds, String conversationId) 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 Details
-
digitalAssistantUserId
The user id of the digital assistant used in ticket and desk conversations, defaults to the digital assistant user, if not changed. -
conversationService
-
taskService
-
messageService
-
conversationPermissionService
-
identityService
-
objectMapper
protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Details
-
ConversationManagementBot
public ConversationManagementBot(ConversationService conversationService, TaskService taskService, MessageService messageService, ConversationPermissionService conversationPermissionService, PlatformIdentityService identityService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
getKey
- Specified by:
getKey
in interfaceBotService
-
getName
- Specified by:
getName
in interfaceBotService
-
getDescription
- Specified by:
getDescription
in interfaceBotService
-
invokeBot
public BotActionResult invokeBot(HistoricActionInstance actionInstance, ActionDefinition actionDefinition, Map<String, Object> payload) - Specified by:
invokeBot
in interfaceBotService
-
addParticipantsToConversation
protected BotActionResult addParticipantsToConversation(Collection<String> participantIds, String conversationId, Map<String, Object> payload) -
validateAddParticipantsPermission
protected void validateAddParticipantsPermission(Collection<String> participantIds, String conversationId) -
removeParticipantsFromConversation
protected BotActionResult removeParticipantsFromConversation(Collection<String> participantIds, String conversationId) -
validateDropParticipantsPermission
protected void validateDropParticipantsPermission(Collection<String> participantIds, String conversationId) -
archiveConversation
-
validateArchiveConversationPermission
-
handleCreateNewTopicAction
-
handleCreateNewConversationTask
-
createTask
-
getConversationName
-
getStringValueOrNull
-
getBooleanValueOrNull
-
getBooleanValueOrDefault
-
getIntegerValueOrNull
-
getUserName
-
getDigitalAssistantUserId
-
setDigitalAssistantUserId
-