Package com.flowable.engage.task
Class EngageMessageService
java.lang.Object
com.flowable.engage.task.BaseEngageService
com.flowable.engage.task.EngageMessageService
public class EngageMessageService extends BaseEngageService
A service used to support conversation messaging features within case- and process service tasks.
- Author:
- Micha Kiener
-
Field Summary
Fields Modifier and Type Field Description protected org.flowable.content.api.ContentService
contentService
protected ConversationService
conversationService
protected com.flowable.core.idm.api.PlatformIdentityService
identityService
protected MessageService
messageService
protected SendMessageExtension
sendMessageExtension
protected com.flowable.core.idm.api.UserAccountService
userAccountService
-
Constructor Summary
Constructors Constructor Description EngageMessageService(MessageService messageService, SendMessageExtension sendMessageExtension, com.flowable.core.idm.api.PlatformIdentityService identityService, ConversationService conversationService, com.flowable.core.idm.api.UserAccountService userAccountService, org.flowable.content.api.ContentService contentService)
-
Method Summary
Modifier and Type Method Description Message
sendMessage(java.lang.String conversationId, java.lang.String sendingUserId, java.lang.String receivingUserId, java.lang.String messageType, java.lang.String messageSubType, java.lang.String messageContentType, java.lang.String messageContent, java.lang.Object messageMediaContent, java.lang.String templateMessageKey, java.lang.String templateMessageCode, java.lang.String templateLanguage, java.lang.Object templatePayload, java.lang.Object tagValues, java.lang.String actionDefinitionKey, boolean stickyMessage, java.lang.String scopeId, java.lang.String scopeType)
Creates and sends a new message to an existing conversation.Methods inherited from class com.flowable.engage.task.BaseEngageService
parseParticipantIds, parseTags
-
Field Details
-
messageService
-
sendMessageExtension
-
identityService
protected final com.flowable.core.idm.api.PlatformIdentityService identityService -
conversationService
-
userAccountService
protected final com.flowable.core.idm.api.UserAccountService userAccountService -
contentService
protected final org.flowable.content.api.ContentService contentService
-
-
Constructor Details
-
EngageMessageService
public EngageMessageService(MessageService messageService, SendMessageExtension sendMessageExtension, com.flowable.core.idm.api.PlatformIdentityService identityService, ConversationService conversationService, com.flowable.core.idm.api.UserAccountService userAccountService, org.flowable.content.api.ContentService contentService)
-
-
Method Details
-
sendMessage
public Message sendMessage(java.lang.String conversationId, java.lang.String sendingUserId, java.lang.String receivingUserId, java.lang.String messageType, java.lang.String messageSubType, java.lang.String messageContentType, java.lang.String messageContent, java.lang.Object messageMediaContent, java.lang.String templateMessageKey, java.lang.String templateMessageCode, java.lang.String templateLanguage, java.lang.Object templatePayload, java.lang.Object tagValues, java.lang.String actionDefinitionKey, boolean stickyMessage, java.lang.String scopeId, java.lang.String scopeType)Creates and sends a new message to an existing conversation.- Parameters:
conversationId
- the id of the conversation to send the message tosendingUserId
- the optional id of the user sending the message, defaults to the current one, if not specifiedreceivingUserId
- the optional id of the receiving user, if empty, the message is sent to all participants of the conversation, otherwise it is sent as a private message to the recipient onlymessageType
- the optional type of the message to be sent, will beDataTypes.DEFAULT
, if not explicitly providedmessageSubType
- the optional sub type of the message to be sent, will beDataSubTypes.DEFAULT
, if not explicitly providedmessageContentType
- the optional type of the content, will beContentTypes.MD
, if not explicitly providedmessageContent
- the content of the message to be sent, will not be considered if atemplateMessageCode
is set.messageMediaContent
- the optional id of the content (or the content item itself) to be sent as a media messagetemplateMessageKey
- the optional key if a template message should be senttemplateMessageCode
- the template code, if a template message should be sent (can be null ifmessageContent
is set)templateLanguage
- the optional template language, if a template message should be senttemplatePayload
- the optional payload object (e.g. a map of key value pairs, etctagValues
- an optional, comma separated string with tag names or a collection of tag namesactionDefinitionKey
- the optional key of the action definition to be referenced within the messagestickyMessage
- true, if the message should be created as a sticky messagescopeId
- the optional id of the scoped object the message should referencescopeType
- the optional type of the scoped object the message should reference- Returns:
- the message being created and sent
-