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 Details

    • EVENT_KEY_NO_ACCOUNT_AND_TENANT

      public static final String EVENT_KEY_NO_ACCOUNT_AND_TENANT
      See Also:
    • EVENT_KEY_NO_ACCOUNT

      public static final String EVENT_KEY_NO_ACCOUNT
      See Also:
    • EVENT_KEY_INACTIVE_ACCOUNT

      public static final String EVENT_KEY_INACTIVE_ACCOUNT
      See Also:
    • eventRegistry

      protected final org.flowable.eventregistry.api.EventRegistry eventRegistry
    • tenantExtractorService

      protected final InboundMessageTenantExtractor tenantExtractorService
    • defaultTenantProvider

      protected final org.flowable.common.engine.impl.DefaultTenantProvider defaultTenantProvider
    • inboundMessageEventPayloadExtractor

      protected final InboundMessageEventPayloadExtractor inboundMessageEventPayloadExtractor
  • Constructor Details

    • EventRegistryInboundMessageAccountService

      public EventRegistryInboundMessageAccountService(org.flowable.eventregistry.api.EventRegistry eventRegistry, InboundMessageTenantExtractor tenantExtractorService, org.flowable.common.engine.impl.DefaultTenantProvider defaultTenantProvider, InboundMessageEventPayloadExtractor inboundMessageEventPayloadExtractor)
  • Method Details

    • 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 interface InboundMessageAccountService
      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 interface InboundMessageAccountService
      Parameters:
      inboundMessage - the received inbound message
      userAccount - the account of the user that send the message (never null)
    • 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 the InboundMessageTenantExtractor.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<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 Collection<org.flowable.eventregistry.api.runtime.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 payload
      userAccount - the user account to turn into the event payload
      Returns:
      the list of event payload instances with the inbound message data and user account