Parcourir la source

Merge branch 'wrdp' into 'develop'

Wrdp

See merge request o2oa/o2oa!2625
o2null il y a 5 ans
Parent
commit
0914c7a98c
39 fichiers modifiés avec 868 ajouts et 234 suppressions
  1. 12 0
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/AttendanceSettingService.java
  2. 3 2
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/AttendanceSettingServiceAdv.java
  3. 8 8
      o2server/x_attendance_assemble_control/src/main/webapp/jest/describe.js
  4. 24 3
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/WrapDesigner.java
  5. 8 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/tools/PropertyTools.java
  6. 22 0
      o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/jaxrs/permissioninfo/ActionGetSectionOperationPermissoin.java
  7. 18 0
      o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/jaxrs/permissioninfo/ActionGetSubjectOperationPermissoin.java
  8. 5 0
      o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/service/UserPermissionService.java
  9. 8 8
      o2server/x_bbs_assemble_control/src/main/webapp/jest/describe.js
  10. 8 8
      o2server/x_calendar_assemble_control/src/main/webapp/jest/describe.js
  11. 8 8
      o2server/x_cms_assemble_control/src/main/webapp/jest/describe.js
  12. 8 8
      o2server/x_component_assemble_control/src/main/webapp/jest/describe.js
  13. 8 8
      o2server/x_file_assemble_control/src/main/webapp/jest/describe.js
  14. 8 8
      o2server/x_general_assemble_control/src/main/webapp/jest/describe.js
  15. 8 8
      o2server/x_hotpic_assemble_control/src/main/webapp/jest/describe.js
  16. 8 8
      o2server/x_jpush_assemble_control/src/main/webapp/jest/describe.js
  17. 8 8
      o2server/x_meeting_assemble_control/src/main/webapp/jest/describe.js
  18. 137 0
      o2server/x_message_assemble_communicate/src/main/java/com/x/message/assemble/communicate/jaxrs/message/ActionListPaging.java
  19. 24 5
      o2server/x_message_assemble_communicate/src/main/java/com/x/message/assemble/communicate/jaxrs/message/MessageAction.java
  20. 8 8
      o2server/x_message_assemble_communicate/src/main/webapp/jest/describe.js
  21. 8 8
      o2server/x_mind_assemble_control/src/main/webapp/jest/describe.js
  22. 8 8
      o2server/x_organization_assemble_authentication/src/main/webapp/jest/describe.js
  23. 8 8
      o2server/x_organization_assemble_control/src/main/webapp/jest/describe.js
  24. 8 8
      o2server/x_organization_assemble_express/src/main/webapp/jest/describe.js
  25. 8 8
      o2server/x_organization_assemble_personal/src/main/webapp/jest/describe.js
  26. 8 8
      o2server/x_portal_assemble_designer/src/main/webapp/jest/describe.js
  27. 8 8
      o2server/x_portal_assemble_surface/src/main/webapp/jest/describe.js
  28. 8 8
      o2server/x_processplatform_assemble_bam/src/main/webapp/jest/describe.js
  29. 15 1
      o2server/x_processplatform_assemble_designer/src/main/java/com/x/processplatform/assemble/designer/element/factory/ProcessFactory.java
  30. 378 6
      o2server/x_processplatform_assemble_designer/src/main/java/com/x/processplatform/assemble/designer/jaxrs/designer/ActionSearch.java
  31. 8 8
      o2server/x_processplatform_assemble_designer/src/main/webapp/jest/describe.js
  32. 8 8
      o2server/x_processplatform_assemble_surface/src/main/webapp/jest/describe.js
  33. 8 6
      o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/factory/ElementFactory.java
  34. 6 2
      o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/V2Retract.java
  35. 8 8
      o2server/x_processplatform_service_processing/src/main/webapp/jest/describe.js
  36. 8 8
      o2server/x_program_center/src/main/webapp/jest/describe.js
  37. 8 8
      o2server/x_query_assemble_designer/src/main/webapp/jest/describe.js
  38. 8 8
      o2server/x_query_assemble_surface/src/main/webapp/jest/describe.js
  39. 8 8
      o2server/x_query_service_processing/src/main/webapp/jest/describe.js

+ 12 - 0
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/AttendanceSettingService.java

@@ -197,6 +197,18 @@ public class AttendanceSettingService {
 			logger.warn( "system init system config 'APPEAL_CHECKER_VALUE' got an exception." );
 			logger.error(e);
 		}
+
+		value = "无";
+		type = "select";
+		selectContent = "无|周六|周日";
+		isMultiple = false;
+		description = "周末设置描述:选择周六或周日。选中的为周末,未选中的按工作日计算";
+		try {
+			checkAndInitSystemConfig("ATTENDANCE_WEEKEND", "周末计算日期设置", value, description, type, selectContent, isMultiple, ++ordernumber );
+		} catch (Exception e) {
+			logger.warn( "system init system config 'APPEAL_CHECKER_VALUE' got an exception." );
+			logger.error(e);
+		}
 	}
 	
 	/**

+ 3 - 2
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/AttendanceSettingServiceAdv.java

@@ -129,8 +129,9 @@ public class AttendanceSettingServiceAdv {
 				if( (configValue.indexOf("周六")>-1 && cal.get(Calendar.DAY_OF_WEEK)==Calendar.SATURDAY) || (configValue.indexOf("周日")>-1 && cal.get(Calendar.DAY_OF_WEEK)==Calendar.SUNDAY)){
 					iflag = true;
 				}
-			}else{
-				iflag = true;
+				if(configValue.indexOf("无")>-1 && (cal.get(Calendar.DAY_OF_WEEK)==Calendar.SATURDAY || cal.get(Calendar.DAY_OF_WEEK)==Calendar.SUNDAY) ){
+					iflag = true;
+				}
 			}
 
 		}

+ 8 - 8
o2server/x_attendance_assemble_control/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 24 - 3
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/WrapDesigner.java

@@ -100,9 +100,30 @@ public class WrapDesigner extends GsonPropertyObject {
 		}
 	}
 
-	public DesignerPattern getPatternInstant(){
-		DesignerPattern pattern = new DesignerPattern();
-		return pattern;
+	public void addPatternList(String elementType, Map<String, String> map) {
+		if(map!=null && !map.isEmpty()){
+			for (String key : map.keySet()){
+				DesignerPattern pattern = new DesignerPattern();
+				pattern.setElementType(elementType);
+				pattern.setProperty(key);
+				pattern.setPropertyValue(map.get(key));
+				this.patternList.add(pattern);
+			}
+		}
+	}
+
+	public void addPatternList(String elementType, String elementId, String elementName, Map<String, String> map) {
+		if(map!=null && !map.isEmpty()){
+			for (String key : map.keySet()){
+				DesignerPattern pattern = new DesignerPattern();
+				pattern.setElementType(elementType);
+				pattern.setElementId(elementId);
+				pattern.setElementName(elementName);
+				pattern.setProperty(key);
+				pattern.setPropertyValue(map.get(key));
+				this.patternList.add(pattern);
+			}
+		}
 	}
 
 	public void clearPatternValue(){

+ 8 - 1
o2server/x_base_core_project/src/main/java/com/x/base/core/project/tools/PropertyTools.java

@@ -1,10 +1,12 @@
 package com.x.base.core.project.tools;
 
 import java.lang.reflect.Field;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import com.x.base.core.project.gson.XGsonBuilder;
 import org.apache.commons.beanutils.PropertyUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.reflect.FieldUtils;
@@ -42,7 +44,12 @@ public class PropertyTools {
 			for (String name : properties) {
 				Object o = PropertyUtils.getProperty(t, name);
 				if (o!=null) {
-					String content = String.valueOf(o);
+					String content = "";
+					if (o instanceof Collection<?> || o instanceof Map<?, ?>){
+						content = XGsonBuilder.toJson(o);
+					} else {
+						content = String.valueOf(o);
+					}
 					if (StringTools.matchKeyword(keyword, content, caseSensitive, matchWholeWord, matchRegExp)) {
 						map.put(name, content);
 					}

+ 22 - 0
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/jaxrs/permissioninfo/ActionGetSectionOperationPermissoin.java

@@ -7,6 +7,8 @@ import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
+import com.x.base.core.project.organization.OrganizationDefinition;
+import com.x.bbs.assemble.control.Business;
 import com.x.bbs.assemble.control.jaxrs.permissioninfo.exception.ExceptionPermissionInfoProcess;
 import com.x.bbs.assemble.control.jaxrs.permissioninfo.exception.ExceptionSectionIdEmpty;
 import com.x.bbs.assemble.control.jaxrs.permissioninfo.exception.ExceptionSectionNotExists;
@@ -168,7 +170,27 @@ public class ActionGetSectionOperationPermissoin extends BaseAction {
 				wrap.setSectionPermissoinManageAble(true);
 				wrap.setSectionConfigManageAble(true);
 			}
+			//是否是管理员
+			Business business = new Business(null);
+			Boolean userBBSManager = business.organization().person().hasRole(effectivePerson, OrganizationDefinition.BBSManager);
+			Boolean userManager = business.organization().person().hasRole(effectivePerson, OrganizationDefinition.Manager);
+			if(userBBSManager || userManager) {
+				wrap.setSubjectPublishAble(true);
+				wrap.setReplyPublishAble(true);
+				wrap.setReplyAuditAble(true);
+				wrap.setSubjectAuditAble(true);
+				wrap.setSubjectManageAble(true);
+				wrap.setSubjectRecommendAble(true);
+				wrap.setSubjectStickAble(true);
+				wrap.setSubjectCreamAble(true);
+				wrap.setReplyManageAble(true);
+				
+				wrap.setSectionManageAble(true);
+				wrap.setSectionPermissoinManageAble(true);
+				wrap.setSectionConfigManageAble(true);
+			}
 		}
+		
 		result.setData(wrap);
 		return result;
 	}

+ 18 - 0
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/jaxrs/permissioninfo/ActionGetSubjectOperationPermissoin.java

@@ -7,6 +7,8 @@ import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
+import com.x.base.core.project.organization.OrganizationDefinition;
+import com.x.bbs.assemble.control.Business;
 import com.x.bbs.assemble.control.jaxrs.permissioninfo.exception.ExceptionPermissionInfoProcess;
 import com.x.bbs.assemble.control.jaxrs.permissioninfo.exception.ExceptionSectionNotExists;
 import com.x.bbs.assemble.control.jaxrs.permissioninfo.exception.ExceptionSubjectIdEmpty;
@@ -170,6 +172,22 @@ public class ActionGetSubjectOperationPermissoin extends BaseAction {
 				}
 			}
 		}
+		
+		//是否是管理员
+		Business business = new Business(null);
+		Boolean userBBSManager = business.organization().person().hasRole(effectivePerson, OrganizationDefinition.BBSManager);
+		Boolean userManager = business.organization().person().hasRole(effectivePerson, OrganizationDefinition.Manager);
+		if(userBBSManager || userManager) {
+			wrap.setReplyPublishAble(true);
+			wrap.setAuditAble(true);
+			wrap.setManageAble(true);
+			wrap.setEditAble(true);
+			wrap.setRecommendAble(true);
+			wrap.setStickAble(true);
+			wrap.setCreamAble(true);
+			wrap.setReplyAuditAble(true);
+		    wrap.setReplyManageAble(true);		
+		 }
 
 		result.setData(wrap);
 		return result;

+ 5 - 0
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/service/UserPermissionService.java

@@ -5,7 +5,12 @@ import java.util.Date;
 import java.util.List;
 
 import com.google.gson.Gson;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.x.base.core.project.x_organization_assemble_express;
 import com.x.base.core.project.cache.ApplicationCache;
+import com.x.base.core.project.connection.ActionResponse;
 import com.x.base.core.project.gson.XGsonBuilder;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.logger.Logger;

+ 8 - 8
o2server/x_bbs_assemble_control/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_calendar_assemble_control/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_cms_assemble_control/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_component_assemble_control/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_file_assemble_control/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_general_assemble_control/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_hotpic_assemble_control/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_jpush_assemble_control/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_meeting_assemble_control/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 137 - 0
o2server/x_message_assemble_communicate/src/main/java/com/x/message/assemble/communicate/jaxrs/message/ActionListPaging.java

@@ -0,0 +1,137 @@
+package com.x.message.assemble.communicate.jaxrs.message;
+
+import com.google.gson.JsonElement;
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.annotation.FieldDescribe;
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.gson.GsonPropertyObject;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.tools.DateTools;
+import com.x.message.assemble.communicate.Business;
+import com.x.message.core.entity.Message;
+import com.x.message.core.entity.Message_;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Tuple;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import java.util.List;
+
+class ActionListPaging extends BaseAction {
+
+	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, Integer page, Integer size, JsonElement jsonElement)
+			throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			Business business = new Business(emc);
+			ActionResult<List<Wo>> result = new ActionResult<>();
+			Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
+			Predicate p = this.toFilterPredicate(effectivePerson, business, wi);
+			List<Wo> wos = emc.fetchDescPaging(Message.class, Wo.copier, p, page, size, Message.sequence_FIELDNAME);
+
+			result.setData(wos);
+			result.setCount(emc.count(Message.class, p));
+			return result;
+		}
+	}
+
+	private Predicate toFilterPredicate(EffectivePerson effectivePerson, Business business, Wi wi) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(Message.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Tuple> cq = cb.createQuery(Tuple.class);
+		Root<Message> root = cq.from(Message.class);
+		Predicate p = cb.conjunction();
+
+		if(StringUtils.isNotEmpty(wi.getPerson())){
+			p = cb.and(p, cb.equal(root.get(Message_.person), wi.getPerson()));
+		}
+
+		if(StringUtils.isNotEmpty(wi.getType())){
+			p = cb.and(p, cb.equal(root.get(Message_.type), wi.getType()));
+		}
+
+		if(StringUtils.isNotEmpty(wi.getConsume())){
+			p = cb.and(p, cb.equal(root.get(Message_.consumer), wi.getConsume()));
+		}
+
+		if (DateTools.isDateTimeOrDate(wi.getStartTime())) {
+			p = cb.and(p, cb.greaterThan(root.get(Message_.createTime), DateTools.parse(wi.getStartTime())));
+		}
+		if (DateTools.isDateTimeOrDate(wi.getEndTime())) {
+			p = cb.and(p, cb.lessThan(root.get(Message_.createTime), DateTools.parse(wi.getEndTime())));
+		}
+		return p;
+	}
+
+	public class Wi extends GsonPropertyObject {
+
+		@FieldDescribe("用户")
+		private String person;
+
+		@FieldDescribe("消息类型.")
+		private String type;
+
+		@FieldDescribe("消费者")
+		private String consume;
+
+		@FieldDescribe("开始时间yyyy-MM-dd HH:mm:ss")
+		private String startTime;
+
+		@FieldDescribe("结束时间yyyy-MM-dd HH:mm:ss")
+		private String endTime;
+
+		public String getPerson() {
+			return person;
+		}
+
+		public void setPerson(String person) {
+			this.person = person;
+		}
+
+		public String getType() {
+			return type;
+		}
+
+		public void setType(String type) {
+			this.type = type;
+		}
+
+		public String getConsume() {
+			return consume;
+		}
+
+		public void setConsume(String consume) {
+			this.consume = consume;
+		}
+
+		public String getStartTime() {
+			return startTime;
+		}
+
+		public void setStartTime(String startTime) {
+			this.startTime = startTime;
+		}
+
+		public String getEndTime() {
+			return endTime;
+		}
+
+		public void setEndTime(String endTime) {
+			this.endTime = endTime;
+		}
+	}
+
+	public static class Wo extends Message {
+
+		private static final long serialVersionUID = 681982898431236763L;
+		static WrapCopier<Message, Wo> copier = WrapCopierFactory.wo(Message.class, Wo.class, null,
+				JpaObject.FieldsInvisible);
+	}
+
+}

+ 24 - 5
o2server/x_message_assemble_communicate/src/main/java/com/x/message/assemble/communicate/jaxrs/message/MessageAction.java

@@ -1,10 +1,7 @@
 package com.x.message.assemble.communicate.jaxrs.message;
 
 import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
+import javax.ws.rs.*;
 import javax.ws.rs.container.AsyncResponse;
 import javax.ws.rs.container.Suspended;
 import javax.ws.rs.core.Context;
@@ -13,6 +10,7 @@ import javax.ws.rs.core.MediaType;
 import com.google.gson.JsonElement;
 import com.x.base.core.project.annotation.JaxrsDescribe;
 import com.x.base.core.project.annotation.JaxrsMethodDescribe;
+import com.x.base.core.project.annotation.JaxrsParameterDescribe;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.HttpMediaType;
@@ -21,6 +19,8 @@ import com.x.base.core.project.jaxrs.StandardJaxrsAction;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
 
+import java.util.List;
+
 @Path("message")
 @JaxrsDescribe("消息")
 public class MessageAction extends StandardJaxrsAction {
@@ -45,4 +45,23 @@ public class MessageAction extends StandardJaxrsAction {
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
 
-}
+	@JaxrsMethodDescribe(value = "消息分页查询.", action = ActionListPaging.class)
+	@POST
+	@Path("list/paging/{page}/size/{size}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void listPaging(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+						   @JaxrsParameterDescribe("分页") @PathParam("page") Integer page,
+						   @JaxrsParameterDescribe("每页数量") @PathParam("size") Integer size, JsonElement jsonElement) {
+		ActionResult<List<ActionListPaging.Wo>> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionListPaging().execute(effectivePerson, page, size, jsonElement);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, jsonElement);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getDefaultActionResultResponse(result));
+	}
+
+}

+ 8 - 8
o2server/x_message_assemble_communicate/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_mind_assemble_control/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_organization_assemble_authentication/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_organization_assemble_control/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_organization_assemble_express/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_organization_assemble_personal/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_portal_assemble_designer/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_portal_assemble_surface/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_processplatform_assemble_bam/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 15 - 1
o2server/x_processplatform_assemble_designer/src/main/java/com/x/processplatform/assemble/designer/element/factory/ProcessFactory.java

@@ -7,6 +7,7 @@ import java.util.stream.Collectors;
 import javax.persistence.EntityManager;
 import javax.persistence.criteria.*;
 
+import com.x.base.core.project.tools.ListTools;
 import com.x.processplatform.assemble.designer.AbstractFactory;
 import com.x.processplatform.assemble.designer.Business;
 import com.x.processplatform.core.entity.element.Application;
@@ -31,6 +32,19 @@ public class ProcessFactory extends AbstractFactory {
 		return em.createQuery(cq).getResultList();
 	}
 
+	public List<String> listWithApplications(List<String> applications) throws Exception {
+		EntityManager em = this.entityManagerContainer().get(Process.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<String> cq = cb.createQuery(String.class);
+		Root<Process> root = cq.from(Process.class);
+		Predicate p = cb.conjunction();
+		if(ListTools.isNotEmpty(applications)) {
+			p = cb.isMember(root.get(Process_.application), cb.literal(applications));
+		}
+		cq.select(root.get(Process_.id)).where(p);
+		return em.createQuery(cq).getResultList();
+	}
+
 	public List<Process> listWithApplicationObject(String application) throws Exception {
 		EntityManager em = this.entityManagerContainer().get(Process.class);
 		CriteriaBuilder cb = em.getCriteriaBuilder();
@@ -123,4 +137,4 @@ public class ProcessFactory extends AbstractFactory {
 		return 1.0;
 	}
 
-}
+}

+ 378 - 6
o2server/x_processplatform_assemble_designer/src/main/java/com/x/processplatform/assemble/designer/jaxrs/designer/ActionSearch.java

@@ -8,6 +8,7 @@ import com.x.base.core.entity.enums.DesignerType;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopierFactory;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
+import com.x.base.core.project.gson.XGsonBuilder;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WiDesigner;
@@ -16,22 +17,22 @@ import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
 import com.x.base.core.project.tools.ListTools;
 import com.x.base.core.project.tools.PropertyTools;
+import com.x.base.core.project.tools.StringTools;
 import com.x.processplatform.assemble.designer.Business;
-import com.x.processplatform.core.entity.element.Application;
-import com.x.processplatform.core.entity.element.Form;
-import com.x.processplatform.core.entity.element.Script;
-import com.x.processplatform.core.entity.element.wrap.WrapProcess;
+import com.x.processplatform.core.entity.element.*;
+import com.x.processplatform.core.entity.element.Process;
+import com.x.processplatform.core.entity.element.wrap.*;
 import org.apache.commons.lang3.StringUtils;
 
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.TimeUnit;
+import java.util.concurrent.*;
 
 class ActionSearch extends BaseAction {
 
 	private static Logger logger = LoggerFactory.getLogger(ActionSearch.class);
+	private final static String DESIGN_PROCESS_ACTIVITY = "activity";
 
 	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {
 		if(!effectivePerson.isManager()){
@@ -52,6 +53,9 @@ class ActionSearch extends BaseAction {
 		if (wi.getDesignerTypes().isEmpty() || wi.getDesignerTypes().contains(DesignerType.script.toString())){
 			list.add(searchScript(wi, wi.getAppIdList()));
 		}
+		if (wi.getDesignerTypes().isEmpty() || wi.getDesignerTypes().contains(DesignerType.process.toString())){
+			resWos.addAll(searchProcess(wi, wi.getAppIdList()));
+		}
 		for (CompletableFuture<List<Wo>> cf : list){
 			if(resWos.size()<50) {
 				resWos.addAll(cf.get(60, TimeUnit.SECONDS));
@@ -139,6 +143,374 @@ class ActionSearch extends BaseAction {
 		return cf;
 	}
 
+	private List<Wo> searchProcess(final Wi wi, final List<String> appIdList) {
+
+		List<List<String>> batchList = new ArrayList<>();
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			Business business = new Business(emc);
+			List<String> processIds = business.process().listWithApplications(appIdList);
+			batchList = ListTools.batch(processIds, 20);
+		}catch (Exception e){
+			logger.error(e);
+		}
+		Executor executor = Executors.newFixedThreadPool(batchList.size());
+		List<CompletableFuture<List<Wo>>> cfList = new ArrayList<>();
+		for (List<String> partProcessIds : batchList) {
+			CompletableFuture<List<Wo>> cf = CompletableFuture.supplyAsync(() -> {
+				List<Wo> resWos = new ArrayList<>();
+				try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+					Business business = new Business(emc);
+					List<Process> processList = emc.list(Process.class, partProcessIds);
+					for (Process process : processList) {
+						try {
+							Wo wo = doProcessSearch(business, process, wi);
+							if (wo!=null){
+								resWos.add(wo);
+							}
+						} catch (Exception e) {
+							logger.error(e);
+						}
+					}
+					processList.clear();
+				}catch (Exception e){
+					logger.error(e);
+				}
+				return resWos;
+			}, executor);
+			cfList.add(cf);
+		}
+		List<Wo> woList = new ArrayList<>();
+		for (CompletableFuture<List<Wo>> cf : cfList){
+			try {
+				woList.addAll(cf.get(30, TimeUnit.SECONDS));
+			} catch (Exception e){
+				logger.error(e);
+			}
+		}
+		return woList;
+	}
+
+
+	private Wo doProcessSearch(Business business, Process process, Wi wi) throws Exception {
+		Wo wo = null;
+		WrapProcess wrap = WrapProcess.outCopier.copy(process);
+		wrap.setAgentList(WrapAgent.outCopier.copy(business.entityManagerContainer().list(Agent.class,
+				business.agent().listWithProcess(process.getId()))));
+		wrap.setBegin(WrapBegin.outCopier.copy(
+				business.entityManagerContainer().find(business.begin().getWithProcess(process.getId()), Begin.class)));
+		wrap.setCancelList(WrapCancel.outCopier.copy(business.entityManagerContainer().list(Cancel.class,
+				business.cancel().listWithProcess(process.getId()))));
+		wrap.setChoiceList(WrapChoice.outCopier.copy(business.entityManagerContainer().list(Choice.class,
+				business.choice().listWithProcess(process.getId()))));
+		wrap.setDelayList(WrapDelay.outCopier.copy(business.entityManagerContainer().list(Delay.class,
+				business.delay().listWithProcess(process.getId()))));
+		wrap.setEmbedList(WrapEmbed.outCopier.copy(business.entityManagerContainer().list(Embed.class,
+				business.embed().listWithProcess(process.getId()))));
+		wrap.setEndList(WrapEnd.outCopier.copy(
+				business.entityManagerContainer().list(End.class, business.end().listWithProcess(process.getId()))));
+		wrap.setInvokeList(WrapInvoke.outCopier.copy(business.entityManagerContainer().list(Invoke.class,
+				business.invoke().listWithProcess(process.getId()))));
+		wrap.setManualList(WrapManual.outCopier.copy(business.entityManagerContainer().list(Manual.class,
+				business.manual().listWithProcess(process.getId()))));
+		wrap.setMergeList(WrapMerge.outCopier.copy(business.entityManagerContainer().list(Merge.class,
+				business.merge().listWithProcess(process.getId()))));
+		wrap.setMessageList(WrapMessage.outCopier.copy(business.entityManagerContainer().list(Message.class,
+				business.message().listWithProcess(process.getId()))));
+		wrap.setParallelList(WrapParallel.outCopier.copy(business.entityManagerContainer().list(Parallel.class,
+				business.parallel().listWithProcess(process.getId()))));
+		wrap.setServiceList(WrapService.outCopier.copy(business.entityManagerContainer().list(Service.class,
+				business.service().listWithProcess(process.getId()))));
+		wrap.setSplitList(WrapSplit.outCopier.copy(business.entityManagerContainer().list(Split.class,
+				business.split().listWithProcess(process.getId()))));
+		wrap.setRouteList(WrapRoute.outCopier.copy(business.entityManagerContainer().list(Route.class,
+				business.route().listWithProcess(process.getId()))));
+
+		if(!StringTools.matchKeyword(wi.getKeyword(), XGsonBuilder.toJson(wrap), wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp())) {
+			wrap.getManualList().clear();
+			return null;
+		}
+
+		Map<String, String> pmap = PropertyTools.fieldMatchKeyword(WrapProcess.outCopier.getCopyFields(), process, wi.getKeyword(),
+				wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp());
+		if (!pmap.isEmpty()) {
+			if(wo == null){
+				wo = this.getProcessWo(business, process);
+			}
+			wo.addPatternList(DesignerType.process.toString(), pmap);
+		}
+
+		if(!wrap.getAgentList().isEmpty() && StringTools.matchKeyword(wi.getKeyword(),
+				XGsonBuilder.toJson(wrap.getAgentList()), wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp())){
+			if(wo == null){
+				wo = this.getProcessWo(business, process);
+			}
+			for (WrapAgent active : wrap.getAgentList()){
+				Map<String, String> map = PropertyTools.fieldMatchKeyword(WrapAgent.outCopier.getCopyFields(), active, wi.getKeyword(),
+						wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp());
+				if (!map.isEmpty()) {
+					if(wo == null){
+						wo = this.getProcessWo(business, process);
+					}
+					wo.addPatternList(DESIGN_PROCESS_ACTIVITY, active.getId(), active.getName(), map);
+				}
+			}
+		}
+
+		if(wrap.getBegin() != null && StringTools.matchKeyword(wi.getKeyword(),
+				XGsonBuilder.toJson(wrap.getBegin()), wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp())){
+			if(wo == null){
+				wo = this.getProcessWo(business, process);
+			}
+			WrapBegin active = wrap.getBegin();
+			Map<String, String> map = PropertyTools.fieldMatchKeyword(WrapBegin.outCopier.getCopyFields(), active, wi.getKeyword(),
+					wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp());
+			if (!map.isEmpty()) {
+				if(wo == null){
+					wo = this.getProcessWo(business, process);
+				}
+				wo.addPatternList(DESIGN_PROCESS_ACTIVITY, active.getId(), active.getName(), map);
+			}
+		}
+
+		if(!wrap.getCancelList().isEmpty() && StringTools.matchKeyword(wi.getKeyword(),
+				XGsonBuilder.toJson(wrap.getCancelList()), wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp())){
+			if(wo == null){
+				wo = this.getProcessWo(business, process);
+			}
+			for (WrapCancel active : wrap.getCancelList()){
+				Map<String, String> map = PropertyTools.fieldMatchKeyword(WrapCancel.outCopier.getCopyFields(), active, wi.getKeyword(),
+						wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp());
+				if (!map.isEmpty()) {
+					if(wo == null){
+						wo = this.getProcessWo(business, process);
+					}
+					wo.addPatternList(DESIGN_PROCESS_ACTIVITY, active.getId(), active.getName(), map);
+				}
+			}
+		}
+
+		if(!wrap.getChoiceList().isEmpty() && StringTools.matchKeyword(wi.getKeyword(),
+				XGsonBuilder.toJson(wrap.getChoiceList()), wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp())){
+			if(wo == null){
+				wo = this.getProcessWo(business, process);
+			}
+			for (WrapChoice active : wrap.getChoiceList()){
+				Map<String, String> map = PropertyTools.fieldMatchKeyword(WrapChoice.outCopier.getCopyFields(), active, wi.getKeyword(),
+						wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp());
+				if (!map.isEmpty()) {
+					if(wo == null){
+						wo = this.getProcessWo(business, process);
+					}
+					wo.addPatternList(DESIGN_PROCESS_ACTIVITY, active.getId(), active.getName(), map);
+				}
+			}
+		}
+
+		if(!wrap.getDelayList().isEmpty() && StringTools.matchKeyword(wi.getKeyword(),
+				XGsonBuilder.toJson(wrap.getDelayList()), wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp())){
+			if(wo == null){
+				wo = this.getProcessWo(business, process);
+			}
+			for (WrapDelay active : wrap.getDelayList()){
+				Map<String, String> map = PropertyTools.fieldMatchKeyword(WrapDelay.outCopier.getCopyFields(), active, wi.getKeyword(),
+						wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp());
+				if (!map.isEmpty()) {
+					if(wo == null){
+						wo = this.getProcessWo(business, process);
+					}
+					wo.addPatternList(DESIGN_PROCESS_ACTIVITY, active.getId(), active.getName(), map);
+				}
+			}
+		}
+
+		if(!wrap.getEmbedList().isEmpty() && StringTools.matchKeyword(wi.getKeyword(),
+				XGsonBuilder.toJson(wrap.getEmbedList()), wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp())){
+			if(wo == null){
+				wo = this.getProcessWo(business, process);
+			}
+			for (WrapEmbed active : wrap.getEmbedList()){
+				Map<String, String> map = PropertyTools.fieldMatchKeyword(WrapEmbed.outCopier.getCopyFields(), active, wi.getKeyword(),
+						wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp());
+				if (!map.isEmpty()) {
+					if(wo == null){
+						wo = this.getProcessWo(business, process);
+					}
+					wo.addPatternList(DESIGN_PROCESS_ACTIVITY, active.getId(), active.getName(), map);
+				}
+			}
+		}
+
+		if(!wrap.getEndList().isEmpty() && StringTools.matchKeyword(wi.getKeyword(),
+				XGsonBuilder.toJson(wrap.getEndList()), wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp())){
+			if(wo == null){
+				wo = this.getProcessWo(business, process);
+			}
+			for (WrapEnd active : wrap.getEndList()){
+				Map<String, String> map = PropertyTools.fieldMatchKeyword(WrapEnd.outCopier.getCopyFields(), active, wi.getKeyword(),
+						wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp());
+				if (!map.isEmpty()) {
+					if(wo == null){
+						wo = this.getProcessWo(business, process);
+					}
+					wo.addPatternList(DESIGN_PROCESS_ACTIVITY, active.getId(), active.getName(), map);
+				}
+			}
+		}
+
+		if(!wrap.getInvokeList().isEmpty() && StringTools.matchKeyword(wi.getKeyword(),
+				XGsonBuilder.toJson(wrap.getInvokeList()), wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp())){
+			if(wo == null){
+				wo = this.getProcessWo(business, process);
+			}
+			for (WrapInvoke active : wrap.getInvokeList()){
+				Map<String, String> map = PropertyTools.fieldMatchKeyword(WrapInvoke.outCopier.getCopyFields(), active, wi.getKeyword(),
+						wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp());
+				if (!map.isEmpty()) {
+					if(wo == null){
+						wo = this.getProcessWo(business, process);
+					}
+					wo.addPatternList(DESIGN_PROCESS_ACTIVITY, active.getId(), active.getName(), map);
+				}
+			}
+		}
+
+		if(!wrap.getManualList().isEmpty() && StringTools.matchKeyword(wi.getKeyword(),
+				XGsonBuilder.toJson(wrap.getManualList()), wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp())){
+			if(wo == null){
+				wo = this.getProcessWo(business, process);
+			}
+			for (WrapManual active : wrap.getManualList()){
+				Map<String, String> map = PropertyTools.fieldMatchKeyword(WrapManual.outCopier.getCopyFields(), active, wi.getKeyword(),
+						wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp());
+				if (!map.isEmpty()) {
+					if(wo == null){
+						wo = this.getProcessWo(business, process);
+					}
+					wo.addPatternList(DESIGN_PROCESS_ACTIVITY, active.getId(), active.getName(), map);
+				}
+			}
+		}
+
+		if(!wrap.getMergeList().isEmpty() && StringTools.matchKeyword(wi.getKeyword(),
+				XGsonBuilder.toJson(wrap.getMergeList()), wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp())){
+			if(wo == null){
+				wo = this.getProcessWo(business, process);
+			}
+			for (WrapMerge active : wrap.getMergeList()){
+				Map<String, String> map = PropertyTools.fieldMatchKeyword(WrapMerge.outCopier.getCopyFields(), active, wi.getKeyword(),
+						wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp());
+				if (!map.isEmpty()) {
+					if(wo == null){
+						wo = this.getProcessWo(business, process);
+					}
+					wo.addPatternList(DESIGN_PROCESS_ACTIVITY, active.getId(), active.getName(), map);
+				}
+			}
+		}
+
+		if(!wrap.getMessageList().isEmpty() && StringTools.matchKeyword(wi.getKeyword(),
+				XGsonBuilder.toJson(wrap.getMessageList()), wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp())){
+			if(wo == null){
+				wo = this.getProcessWo(business, process);
+			}
+			for (WrapMessage active : wrap.getMessageList()){
+				Map<String, String> map = PropertyTools.fieldMatchKeyword(WrapMessage.outCopier.getCopyFields(), active, wi.getKeyword(),
+						wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp());
+				if (!map.isEmpty()) {
+					if(wo == null){
+						wo = this.getProcessWo(business, process);
+					}
+					wo.addPatternList(DESIGN_PROCESS_ACTIVITY, active.getId(), active.getName(), map);
+				}
+			}
+		}
+
+		if(!wrap.getParallelList().isEmpty() && StringTools.matchKeyword(wi.getKeyword(),
+				XGsonBuilder.toJson(wrap.getParallelList()), wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp())){
+			if(wo == null){
+				wo = this.getProcessWo(business, process);
+			}
+			for (WrapParallel active : wrap.getParallelList()){
+				Map<String, String> map = PropertyTools.fieldMatchKeyword(WrapParallel.outCopier.getCopyFields(), active, wi.getKeyword(),
+						wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp());
+				if (!map.isEmpty()) {
+					if(wo == null){
+						wo = this.getProcessWo(business, process);
+					}
+					wo.addPatternList(DESIGN_PROCESS_ACTIVITY, active.getId(), active.getName(), map);
+				}
+			}
+		}
+
+		if(!wrap.getServiceList().isEmpty() && StringTools.matchKeyword(wi.getKeyword(),
+				XGsonBuilder.toJson(wrap.getServiceList()), wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp())){
+			if(wo == null){
+				wo = this.getProcessWo(business, process);
+			}
+			for (WrapService active : wrap.getServiceList()){
+				Map<String, String> map = PropertyTools.fieldMatchKeyword(WrapService.outCopier.getCopyFields(), active, wi.getKeyword(),
+						wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp());
+				if (!map.isEmpty()) {
+					if(wo == null){
+						wo = this.getProcessWo(business, process);
+					}
+					wo.addPatternList(DESIGN_PROCESS_ACTIVITY, active.getId(), active.getName(), map);
+				}
+			}
+		}
+
+		if(!wrap.getSplitList().isEmpty() && StringTools.matchKeyword(wi.getKeyword(),
+				XGsonBuilder.toJson(wrap.getSplitList()), wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp())){
+			if(wo == null){
+				wo = this.getProcessWo(business, process);
+			}
+			for (WrapSplit active : wrap.getSplitList()){
+				Map<String, String> map = PropertyTools.fieldMatchKeyword(WrapSplit.outCopier.getCopyFields(), active, wi.getKeyword(),
+						wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp());
+				if (!map.isEmpty()) {
+					if(wo == null){
+						wo = this.getProcessWo(business, process);
+					}
+					wo.addPatternList(DESIGN_PROCESS_ACTIVITY, active.getId(), active.getName(), map);
+				}
+			}
+		}
+
+		if(!wrap.getRouteList().isEmpty() && StringTools.matchKeyword(wi.getKeyword(),
+				XGsonBuilder.toJson(wrap.getRouteList()), wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp())){
+			if(wo == null){
+				wo = this.getProcessWo(business, process);
+			}
+			for (WrapRoute active : wrap.getRouteList()){
+				Map<String, String> map = PropertyTools.fieldMatchKeyword(WrapRoute.outCopier.getCopyFields(), active, wi.getKeyword(),
+						wi.getCaseSensitive(), wi.getMatchWholeWord(), wi.getMatchRegExp());
+				if (!map.isEmpty()) {
+					if(wo == null){
+						wo = this.getProcessWo(business, process);
+					}
+					wo.addPatternList(DESIGN_PROCESS_ACTIVITY, active.getId(), active.getName(), map);
+				}
+			}
+		}
+
+		wrap.getManualList().clear();
+		return wo;
+	}
+
+	private Wo getProcessWo(Business business, Process process) throws Exception {
+		Wo wo = new Wo();
+		Application app = business.entityManagerContainer().find(process.getApplication(), Application.class);
+		if (app != null) {
+			wo.setAppId(app.getId());
+			wo.setAppName(app.getName());
+		}
+		wo.setDesignerId(process.getId());
+		wo.setDesignerName(process.getName());
+		wo.setDesignerType(DesignerType.process.toString());
+		wo.setUpdateTime(process.getUpdateTime());
+		return wo;
+	}
+
 
 
 	public static class Wi extends WiDesigner {

+ 8 - 8
o2server/x_processplatform_assemble_designer/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_processplatform_assemble_surface/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 6
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/factory/ElementFactory.java

@@ -92,14 +92,16 @@ public class ElementFactory extends AbstractFactory {
 			t = (T) optional.get();
 		} else {
 			t = this.entityManagerContainer().find(id, clz);
-			CacheManager.put(cacheCategory, cacheKey, t);
+			if(t != null) {
+				CacheManager.put(cacheCategory, cacheKey, t);
+			}
 		}
 		return t;
 	}
 
 	public Activity getActivity(String id) throws Exception {
 		Activity activity = null;
-		activity = this.get(id, ActivityType.agent);
+		activity = this.get(id, ActivityType.manual);
 		if (null == activity) {
 			activity = this.get(id, ActivityType.begin);
 			if (null == activity) {
@@ -111,11 +113,11 @@ public class ElementFactory extends AbstractFactory {
 						if (null == activity) {
 							activity = this.get(id, ActivityType.embed);
 							if (null == activity) {
-								activity = this.get(id, ActivityType.end);
+								activity = this.get(id, ActivityType.split);
 								if (null == activity) {
 									activity = this.get(id, ActivityType.invoke);
 									if (null == activity) {
-										activity = this.get(id, ActivityType.manual);
+										activity = this.get(id, ActivityType.agent);
 										if (null == activity) {
 											activity = this.get(id, ActivityType.merge);
 											if (null == activity) {
@@ -125,7 +127,7 @@ public class ElementFactory extends AbstractFactory {
 													if (null == activity) {
 														activity = this.get(id, ActivityType.service);
 														if (null == activity) {
-															activity = this.get(id, ActivityType.split);
+															activity = this.get(id, ActivityType.end);
 														}
 													}
 												}
@@ -735,4 +737,4 @@ public class ElementFactory extends AbstractFactory {
 		}
 		return compiledScript;
 	}
-}
+}

+ 6 - 2
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/V2Retract.java

@@ -25,6 +25,7 @@ import com.x.processplatform.core.entity.content.Work;
 import com.x.processplatform.core.entity.content.WorkLog;
 import com.x.processplatform.core.entity.element.Activity;
 import com.x.processplatform.core.entity.element.Application;
+import com.x.processplatform.core.entity.element.Form;
 import com.x.processplatform.core.entity.element.Process;
 import com.x.processplatform.core.entity.element.util.WorkLogTree;
 import com.x.processplatform.core.entity.element.util.WorkLogTree.Node;
@@ -99,7 +100,10 @@ class V2Retract extends BaseAction {
 					}
 
 					if (StringUtils.isNotEmpty(activity.getForm())) {
-						work.setForm(activity.getForm());
+						Form form = business.element().get(activity.getForm(), Form.class);
+						if (null != form) {
+							work.setForm(activity.getForm());
+						}
 					}
 
 					update(work, workLog);
@@ -269,4 +273,4 @@ class V2Retract extends BaseAction {
 
 	public static class Wo extends WrapBoolean {
 	}
-}
+}

+ 8 - 8
o2server/x_processplatform_service_processing/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_program_center/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_query_assemble_designer/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_query_assemble_surface/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";

+ 8 - 8
o2server/x_query_service_processing/src/main/webapp/jest/describe.js

@@ -431,29 +431,29 @@ Describe.createSampleO2= function(m) {
 			
 			if(m.type=="POST"){
 			   strSample += " \n var string = JSON.stringify(data);" + "\n";
-               strSample += " var applications = this.Action.applications;"+ "\n";
+               strSample += " var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.postQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.postQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="GET"){
-               strSample += " \n var applications = this.Action.applications;"+ "\n";
+               strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                 strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.getQuery( serviceRoot, path );"+ "\n";
+               strSample += " var resp = apps.getQuery( serviceRoot, path );"+ "\n";
 			}
 			if(m.type=="PUT"){
 			   strSample += " \n var string = JSON.stringify(data)"+ "\n";
-               strSample += " var applications = this.Action.applications"+ "\n";
+               strSample += " var apps = this.applications"+ "\n";
                strSample += " var serviceRoot = \"" + uri + "\";"+ "\n";
                strSample += " var path = \"" + address+ "\";"+ "\n"; ;
-               strSample += " var resp = applications.putQuery( serviceRoot, path , string);"+ "\n";
+               strSample += " var resp = apps.putQuery( serviceRoot, path , string);"+ "\n";
 			}
 			if(m.type=="DELETE"){
-			   strSample += " \n var applications = this.Action.applications;"+ "\n";
+			   strSample += " \n var apps = this.applications;"+ "\n";
                strSample += " var serviceRoot = \" "+ uri + "\";"+ "\n";
                  strSample += " var path = \"" + address + "\";"+ "\n"; ;
-               strSample += " var resp = applications.deleteQuery( serviceRoot, path);"+ "\n";
+               strSample += " var resp = apps.deleteQuery( serviceRoot, path);"+ "\n";
 			}
 			
                strSample += " var json = JSON.parse( resp.toString() );"+ "\n";