OFBiz Setup and Configuration | MuleSoft Documentation (2024)

The following steps are required in order to configure OFBiz for use by the Accelerator assets.

  1. It is recommended to create a separate service account for integration purposes

    • for example, gradle loadAdminUserLogin -PuserLoginId=integrationadmin

  2. Edit the framework/security/config/security.properties file and add the OFBiz server hostname to the host-headers-allowed setting

  3. Services must be exported in order for the Mule applications to be able to invoke them. These are defined in a services xml file under the servicedef folder, organized by domain. For each of the following services, add the attribute export="true" to the service definition tag (all file paths are relative to $OFBIZ_HOME/applications):

PathObject

party/servicedef/services.xml

createPartyPostalAddressquickCreateCustomercreatePersonupdatePersoncreateUpdatePartyEmailAddresscreateUpdatePartyTelecoNumbercreateUpdatePartyPostalAddressfindPartiesById

party/servicedef/services_view.xml

getPersongetPartiesFromExternalIdgetPartiesFromExactEmailgetPartyContactMechValueMaps

accounting/servicedef/services_paymentmethod.xml

createCreditCard

order/servicedef/services.xml

addOrderItemShipGroupchangeOrderStatuscreateOrderPaymentPreferencefindOrdersstoreOrder

product/servicedef/services_shipment.xml

createShipment

The service names can be cross-referenced with the XML request templates under src/main/resources/ofbiz as well as a few of the Transform Message processors contained in the flows.

The Order, Party, and Product entities must be customized to support the order, customer, and product sync process, respectively. Here are the steps:

  1. Navigate to $OFBIZ_HOME/applications/datamodel/entitydef

  2. Make a backup copies of the order-entitymodel.xml, party-entitymodel.xml, and partyproduct-entitymodel.xml files

  3. Edit the order-entitymodel.xml file as follows:

    • Change the type of the externalId field in the OrderItem entity to "name" instead of "id"

    • Do the same for the externalId field in the OrderHeader entity

  4. Edit the party-entitymodel.xml file as follows:

    • Change the type of the externalId field in the Party entity to "name" instead of "id"

    • Add the following field to the Person entity: <field name="customerNumber" type="name"></field>

  5. Edit the product-entitymodel.xml file as follows:

    • Add the following field to the Product entity: <field name="externalId" type="name"></field>

  6. Save all the files and restart OFBiz if it’s already running

OFBiz Setup and Configuration | MuleSoft Documentation (2024)
Top Articles
Latest Posts
Article information

Author: Van Hayes

Last Updated:

Views: 6154

Rating: 4.6 / 5 (66 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Van Hayes

Birthday: 1994-06-07

Address: 2004 Kling Rapid, New Destiny, MT 64658-2367

Phone: +512425013758

Job: National Farming Director

Hobby: Reading, Polo, Genealogy, amateur radio, Scouting, Stand-up comedy, Cryptography

Introduction: My name is Van Hayes, I am a thankful, friendly, smiling, calm, powerful, fine, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.