Class EventRegistryInboundMessageAccountService
java.lang.Object
com.flowable.engage.external.system.service.EventRegistryInboundMessageAccountService
- All Implemented Interfaces:
InboundMessageAccountService
public class EventRegistryInboundMessageAccountService extends java.lang.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 static org.flowable.eventregistry.model.EventPayload
BUSINESS_ACCOUNT_ID
static org.flowable.eventregistry.model.EventPayload
CONTENT
static org.flowable.eventregistry.model.EventPayload
CONTENT_TYPE
protected org.flowable.common.engine.impl.DefaultTenantProvider
defaultTenantProvider
static java.lang.String
EVENT_KEY_INACTIVE_ACCOUNT
static java.lang.String
EVENT_KEY_NO_ACCOUNT
static java.lang.String
EVENT_KEY_NO_ACCOUNT_AND_TENANT
protected org.flowable.eventregistry.api.EventRegistry
eventRegistry
static org.flowable.eventregistry.model.EventPayload
EXTERNAL_ID
static org.flowable.eventregistry.model.EventPayload
EXTERNAL_MEDIA_ID
static org.flowable.eventregistry.model.EventPayload
EXTERNAL_MEDIA_MIME_TYPE
static org.flowable.eventregistry.model.EventPayload
EXTERNAL_MEDIA_NAME
static org.flowable.eventregistry.model.EventPayload
EXTERNAL_SENDER_ID
static org.flowable.eventregistry.model.EventPayload
EXTERNAL_SENDER_NAME
static org.flowable.eventregistry.model.EventPayload
EXTERNAL_SYSTEM_ID
static org.flowable.eventregistry.model.EventPayload
MESSAGE_SUB_TYPE
static org.flowable.eventregistry.model.EventPayload
MESSAGE_TYPE
static java.lang.String
PAYLOAD_NAME_BUSINESS_ACCOUNT_ID
static java.lang.String
PAYLOAD_NAME_CONTENT
static java.lang.String
PAYLOAD_NAME_CONTENT_TYPE
static java.lang.String
PAYLOAD_NAME_EXTERNAL_ID
static java.lang.String
PAYLOAD_NAME_EXTERNAL_MEDIA_ID
static java.lang.String
PAYLOAD_NAME_EXTERNAL_MEDIA_MIME_TYPE
static java.lang.String
PAYLOAD_NAME_EXTERNAL_MEDIA_NAME
static java.lang.String
PAYLOAD_NAME_EXTERNAL_SENDER_ID
static java.lang.String
PAYLOAD_NAME_EXTERNAL_SENDER_NAME
static java.lang.String
PAYLOAD_NAME_EXTERNAL_SYSTEM_ID
static java.lang.String
PAYLOAD_NAME_MESSAGE_SUB_TYPE
static java.lang.String
PAYLOAD_NAME_MESSAGE_TYPE
static java.lang.String
PAYLOAD_NAME_REPLAY_TO_EXTERNAL_ID
static java.lang.String
PAYLOAD_NAME_USER_ACCOUNT_ID
static org.flowable.eventregistry.model.EventPayload
REPLY_TO_EXTERNAL_ID
protected InboundMessageTenantExtractor
tenantExtractorService
static org.flowable.eventregistry.model.EventPayload
USER_ACCOUNT_ID
-
Constructor Summary
Constructors Constructor Description EventRegistryInboundMessageAccountService(org.flowable.eventregistry.api.EventRegistry eventRegistry, InboundMessageTenantExtractor tenantExtractorService, org.flowable.common.engine.impl.DefaultTenantProvider defaultTenantProvider)
-
Method Summary
Modifier and Type Method Description protected java.util.List<org.flowable.eventregistry.api.runtime.EventPayloadInstance>
extractEventPayload(InboundMessage message)
Internal hook method extracting the data of the inbound message and adding them as payload to the event instance.protected java.util.List<org.flowable.eventregistry.api.runtime.EventPayloadInstance>
extractEventPayload(InboundMessage message, com.flowable.core.idm.api.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 java.lang.String
extractTenantId(InboundMessage inboundMessage)
Internal hook method extracting the tenant id out of the given inbound message.void
messageReceivedInactiveAccount(InboundMessage inboundMessage, com.flowable.core.idm.api.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
public static final java.lang.String EVENT_KEY_NO_ACCOUNT_AND_TENANT- See Also:
- Constant Field Values
-
EVENT_KEY_NO_ACCOUNT
public static final java.lang.String EVENT_KEY_NO_ACCOUNT- See Also:
- Constant Field Values
-
EVENT_KEY_INACTIVE_ACCOUNT
public static final java.lang.String EVENT_KEY_INACTIVE_ACCOUNT- See Also:
- Constant Field Values
-
PAYLOAD_NAME_EXTERNAL_SENDER_NAME
public static final java.lang.String PAYLOAD_NAME_EXTERNAL_SENDER_NAME- See Also:
- Constant Field Values
-
PAYLOAD_NAME_EXTERNAL_SENDER_ID
public static final java.lang.String PAYLOAD_NAME_EXTERNAL_SENDER_ID- See Also:
- Constant Field Values
-
PAYLOAD_NAME_EXTERNAL_SYSTEM_ID
public static final java.lang.String PAYLOAD_NAME_EXTERNAL_SYSTEM_ID- See Also:
- Constant Field Values
-
PAYLOAD_NAME_BUSINESS_ACCOUNT_ID
public static final java.lang.String PAYLOAD_NAME_BUSINESS_ACCOUNT_ID- See Also:
- Constant Field Values
-
PAYLOAD_NAME_EXTERNAL_ID
public static final java.lang.String PAYLOAD_NAME_EXTERNAL_ID- See Also:
- Constant Field Values
-
PAYLOAD_NAME_REPLAY_TO_EXTERNAL_ID
public static final java.lang.String PAYLOAD_NAME_REPLAY_TO_EXTERNAL_ID- See Also:
- Constant Field Values
-
PAYLOAD_NAME_EXTERNAL_MEDIA_ID
public static final java.lang.String PAYLOAD_NAME_EXTERNAL_MEDIA_ID- See Also:
- Constant Field Values
-
PAYLOAD_NAME_EXTERNAL_MEDIA_NAME
public static final java.lang.String PAYLOAD_NAME_EXTERNAL_MEDIA_NAME- See Also:
- Constant Field Values
-
PAYLOAD_NAME_EXTERNAL_MEDIA_MIME_TYPE
public static final java.lang.String PAYLOAD_NAME_EXTERNAL_MEDIA_MIME_TYPE- See Also:
- Constant Field Values
-
PAYLOAD_NAME_MESSAGE_TYPE
public static final java.lang.String PAYLOAD_NAME_MESSAGE_TYPE- See Also:
- Constant Field Values
-
PAYLOAD_NAME_MESSAGE_SUB_TYPE
public static final java.lang.String PAYLOAD_NAME_MESSAGE_SUB_TYPE- See Also:
- Constant Field Values
-
PAYLOAD_NAME_CONTENT
public static final java.lang.String PAYLOAD_NAME_CONTENT- See Also:
- Constant Field Values
-
PAYLOAD_NAME_CONTENT_TYPE
public static final java.lang.String PAYLOAD_NAME_CONTENT_TYPE- See Also:
- Constant Field Values
-
PAYLOAD_NAME_USER_ACCOUNT_ID
public static final java.lang.String PAYLOAD_NAME_USER_ACCOUNT_ID- See Also:
- Constant Field Values
-
EXTERNAL_SENDER_NAME
public static final org.flowable.eventregistry.model.EventPayload EXTERNAL_SENDER_NAME -
EXTERNAL_SENDER_ID
public static final org.flowable.eventregistry.model.EventPayload EXTERNAL_SENDER_ID -
EXTERNAL_SYSTEM_ID
public static final org.flowable.eventregistry.model.EventPayload EXTERNAL_SYSTEM_ID -
BUSINESS_ACCOUNT_ID
public static final org.flowable.eventregistry.model.EventPayload BUSINESS_ACCOUNT_ID -
EXTERNAL_ID
public static final org.flowable.eventregistry.model.EventPayload EXTERNAL_ID -
REPLY_TO_EXTERNAL_ID
public static final org.flowable.eventregistry.model.EventPayload REPLY_TO_EXTERNAL_ID -
EXTERNAL_MEDIA_ID
public static final org.flowable.eventregistry.model.EventPayload EXTERNAL_MEDIA_ID -
EXTERNAL_MEDIA_NAME
public static final org.flowable.eventregistry.model.EventPayload EXTERNAL_MEDIA_NAME -
EXTERNAL_MEDIA_MIME_TYPE
public static final org.flowable.eventregistry.model.EventPayload EXTERNAL_MEDIA_MIME_TYPE -
MESSAGE_TYPE
public static final org.flowable.eventregistry.model.EventPayload MESSAGE_TYPE -
MESSAGE_SUB_TYPE
public static final org.flowable.eventregistry.model.EventPayload MESSAGE_SUB_TYPE -
CONTENT
public static final org.flowable.eventregistry.model.EventPayload CONTENT -
CONTENT_TYPE
public static final org.flowable.eventregistry.model.EventPayload CONTENT_TYPE -
USER_ACCOUNT_ID
public static final org.flowable.eventregistry.model.EventPayload USER_ACCOUNT_ID -
eventRegistry
protected final org.flowable.eventregistry.api.EventRegistry eventRegistry -
tenantExtractorService
-
defaultTenantProvider
protected final org.flowable.common.engine.impl.DefaultTenantProvider defaultTenantProvider
-
-
Constructor Details
-
EventRegistryInboundMessageAccountService
public EventRegistryInboundMessageAccountService(org.flowable.eventregistry.api.EventRegistry eventRegistry, InboundMessageTenantExtractor tenantExtractorService, org.flowable.common.engine.impl.DefaultTenantProvider defaultTenantProvider)
-
-
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
public void messageReceivedInactiveAccount(InboundMessage inboundMessage, com.flowable.core.idm.api.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
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 java.util.List<org.flowable.eventregistry.api.runtime.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 java.util.List<org.flowable.eventregistry.api.runtime.EventPayloadInstance> extractEventPayload(InboundMessage message, com.flowable.core.idm.api.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
-