Migration from 2.2.x to 2.3.0-GA
This is the initial release for the Broadleaf Order Management System 2.3.x module.
This release of OMS requires Broadleaf Commerce Framework 5.2.0-GA or greater.
Solr Changes
Fulfillment Order and Fulfillment Order Item Functionality has been added in this release.
This requires a new SOLR schema to index Fulfillment Orders.
This new schema.xml
can be found under: src/main/resources/config/bc/solr/fulfillmentOrders/schema.xml
Security Changes
AdminOmsSecurityExpressionRoot
and AdminOmsSecurityExpressionHandler
have been deleted and a new service, AdminOmsSecurityService
, has been created for dealing with security in OMS. This means that any reference to the previous expression root or expression handler needs to be removed, such as the global method security configuration in applicationContext-admin-security.xml
. Example:
<sec:global-method-security pre-post-annotations="enabled" secured-annotations="enabled">
<sec:expression-handler ref="blAdminOmsSecurityExpressionHandler"/>
</sec:global-method-security>
The expression handler in the above global method security should be removed:
<sec:global-method-security pre-post-annotations="enabled" secured-annotations="enabled"/>
Workflow Changes
Some of the default activities within the Fulfillment workflows and change order workflows have changed classes and/or bean names. This will only affect you if you have overridden one of these workflows.
New Fulfillment Order Section
A new Fulfillment Order section was added, and the admin security information will need to be update accordingly:
INSERT INTO BLC_ADMIN_SECTION (ADMIN_SECTION_ID, DISPLAY_ORDER, ADMIN_MODULE_ID, NAME, SECTION_KEY, URL, CEILING_ENTITY) VALUES (-16002, 2100, -3, 'Fulfillment Order', 'FulfillmentOrder', '/fulfillment-order', 'com.broadleafcommerce.oms.fulfillment.domain.FulfillmentOrder');
INSERT INTO BLC_ADMIN_SEC_PERM_XREF (ADMIN_SECTION_ID, ADMIN_PERMISSION_ID) VALUES (-16002, -16000);
INSERT INTO BLC_ADMIN_SEC_PERM_XREF (ADMIN_SECTION_ID, ADMIN_PERMISSION_ID) VALUES (-16002, -16002);
A new solr collection was also added as part of the new fulfillment order section. You will need to add a new solr core or solr collection to your solr instance. The schema for the new fulfillment order section can be found in src/main/resources/config/bc/solr/fulfillmentOrders
. You will also need to add a new solr configuration bean to connect to the new solr collection:
SOLR Standalone Configuration
XML Configuration
<bean id="blFulfillmentOrderPrimarySolrServer" class="org.broadleafcommerce.common.util.PropertyDrivenBeanFactory" factory-method="createInstance">
<constructor-arg value="${oms.search.fulfillmentOrder.service.solr.className}"/>
<constructor-arg value="${oms.search.fulfillmentOrder.service.solr.primary.location}"/>
</bean>
<bean id="blFulfillmentOrderReindexSolrServer" class="org.broadleafcommerce.common.util.PropertyDrivenBeanFactory" factory-method="createInstance">
<constructor-arg value="${oms.search.fulfillmentOrder.service.solr.className}"/>
<constructor-arg value="${oms.search.fulfillmentOrder.service.solr.reindex.location}"/>
</bean>
<bean id="blFulfillmentOrderAdminSolrServer" class="org.broadleafcommerce.common.util.PropertyDrivenBeanFactory" factory-method="createInstance">
<constructor-arg value="${oms.search.fulfillmentOrder.service.solr.className}"/>
<constructor-arg value="${oms.search.fulfillmentOrder.service.solr.admin.location}"/>
</bean>
<bean id="blFulfillmentOrderSolrConfiguration" class="org.broadleafcommerce.core.search.service.solr.SolrConfiguration">
<constructor-arg name="solrServer" ref="blFulfillmentOrderPrimarySolrServer" />
<constructor-arg name="reindexServer" ref="blFulfillmentOrderReindexSolrServer" />
<constructor-arg name="adminServer" ref="blFulfillmentOrderAdminSolrServer" />
</bean>
Java Configuration
@Bean
public SolrClient primaryFulfillmentOrderSolrClient() {
return new HttpSolrClient(primaryFulfillmentOrderSolrUrl);
}
@Bean
public SolrClient reindexFulfillmentOrderSolrClient() {
return new HttpSolrClient(reindexFulfillmentOrderSolrUrl);
}
@Bean
public SolrClient adminFulfillmentOrderSolrClient() {
return new HttpSolrClient(adminFulfillmentOrderSolrUrl);
}
@Bean
public SolrConfiguration blFulfillmentOrderSolrConfiguration() throws IllegalStateException {
return new SolrConfiguration(primaryFulfillmentOrderSolrClient(), reindexFulfillmentOrderSolrClient(), adminFulfillmentOrderSolrClient());
}
SOLR Cloud Configuration
XML Configuration
<bean class="org.apache.solr.client.solrj.impl.CloudSolrClient" id="blFulfillmentOrderPrimarySolrServer">
<constructor-arg value="${fulfillmentOrder.solr.cloud.zookeeper.locations}"/>
<property name="defaultCollection" value="fulfillment_order"/>
<property name="zkClientTimeout" value="60000"/>
<property name="zkConnectTimeout" value="60000"/>
<property name="requestWriter">
<bean class="org.apache.solr.client.solrj.request.RequestWriter"/>
</property>
</bean>
<bean class="org.apache.solr.client.solrj.impl.CloudSolrClient" id="blFulfillmentOrderReindexSolrServer">
<constructor-arg value="$fulfillmentOrder.solr.cloud.zookeeper.locations}"/>
<property name="defaultCollection" value="fulfillment_order_reindex"/>
<property name="zkClientTimeout" value="60000"/>
<property name="zkConnectTimeout" value="60000"/>
<property name="requestWriter">
<bean class="org.apache.solr.client.solrj.request.RequestWriter"/>
</property>
</bean>
<bean class="org.broadleafcommerce.core.search.service.solr.SolrConfiguration" id="blFulfillmentOrderSolrConfiguration">
<constructor-arg name="solrServer" ref="blFulfillmentOrderPrimarySolrServer"/>
<constructor-arg name="reindexServer" ref="blFulfillmentOrderReindexSolrServer"/>
<constructor-arg name="solrCloudConfigName" type="java.lang.String" value="fulfillment_order"/>
<constructor-arg name="solrCloudNumShards" type="int" value="2"/>
</bean>
Java Configuration
@Bean
public SolrClient primaryFulfillmentOrderSolrClient() {
CloudSolrClient primarySolrClient = new CloudSolrClient(fulfillmentOrderZookeeperUrls);
primarySolrClient.setDefaultCollection("fulfillment_order");
primarySolrClient.setZkClientTimeout(60000);
primarySolrClient.setZkConnectTimeout(60000);
primarySolrClient.setRequestWriter(new RequestWriter());
return primarySolrClient;
}
@Bean
public SolrClient reindexFulfillmentOrderSolrClient() {
CloudSolrClient reindexSolrClient = new CloudSolrClient(fulfillmentOrderZookeeperUrls);
reindexSolrClient.setDefaultCollection("fulfillment_order_reindex");
reindexSolrClient.setZkClientTimeout(60000);
reindexSolrClient.setZkConnectTimeout(60000);
reindexSolrClient.setRequestWriter(new RequestWriter());
return reindexSolrClient;
}
@Bean
public SolrConfiguration blFulfillmentOrderSolrConfiguration() throws IllegalStateException {
return new SolrConfiguration(primaryFulfillmentOrderSolrClient(), reindexFulfillmentOrderSolrClient(), "fulfillment_order", 2);
}