Class DefaultWorkflowGenerationService
java.lang.Object
com.broadleafcommerce.orderoperation.service.generate.workflow.DefaultWorkflowGenerationService
- All Implemented Interfaces:
WorkflowGenerationService
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultWorkflowGenerationService(com.broadleafcommerce.orchestration.service.provider.external.WorkflowProvider externalWorkflowProvider, WorkflowGenerationProperties workflowGenerationProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidConfigures theantPathMatcherto be case-insensitive.protected StringdetermineBasicWorkflowName(com.broadleafcommerce.order.client.domain.Order order, com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment) Determines the workflow name fromOrder&OrderFulfillmentdata.protected StringdetermineWorkflowName(com.broadleafcommerce.order.client.domain.Order order, com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment) Map the value harvested fromOrderFulfillment.getAttributes()for the targeted workflow to a real workflow name.gatherAdditionalWorkflowParameters(com.broadleafcommerce.order.client.domain.Order order, com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) voidgenerateWorkflow(@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 StringgetApplicationId(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected StringgetTenantId(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
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:WorkflowGenerationServiceCall the remote WorkflowService and request a new workflow be started to complete the fulfillment.- Specified by:
generateWorkflowin interfaceWorkflowGenerationService- Parameters:
request- The request to generate a workflow.contextInfo- Data tracking context information
-
configureAntPathMatcher
protected void configureAntPathMatcher()Configures theantPathMatcherto 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 fromOrderFulfillment.getAttributes()for the targeted workflow to a real workflow name. Refer toWorkflowGenerationPropertiesfor 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 inspectedfulfillment- 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 fromOrder&OrderFulfillmentdata. The value returned here may be used as-is or mapped to another workflow name leveragingWorkflowGenerationProperties.- Parameters:
order- The parent order being inspectedfulfillment- The specific fulfillment order being inspected- Returns:
- The name of the workflow gathered from the provided
Order&OrderFulfillmentdata
-
gatherAdditionalWorkflowParameters
-
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)
-