Author: jaz
Date: Thu Sep 6 08:35:35 2007 New Revision: 573300 URL: http://svn.apache.org/viewvc?rev=573300&view=rev Log: dispatcher was ignore the results of pre-auth and pre-in-validate eca responses Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java?rev=573300&r1=573299&r2=573300&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java Thu Sep 6 08:35:35 2007 @@ -297,11 +297,15 @@ try { // setup global transaction ECA listeners to execute later - if (eventMap != null) ServiceEcaUtil.evalRules(modelService.name, eventMap, "global-rollback", ctx, context, result, false, false); - if (eventMap != null) ServiceEcaUtil.evalRules(modelService.name, eventMap, "global-commit", ctx, context, result, false, false); + if (eventMap != null) ServiceEcaUtil.evalRules(modelService.name, eventMap, "global-rollback", ctx, context, result, isError, isFailure); + if (eventMap != null) ServiceEcaUtil.evalRules(modelService.name, eventMap, "global-commit", ctx, context, result, isError, isFailure); // pre-auth ECA - if (eventMap != null) ServiceEcaUtil.evalRules(modelService.name, eventMap, "auth", ctx, context, result, false, false); + if (eventMap != null) ServiceEcaUtil.evalRules(modelService.name, eventMap, "auth", ctx, context, result, isError, isFailure); + + // check for pre-auth failure/errors + isFailure = ServiceUtil.isFailure(result); + isError = ServiceUtil.isError(result); context = checkAuth(localName, context, modelService); Object userLogin = context.get("userLogin"); @@ -311,9 +315,9 @@ } // pre-validate ECA - if (eventMap != null) ServiceEcaUtil.evalRules(modelService.name, eventMap, "in-validate", ctx, context, result, false, false); + if (eventMap != null) ServiceEcaUtil.evalRules(modelService.name, eventMap, "in-validate", ctx, context, result, isError, isFailure); - // check for pre-validate failure/erros + // check for pre-validate failure/errors isFailure = ServiceUtil.isFailure(result); isError = ServiceUtil.isError(result); @@ -328,9 +332,9 @@ } // pre-invoke ECA - if (eventMap != null) ServiceEcaUtil.evalRules(modelService.name, eventMap, "invoke", ctx, context, result, false, false); + if (eventMap != null) ServiceEcaUtil.evalRules(modelService.name, eventMap, "invoke", ctx, context, result, isError, isFailure); - // check for pre-invoke failure/erros + // check for pre-invoke failure/errors isFailure = ServiceUtil.isFailure(result); isError = ServiceUtil.isError(result); |
Free forum by Nabble | Edit this page |