We use successfully several commerce provided beans to help configure our backoffice configuration inside mybackoffice-backoffice-config.xml including the following:
<wz:assignproperty="newProduct.catalogVersion"value="@catalogVersionService.getCatalogVersion('myProductCatalog', 'Staged')"/>
<wz:assignproperty="newPrice.currency"value="@commonI18NService.getCurrency('USD')"/>
<wz:assignproperty="newPrice.unit"value="@unitService.getUnitForCode('pieces')"/>
<wz:assignproperty="newStockLevel.warehouse"value="@warehouseService.getDefWarehouse().get(0)"/>
All the above work great and help us set default values when customizing create-wizards. However, we would like to be able to use our own custom services for similar needs. For example:
<wz:assignproperty="newProduct.name"value="@myCustomService.getName('myInput')"/>
However, even if we define myCustomService as a bean inside mybackoffice-spring.xml or mybackoffice-backoffice-spring.xml it seems this is not available to the Spring context used by backoffice when processing mybackoffice-backoffice-config.xml.
Are there special configuration steps necessary to allow a custom bean/service to be accessible by config.xml? I could not find any special setup for the above OOTB beans that are working fine.