This is a copy of the default workflow. You can find the default workflows in the following place in the Broadleaf codebase: core/broadleaf-framework/src/main/resources/bl-framework-applicationContext-workflow.xml

Create a new activity

We need to add a new activity to record the average heat level for a given customer. Let's create that activity. In the site project, we'll create RecordHeatRangeActivity.java in the com.mycompany.checkout.service.workflow package with the following contents:

Note: You should choose org.broadleafcommerce.core.order.domain.Order, org.apache.common.logging.Log, and org.apache.common.logging.LogFactory as imports.

Notice that the activity loops through all current products in the order and assigns the appropriate heat range to the customer.

Add our activity to the workflow

We want to add our new activity between the RecordOfferUsageActivity (order is 4000) and the CommitTaxActivity (order is 5000).
In this example, within applicationContext.xml, we merge our custom activity into the blCheckoutWorkflowActivities.