Author: jleroux Date: Sat Nov 26 17:38:56 2011 New Revision: 1206507 URL: http://svn.apache.org/viewvc?rev=1206507&view=rev Log: A patch from Paul Foxworthy "loadSalesInvoiceFact should be post-run" https://issues.apache.org/jira/browse/OFBIZ-4582
See thread at http://ofbiz.135035.n4.nabble.com/Should-loadSalesInvoiceFact-be-run-on-return-instead-of-commit-td3896289.html The loadSalesInvoiceFact service in applications/accounting/servicedef/secas_olap.xml is set to run asynchronously on (that is, before) a commit. The result is that the service may attempt to read an order that has not yet been committed. In the patch, the timing has been changed to global-commit-post-run to ensure the order has been committed. Modified: ofbiz/trunk/applications/accounting/servicedef/secas_olap.xml Modified: ofbiz/trunk/applications/accounting/servicedef/secas_olap.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/secas_olap.xml?rev=1206507&r1=1206506&r2=1206507&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/servicedef/secas_olap.xml (original) +++ ofbiz/trunk/applications/accounting/servicedef/secas_olap.xml Sat Nov 26 17:38:56 2011 @@ -23,7 +23,7 @@ under the License. <!-- fact entities --> <!-- Load data into the SalesInvoiceItemFact olap entity when a sales invoice is set to ready --> - <eca service="setInvoiceStatus" event="commit"> + <eca service="setInvoiceStatus" event="global-commit-post-run"> <condition field-name="statusId" operator="equals" value="INVOICE_READY"/> <condition-field field-name="statusId" operator="not-equals" to-field-name="oldStatusId"/> <action service="loadSalesInvoiceFact" mode="async" run-as-user="system"/>