Author: jonesde
Date: Sun May 18 23:58:10 2008
New Revision: 657735
URL:
http://svn.apache.org/viewvc?rev=657735&view=revLog:
Some improvements for the groovy example script, simplify and use some cool groovy stuff
Modified:
ofbiz/trunk/framework/common/script/org/ofbiz/common/GroovyServiceTest.groovy
Modified: ofbiz/trunk/framework/common/script/org/ofbiz/common/GroovyServiceTest.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/script/org/ofbiz/common/GroovyServiceTest.groovy?rev=657735&r1=657734&r2=657735&view=diff==============================================================================
--- ofbiz/trunk/framework/common/script/org/ofbiz/common/GroovyServiceTest.groovy (original)
+++ ofbiz/trunk/framework/common/script/org/ofbiz/common/GroovyServiceTest.groovy Sun May 18 23:58:10 2008
@@ -22,14 +22,14 @@
Debug.logInfo("-=-=-=- TEST BSH SERVICE -=-=-=-", "");
result = ServiceUtil.returnSuccess();
-if (context.containsKey("message")) {
- message = context.get("message");
- result.put("successMessage", "Got message [" + message + "] and finished fine");
- result.put("result", message);
+if (context.message != null) {
+ message = context.message;
+ result.successMessage = "Got message [" + message + "] and finished fine";
+ result.result = message;
Debug.logInfo("----- Message is: " + message + " -----", "");
} else {
- result.put("successMessage", "Got no message but finished fine anyway");
- result.put("result", "[no message received]");
+ result.successMessage = "Got no message but finished fine anyway";
+ result.result = "[no message received]";
}
return result;