Class EventRegistryInboundMessageAccountService
java.lang.Object
com.flowable.engage.external.system.service.EventRegistryInboundMessageAccountService
- All Implemented Interfaces:
InboundMessageAccountService
public class EventRegistryInboundMessageAccountService
extends Object
implements InboundMessageAccountService
An inbound message account service creating internal system events from inbound messages not having a mapped account or an inactive account or user so any
listeners (like a case or process instance) might picking it up and processing it.
- Author:
- Micha Kiener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DefaultTenantProvider
static final String
static final String
static final String
protected final EventRegistry
protected final InboundMessageEventPayloadExtractor
protected final InboundMessageTenantExtractor
-
Constructor Summary
ConstructorsConstructorDescriptionEventRegistryInboundMessageAccountService
(EventRegistry eventRegistry, InboundMessageTenantExtractor tenantExtractorService, DefaultTenantProvider defaultTenantProvider, InboundMessageEventPayloadExtractor inboundMessageEventPayloadExtractor) -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<EventPayloadInstance>
extractEventPayload
(InboundMessage message) Internal hook method extracting the data of the inbound message and adding them as payload to the event instance.protected Collection<EventPayloadInstance>
extractEventPayload
(InboundMessage message, UserAccount userAccount) Internal hook method extracting the data of the inbound message as well as the user account and adding them as payload to the event instance.protected String
extractTenantId
(InboundMessage inboundMessage) Internal hook method extracting the tenant id out of the given inbound message.void
messageReceivedInactiveAccount
(InboundMessage inboundMessage, UserAccount userAccount) A new inbound message has been received and the user account is no activevoid
messageReceivedNoAccount
(InboundMessage inboundMessage) A new inbound message has been received and it is not linked with an account
-
Field Details
-
EVENT_KEY_NO_ACCOUNT_AND_TENANT
- See Also:
-
EVENT_KEY_NO_ACCOUNT
- See Also:
-
EVENT_KEY_INACTIVE_ACCOUNT
- See Also:
-
eventRegistry
-
tenantExtractorService
-
defaultTenantProvider
-
inboundMessageEventPayloadExtractor
-
-
Constructor Details
-
EventRegistryInboundMessageAccountService
public EventRegistryInboundMessageAccountService(EventRegistry eventRegistry, InboundMessageTenantExtractor tenantExtractorService, DefaultTenantProvider defaultTenantProvider, InboundMessageEventPayloadExtractor inboundMessageEventPayloadExtractor)
-
-
Method Details
-
messageReceivedNoAccount
Description copied from interface:InboundMessageAccountService
A new inbound message has been received and it is not linked with an account- Specified by:
messageReceivedNoAccount
in interfaceInboundMessageAccountService
- Parameters:
inboundMessage
- the received inbound message
-
messageReceivedInactiveAccount
Description copied from interface:InboundMessageAccountService
A new inbound message has been received and the user account is no active- Specified by:
messageReceivedInactiveAccount
in interfaceInboundMessageAccountService
- Parameters:
inboundMessage
- the received inbound messageuserAccount
- the account of the user that send the message (nevernull
)
-
extractTenantId
Internal hook method extracting the tenant id out of the given inbound message. This default implementation only delegates it to theInboundMessageTenantExtractor.extractTenantId(InboundMessage)
method.- Parameters:
inboundMessage
- the inbound message to extract the tenant id from (most likely encoded within the message content or a default one)- Returns:
- the tenant id extracted out of the inbound message
-
extractEventPayload
Internal hook method extracting the data of the inbound message and adding them as payload to the event instance.- Parameters:
message
- the inbound message to turn into event payload- Returns:
- the list of event payload instances with the inbound message data
-
extractEventPayload
protected Collection<EventPayloadInstance> extractEventPayload(InboundMessage message, UserAccount userAccount) Internal hook method extracting the data of the inbound message as well as the user account and adding them as payload to the event instance.- Parameters:
message
- the inbound message to turn into event payloaduserAccount
- the user account to turn into the event payload- Returns:
- the list of event payload instances with the inbound message data and user account
-