Class TransitionListener

java.lang.Object
com.broadleafcommerce.data.tracking.core.messaging.TransitionListener

public class TransitionListener extends Object
Listen for WorkflowTransitionRequests to come in through the various sandbox message channels (i.e., PromotionConsumer, DeploymentConsumer, RejectionConsumer, and ReversionConsumer) in order to delegate to the list of preconconfigured bean for TransitionHandlers. This will execute any TransitionHandlerCustomizer as a post construct.
Author:
Chad Harchar (charchar)
  • Field Details

  • Constructor Details

  • Method Details

    • handlePromote

      @StreamListener("promotionInput") public void handlePromote(org.springframework.messaging.Message<WorkflowPromoteRequest> request)
    • handle

      public void handle(WorkflowPromoteRequest request)
    • handleDeploy

      @StreamListener("deploymentInput") public void handleDeploy(org.springframework.messaging.Message<WorkflowDeployRequest> request)
    • handle

      public void handle(WorkflowDeployRequest request)
    • handleReject

      @StreamListener("rejectionInput") public void handleReject(org.springframework.messaging.Message<WorkflowRejectRequest> request)
    • handle

      public void handle(WorkflowRejectRequest request)
    • handleRevert

      @StreamListener("reversionInput") public void handleRevert(org.springframework.messaging.Message<WorkflowRevertRequest> request)
    • handle

      public void handle(WorkflowRevertRequest request)
    • handleRebase

      @StreamListener("rebasingInput") public void handleRebase(org.springframework.messaging.Message<WorkflowRebaseRequest> request)
    • handle

      public void handle(WorkflowRebaseRequest request)
    • checkIdempotency

      protected <T> void checkIdempotency(org.springframework.messaging.Message<T> message, String listenerName, String route, Consumer<org.springframework.messaging.Message<T>> operation)
      Consume a transition message by performing an idempotency check before executing the operation.
      Type Parameters:
      T - The payload type of the message
      Parameters:
      message - The message to check and process
      listenerName - The listener name to associate with the idempotency
      route - The route on which processing will take place
      operation - The operation to execution with the message
    • setLockService

      @Autowired public void setLockService(com.broadleafcommerce.common.messaging.service.MessageLockService lockService)