Class DefaultWorkflowGenerationService

java.lang.Object
com.broadleafcommerce.orderoperation.service.generate.workflow.DefaultWorkflowGenerationService
All Implemented Interfaces:
WorkflowGenerationService

public class DefaultWorkflowGenerationService extends Object implements WorkflowGenerationService
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultWorkflowGenerationService(com.broadleafcommerce.orchestration.service.provider.external.WorkflowProvider externalWorkflowProvider, WorkflowGenerationProperties workflowGenerationProperties)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Configures the antPathMatcher to be case-insensitive.
    protected String
    determineBasicWorkflowName(com.broadleafcommerce.order.client.domain.Order order, com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment)
    Determines the workflow name from Order & OrderFulfillment data.
    protected String
    determineWorkflowName(com.broadleafcommerce.order.client.domain.Order order, com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment)
    Map the value harvested from OrderFulfillment.getAttributes() for the targeted workflow to a real workflow name.
    protected Map<String,String>
    gatherAdditionalWorkflowParameters(com.broadleafcommerce.order.client.domain.Order order, com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
     
    void
    generateWorkflow(@NonNull GenerateWorkflowRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Call the remote WorkflowService and request a new workflow be started to complete the fulfillment.
    protected String
    getApplicationId(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
     
    protected String
    getTenantId(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultWorkflowGenerationService

      public DefaultWorkflowGenerationService(com.broadleafcommerce.orchestration.service.provider.external.WorkflowProvider externalWorkflowProvider, WorkflowGenerationProperties workflowGenerationProperties)
  • Method Details

    • generateWorkflow

      public void generateWorkflow(@NonNull @NonNull GenerateWorkflowRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: WorkflowGenerationService
      Call the remote WorkflowService and request a new workflow be started to complete the fulfillment.
      Specified by:
      generateWorkflow in interface WorkflowGenerationService
      Parameters:
      request - The request to generate a workflow.
      contextInfo - Data tracking context information
    • configureAntPathMatcher

      protected void configureAntPathMatcher()
      Configures the antPathMatcher to be case-insensitive.
    • determineWorkflowName

      protected String determineWorkflowName(com.broadleafcommerce.order.client.domain.Order order, com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment)
      Map the value harvested from OrderFulfillment.getAttributes() for the targeted workflow to a real workflow name. Refer to WorkflowGenerationProperties for more details on the backing configuration for the mapping, as well as the details around ant pattern matching for wildcards. Subclasses may override for custom mapping behavior.
      Parameters:
      order - The parent order being inspected
      fulfillment - The specific fulfillment order being inspected
      Returns:
      The name of the workflow to launch in WorkflowServices
    • determineBasicWorkflowName

      @Nullable protected String determineBasicWorkflowName(com.broadleafcommerce.order.client.domain.Order order, com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment)
      Determines the workflow name from Order & OrderFulfillment data. The value returned here may be used as-is or mapped to another workflow name leveraging WorkflowGenerationProperties.
      Parameters:
      order - The parent order being inspected
      fulfillment - The specific fulfillment order being inspected
      Returns:
      The name of the workflow gathered from the provided Order & OrderFulfillment data
    • gatherAdditionalWorkflowParameters

      protected Map<String,String> gatherAdditionalWorkflowParameters(com.broadleafcommerce.order.client.domain.Order order, com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • getApplicationId

      @Nullable protected String getApplicationId(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • getTenantId

      @Nullable protected String getTenantId(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)