Class ConversationManagementBot
- java.lang.Object
-
- com.flowable.engage.engine.impl.bot.ConversationManagementBot
-
- All Implemented Interfaces:
BotService
public class ConversationManagementBot extends Object implements BotService
A service bot supporting basic conversation management functionality like joining or dropping participants, archiving, etc.- Author:
- Micha Kiener
-
-
Field Summary
Fields Modifier and Type Field Description protected ConversationPermissionService
conversationPermissionService
protected ConversationService
conversationService
protected String
digitalAssistantUserId
The user id of the digital assistant used in ticket and desk conversations, defaults to the digital assistant user, if not changed.protected PlatformIdentityService
identityService
protected MessageService
messageService
protected com.fasterxml.jackson.databind.ObjectMapper
objectMapper
protected TaskService
taskService
-
Constructor Summary
Constructors Constructor Description ConversationManagementBot(ConversationService conversationService, TaskService taskService, MessageService messageService, ConversationPermissionService conversationPermissionService, PlatformIdentityService identityService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Method Summary
-
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
-
digitalAssistantUserId
protected String digitalAssistantUserId
The user id of the digital assistant used in ticket and desk conversations, defaults to the digital assistant user, if not changed.
-
conversationService
protected final ConversationService conversationService
-
taskService
protected final TaskService taskService
-
messageService
protected final MessageService messageService
-
conversationPermissionService
protected final ConversationPermissionService conversationPermissionService
-
identityService
protected final PlatformIdentityService identityService
-
objectMapper
protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Detail
-
ConversationManagementBot
public ConversationManagementBot(ConversationService conversationService, TaskService taskService, MessageService messageService, ConversationPermissionService conversationPermissionService, PlatformIdentityService identityService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Detail
-
getKey
public String getKey()
- Specified by:
getKey
in interfaceBotService
-
getName
public String getName()
- Specified by:
getName
in interfaceBotService
-
getDescription
public String 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
protected BotActionResult archiveConversation(String conversationId)
-
validateArchiveConversationPermission
protected void validateArchiveConversationPermission(String conversationId)
-
handleCreateNewTopicAction
protected BotActionResult handleCreateNewTopicAction(String conversationId, String currentUserId, Map<String,Object> payload, String userIdForPermissionChecks)
-
handleCreateNewConversationTask
protected BotActionResult handleCreateNewConversationTask(String conversationId, String currentUserId, Map<String,Object> payload)
-
createTask
protected String createTask(String conversationId, String subject, String description, Date dueDate, String ownerId, String assigneeId)
-
getConversationName
protected String getConversationName(Conversation conversation)
-
getBooleanValueOrDefault
protected Boolean getBooleanValueOrDefault(Object value, Boolean defaultValue)
-
getDigitalAssistantUserId
public String getDigitalAssistantUserId()
-
setDigitalAssistantUserId
public void setDigitalAssistantUserId(String digitalAssistantUserId)
-
-