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
Fields Modifier and Type Field Description protected DefaultTenantProvider
defaultTenantProvider
static String
EVENT_KEY_INACTIVE_ACCOUNT
static String
EVENT_KEY_NO_ACCOUNT
static String
EVENT_KEY_NO_ACCOUNT_AND_TENANT
protected EventRegistry
eventRegistry
protected InboundMessageEventPayloadExtractor
inboundMessageEventPayloadExtractor
protected InboundMessageTenantExtractor
tenantExtractorService
-
Constructor Summary
Constructors Constructor Description EventRegistryInboundMessageAccountService(EventRegistry eventRegistry, InboundMessageTenantExtractor tenantExtractorService, DefaultTenantProvider defaultTenantProvider, InboundMessageEventPayloadExtractor inboundMessageEventPayloadExtractor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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 Detail
-
EVENT_KEY_NO_ACCOUNT_AND_TENANT
public static final String EVENT_KEY_NO_ACCOUNT_AND_TENANT
- See Also:
- Constant Field Values
-
EVENT_KEY_NO_ACCOUNT
public static final String EVENT_KEY_NO_ACCOUNT
- See Also:
- Constant Field Values
-
EVENT_KEY_INACTIVE_ACCOUNT
public static final String EVENT_KEY_INACTIVE_ACCOUNT
- See Also:
- Constant Field Values
-
eventRegistry
protected final EventRegistry eventRegistry
-
tenantExtractorService
protected final InboundMessageTenantExtractor tenantExtractorService
-
defaultTenantProvider
protected final DefaultTenantProvider defaultTenantProvider
-
inboundMessageEventPayloadExtractor
protected final InboundMessageEventPayloadExtractor inboundMessageEventPayloadExtractor
-
-
Constructor Detail
-
EventRegistryInboundMessageAccountService
public EventRegistryInboundMessageAccountService(EventRegistry eventRegistry, InboundMessageTenantExtractor tenantExtractorService, DefaultTenantProvider defaultTenantProvider, InboundMessageEventPayloadExtractor inboundMessageEventPayloadExtractor)
-
-
Method Detail
-
messageReceivedNoAccount
public void messageReceivedNoAccount(InboundMessage inboundMessage)
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
public void messageReceivedInactiveAccount(InboundMessage inboundMessage, UserAccount userAccount)
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
protected String extractTenantId(InboundMessage inboundMessage)
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
protected Collection<EventPayloadInstance> extractEventPayload(InboundMessage message)
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
-
-