Author: jleroux
Date: Mon May 16 10:03:39 2011
New Revision: 1103667
URL:
http://svn.apache.org/viewvc?rev=1103667&view=revLog:
A small change to more easily see current pending jobs and possibly cancel some others while canceling one manually
Modified:
ofbiz/trunk/framework/service/servicedef/services.xml
ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java
ofbiz/trunk/framework/webtools/widget/ServiceScreens.xml
Modified: ofbiz/trunk/framework/service/servicedef/services.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/servicedef/services.xml?rev=1103667&r1=1103666&r2=1103667&view=diff==============================================================================
--- ofbiz/trunk/framework/service/servicedef/services.xml (original)
+++ ofbiz/trunk/framework/service/servicedef/services.xml Mon May 16 10:03:39 2011
@@ -42,6 +42,7 @@ under the License.
</required-permissions>
<auto-attributes entity-name="JobSandbox" include="pk" mode="IN" optional="false"/>
<attribute name="cancelDateTime" type="Timestamp" mode="OUT" optional="false"/>
+ <attribute name="statusId" type="String" mode="OUT" optional="false"/> <!-- To more easily see current pending jobs and possibly cancel some others -->
</service>
<service name="cancelJobRetries" engine="java"
Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java?rev=1103667&r1=1103666&r2=1103667&view=diff==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java Mon May 16 10:03:39 2011
@@ -543,6 +543,7 @@ public class ServiceUtil {
if (cancelDate != null) {
Map<String, Object> result = ServiceUtil.returnSuccess();
result.put("cancelDateTime", cancelDate);
+ result.put("statusId", "SERVICE_PENDING"); // To more easily see current pending jobs and possibly cancel some others
return result;
} else {
String errMsg = UtilProperties.getMessage(ServiceUtil.resource, "serviceUtil.unable_to_cancel_job", locale) + " : " + job;
Modified: ofbiz/trunk/framework/webtools/widget/ServiceScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/ServiceScreens.xml?rev=1103667&r1=1103666&r2=1103667&view=diff==============================================================================
--- ofbiz/trunk/framework/webtools/widget/ServiceScreens.xml (original)
+++ ofbiz/trunk/framework/webtools/widget/ServiceScreens.xml Mon May 16 10:03:39 2011
@@ -48,6 +48,7 @@ under the License.
<set field="titleProperty" value="PageTitleJobList"/>
<set field="tabButtonItem" value="findJob"/>
<set field="jobCtx" from-field="parameters"/>
+ <set field="dummy" value="${groovy: if ('SERVICE_PENDING'.equals(jobCtx.statusId)) jobCtx.jobId = ''}"/> <!-- To more easily see current pending jobs and possibly cancel some others -->
</actions>
<widgets>
<decorator-screen name="CommonServiceDecorator" location="${parameters.mainDecoratorLocation}">