/[Apache-SVN]
ViewVC logotype

Revision 1830301


Jump to revision: Previous Next
Author: nmalin
Date: Fri Apr 27 07:21:47 2018 UTC (5 years, 11 months ago)
Changed paths: 9
Log Message:
Fixed: ConfigXMLReader - Events are not executed in the order defined
(OFBIZ-10369)
The events contained in the controller configuration for first-visit, pre-post processor and before-after login are executed in arbitrary order rather than the defined order.
If we define an event configuration as follow:

    <after-login>
        <event name=keepCartUpdated type=java path=org.apache.ofbiz.order.shoppingcart.ShoppingCartEvents invoke=keepCartUpdated/>
        <event name=restoreAutoSaveList type=java path=org.apache.ofbiz.order.shoppinglist.ShoppingListEvents invoke=restoreAutoSaveList/>
        <event name=saveCartToAutoSaveList type=java path=org.apache.ofbiz.order.shoppinglist.ShoppingListEvents invoke=saveCartToAutoSaveList/>
    </after-login>

We wait that OFBIz run keepCartUpdated, restoreAutoSaveList and after saveCartToAutoSaveList event but the HashMap who organise them return arbitrary order and can return saveCartToAutoSaveList, keepCartUpdated and restoreAutoSaveList. Convert the HashMap to LinkedHashMap help to keep the loaded order.

Thanks to Vikas Mayur for solve this issue

Changed paths

Path Details
Directoryofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/invoice/EditInvoice.groovy modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/InvoiceWorker.java modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/accounting/template/invoice/InvoiceReportContactMechs.fo.ftl modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/accounting/widget/AccountingPrintScreens.xml modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/datamodel/entitydef/accounting-entitymodel.xml modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/order/template/order/CompanyHeader.fo.ftl modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyHelper.java modified , text changed
Directoryofbiz/ofbiz-framework/trunk/framework/common/ofbiz-component.xml modified , text changed
Directoryofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26