zhourui 4 лет назад
Родитель
Сommit
44aa9c70f9
20 измененных файлов с 134 добавлено и 96 удалено
  1. 13 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ProcessPlatform.java
  2. 14 11
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionListWithJob.java
  3. 4 3
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionListWithWorkOrWorkCompleted.java
  4. 5 4
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/control/ActionGetWorkOrWorkCompleted.java
  5. 5 2
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/V2Get.java
  6. 6 3
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/V2GetMobile.java
  7. 4 2
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/V2LookupWorkOrWorkCompleted.java
  8. 4 2
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/V2LookupWorkOrWorkCompletedMobile.java
  9. 4 2
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithWorkOrWorkCompleted.java
  10. 4 2
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithWorkOrWorkCompletedPaging.java
  11. 8 5
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionCountWithPerson.java
  12. 8 8
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionGetWithWorkOrWorkCompleted.java
  13. 6 5
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionRefer.java
  14. 11 11
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/BaseAction.java
  15. 20 19
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/V2GetWorkOrWorkCompleted.java
  16. 5 4
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/workcompleted/ActionManageGetAssignment.java
  17. 9 9
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/workcompleted/BaseAction.java
  18. 2 2
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/log/SignalStack.java
  19. 0 1
      o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/ProcessingAttributes.java
  20. 2 1
      o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/ActionProcessing.java

+ 13 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ProcessPlatform.java

@@ -53,6 +53,8 @@ public class ProcessPlatform extends ConfigObject {
 
 	public static final Boolean DEFAULT_PROCESSINGSIGNALPERSISTENABLE = false;
 
+	public static final Integer DEFAULT_ASYNCHRONOUSTIMEOUT = 60;
+
 	public static ProcessPlatform defaultInstance() {
 		return new ProcessPlatform();
 	}
@@ -75,6 +77,7 @@ public class ProcessPlatform extends ConfigObject {
 		this.deleteDraft = new DeleteDraft();
 		this.passExpired = new PassExpired();
 		this.processingSignalPersistEnable = DEFAULT_PROCESSINGSIGNALPERSISTENABLE;
+		this.asynchronousTimeout = DEFAULT_ASYNCHRONOUSTIMEOUT;
 		this.attachmentConfig = new AttachmentConfig();
 	}
 
@@ -174,6 +177,16 @@ public class ProcessPlatform extends ConfigObject {
 	@FieldDescribe("流程附件上传限制大小或者类型.")
 	private AttachmentConfig attachmentConfig;
 
+	@FieldDescribe("异步超时.")
+	private Integer asynchronousTimeout;
+
+	public Integer getAsynchronousTimeout() {
+		if ((asynchronousTimeout == null) || (asynchronousTimeout < 1)) {
+			this.asynchronousTimeout = DEFAULT_ASYNCHRONOUSTIMEOUT;
+		}
+		return asynchronousTimeout;
+	}
+
 	public Boolean getProcessingSignalPersistEnable() {
 		if (processingSignalPersistEnable == null) {
 			this.processingSignalPersistEnable = DEFAULT_PROCESSINGSIGNALPERSISTENABLE;

+ 14 - 11
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionListWithJob.java

@@ -1,11 +1,22 @@
 package com.x.processplatform.assemble.surface.jaxrs.attachment;
 
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+import org.apache.commons.lang3.BooleanUtils;
+
 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.config.Config;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
 import com.x.base.core.project.gson.GsonPropertyObject;
 import com.x.base.core.project.http.ActionResult;
@@ -14,15 +25,6 @@ import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
 import com.x.processplatform.assemble.surface.Business;
 import com.x.processplatform.core.entity.content.Attachment;
-import org.apache.commons.lang3.BooleanUtils;
-
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.TimeUnit;
-import java.util.stream.Collectors;
 
 class ActionListWithJob extends BaseAction {
 
@@ -33,8 +35,9 @@ class ActionListWithJob extends BaseAction {
 		ActionResult<List<Wo>> result = new ActionResult<>();
 		CompletableFuture<List<Wo>> listFuture = listFuture(effectivePerson, job);
 		CompletableFuture<Boolean> checkControlFuture = checkJobControlFuture(effectivePerson, job);
-		result.setData(listFuture.get(10, TimeUnit.SECONDS));
-		if (BooleanUtils.isFalse(checkControlFuture.get(10, TimeUnit.SECONDS))) {
+		result.setData(listFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
+		if (BooleanUtils
+				.isFalse(checkControlFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS))) {
 			throw new ExceptionAccessDenied(effectivePerson, job);
 		}
 		return result;

+ 4 - 3
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionListWithWorkOrWorkCompleted.java

@@ -16,8 +16,8 @@ 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.config.Config;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
-import com.x.base.core.project.exception.ExceptionEntityNotExist;
 import com.x.base.core.project.gson.GsonPropertyObject;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
@@ -35,8 +35,9 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction {
 		ActionResult<List<Wo>> result = new ActionResult<>();
 		CompletableFuture<List<Wo>> listFuture = listFuture(effectivePerson, workOrWorkCompleted);
 		CompletableFuture<Boolean> checkControlFuture = checkControlFuture(effectivePerson, workOrWorkCompleted);
-		result.setData(listFuture.get(10, TimeUnit.SECONDS));
-		if (BooleanUtils.isFalse(checkControlFuture.get(10, TimeUnit.SECONDS))) {
+		result.setData(listFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
+		if (BooleanUtils
+				.isFalse(checkControlFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS))) {
 			throw new ExceptionAccessDenied(effectivePerson, workOrWorkCompleted);
 		}
 		return result;

+ 5 - 4
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/control/ActionGetWorkOrWorkCompleted.java

@@ -11,6 +11,7 @@ import org.apache.commons.lang3.BooleanUtils;
 
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.project.config.Config;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
@@ -49,13 +50,13 @@ class ActionGetWorkOrWorkCompleted extends BaseAction {
 
 	private Map<String, Boolean> hasTaskCompletedWithActivityToken = new HashMap<>();
 
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String workOrWorkCompleted)
-			throws InterruptedException, ExecutionException, TimeoutException, ExceptionAccessDenied {
+	ActionResult<Wo> execute(EffectivePerson effectivePerson, String workOrWorkCompleted) throws Exception {
 		ActionResult<Wo> result = new ActionResult<>();
 		CompletableFuture<Wo> getFuture = this.getFuture(effectivePerson, workOrWorkCompleted);
 		CompletableFuture<Boolean> checkControlFuture = this.checkControlFuture(effectivePerson, workOrWorkCompleted);
-		result.setData(getFuture.get(10, TimeUnit.SECONDS));
-		if (BooleanUtils.isFalse(checkControlFuture.get(10, TimeUnit.SECONDS))) {
+		result.setData(getFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
+		if (BooleanUtils
+				.isFalse(checkControlFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS))) {
 			throw new ExceptionAccessDenied(effectivePerson, workOrWorkCompleted);
 		}
 		return result;

+ 5 - 2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/V2Get.java

@@ -10,6 +10,7 @@ import java.util.concurrent.TimeUnit;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.project.cache.Cache.CacheKey;
+import com.x.base.core.project.config.Config;
 import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.exception.ExceptionEntityNotExist;
 import com.x.base.core.project.http.ActionResult;
@@ -51,8 +52,10 @@ class V2Get extends BaseAction {
 			CompletableFuture<Map<String, RelatedForm>> getRelatedFormFuture = this.getRelatedFormFuture(properties);
 			CompletableFuture<Map<String, RelatedScript>> getRelatedScriptFuture = this
 					.getRelatedScriptFuture(properties);
-			wo.setRelatedFormMap(getRelatedFormFuture.get(10, TimeUnit.SECONDS));
-			wo.setRelatedScriptMap(getRelatedScriptFuture.get(10, TimeUnit.SECONDS));
+			wo.setRelatedFormMap(
+					getRelatedFormFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
+			wo.setRelatedScriptMap(
+					getRelatedScriptFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
 			wo.setMaxAge(3600 * 24);
 			CacheManager.put(cacheCategory, cacheKey, wo);
 			result.setData(wo);

+ 6 - 3
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/V2GetMobile.java

@@ -10,6 +10,7 @@ import java.util.concurrent.TimeUnit;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.project.cache.Cache.CacheKey;
+import com.x.base.core.project.config.Config;
 import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.exception.ExceptionEntityNotExist;
 import com.x.base.core.project.http.ActionResult;
@@ -51,8 +52,10 @@ class V2GetMobile extends BaseAction {
 			CompletableFuture<Map<String, RelatedForm>> getRelatedFormFuture = this.getRelatedFormFuture(properties);
 			CompletableFuture<Map<String, RelatedScript>> getRelatedScriptFuture = this
 					.getRelatedScriptFuture(properties);
-			wo.setRelatedFormMap(getRelatedFormFuture.get(10, TimeUnit.SECONDS));
-			wo.setRelatedScriptMap(getRelatedScriptFuture.get(10, TimeUnit.SECONDS));
+			wo.setRelatedFormMap(
+					getRelatedFormFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
+			wo.setRelatedScriptMap(
+					getRelatedScriptFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
 			wo.setMaxAge(3600 * 24);
 			CacheManager.put(cacheCategory, cacheKey, wo);
 			result.setData(wo);
@@ -96,7 +99,7 @@ class V2GetMobile extends BaseAction {
 			return map;
 		});
 	}
-	
+
 	private Map<String, RelatedScript> convertScript(Business bus, FormProperties properties) throws Exception {
 		Map<String, RelatedScript> map = new TreeMap<>();
 		for (Entry<String, String> entry : properties.getMobileRelatedScriptMap().entrySet()) {

+ 4 - 2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/V2LookupWorkOrWorkCompleted.java

@@ -14,6 +14,7 @@ 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.cache.Cache.CacheKey;
+import com.x.base.core.project.config.Config;
 import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.gson.XGsonBuilder;
 import com.x.base.core.project.http.ActionResult;
@@ -53,8 +54,9 @@ class V2LookupWorkOrWorkCompleted extends BaseAction {
 				CompletableFuture<List<String>> relatedScriptFuture = this
 						.relatedScriptFuture(this.form.getProperties());
 				list.add(this.form.getId() + this.form.getUpdateTime().getTime());
-				list.addAll(relatedFormFuture.get(10, TimeUnit.SECONDS));
-				list.addAll(relatedScriptFuture.get(10, TimeUnit.SECONDS));
+				list.addAll(relatedFormFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
+				list.addAll(
+						relatedScriptFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
 				list = list.stream().sorted().collect(Collectors.toList());
 				this.wo.setId(this.form.getId());
 				CRC32 crc = new CRC32();

+ 4 - 2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/V2LookupWorkOrWorkCompletedMobile.java

@@ -14,6 +14,7 @@ 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.cache.Cache.CacheKey;
+import com.x.base.core.project.config.Config;
 import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.gson.XGsonBuilder;
 import com.x.base.core.project.http.ActionResult;
@@ -53,8 +54,9 @@ class V2LookupWorkOrWorkCompletedMobile extends BaseAction {
 				CompletableFuture<List<String>> relatedScriptFuture = this
 						.relatedScriptFuture(this.form.getProperties());
 				list.add(this.form.getId() + this.form.getUpdateTime().getTime());
-				list.addAll(relatedFormFuture.get(10, TimeUnit.SECONDS));
-				list.addAll(relatedScriptFuture.get(10, TimeUnit.SECONDS));
+				list.addAll(relatedFormFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
+				list.addAll(
+						relatedScriptFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
 				list = list.stream().sorted().collect(Collectors.toList());
 				this.wo.setId(this.form.getId());
 				CRC32 crc = new CRC32();

+ 4 - 2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithWorkOrWorkCompleted.java

@@ -14,6 +14,7 @@ import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.config.Config;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
 import com.x.base.core.project.exception.ExceptionEntityNotExist;
 import com.x.base.core.project.http.ActionResult;
@@ -36,11 +37,12 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction {
 		CompletableFuture<List<Wo>> listFuture = this.listFuture(workOrWorkCompleted);
 		CompletableFuture<Boolean> checkControlFuture = this.checkControlFuture(effectivePerson, workOrWorkCompleted);
 
-		if (BooleanUtils.isFalse(checkControlFuture.get(10, TimeUnit.SECONDS))) {
+		if (BooleanUtils
+				.isFalse(checkControlFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS))) {
 			throw new ExceptionAccessDenied(effectivePerson, workOrWorkCompleted);
 		}
 
-		result.setData(listFuture.get(10, TimeUnit.SECONDS));
+		result.setData(listFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
 
 		return result;
 

+ 4 - 2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithWorkOrWorkCompletedPaging.java

@@ -14,6 +14,7 @@ import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.config.Config;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
 import com.x.base.core.project.exception.ExceptionEntityNotExist;
 import com.x.base.core.project.http.ActionResult;
@@ -38,11 +39,12 @@ class ActionListWithWorkOrWorkCompletedPaging extends BaseAction {
 		CompletableFuture<List<Wo>> listFuture = this.listFuture(workOrWorkCompleted, page, size);
 		CompletableFuture<Boolean> checkControlFuture = this.checkControlFuture(effectivePerson, workOrWorkCompleted);
 
-		if (BooleanUtils.isFalse(checkControlFuture.get(10, TimeUnit.SECONDS))) {
+		if (BooleanUtils
+				.isFalse(checkControlFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS))) {
 			throw new ExceptionAccessDenied(effectivePerson, workOrWorkCompleted);
 		}
 
-		result.setData(listFuture.get(10, TimeUnit.SECONDS));
+		result.setData(listFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
 		return result;
 
 	}

+ 8 - 5
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionCountWithPerson.java

@@ -14,6 +14,7 @@ import org.apache.commons.lang3.StringUtils;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.project.annotation.FieldDescribe;
+import com.x.base.core.project.config.Config;
 import com.x.base.core.project.gson.GsonPropertyObject;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.logger.Logger;
@@ -46,11 +47,13 @@ class ActionCountWithPerson extends BaseAction {
 			CompletableFuture<Long> readFuture = this.readFuture(dn);
 			CompletableFuture<Long> readCompletedFuture = this.readCompletedFuture(dn);
 			CompletableFuture<Long> reviewFuture = this.reviewFuture(dn);
-			wo.setTask(taskFuture.get(10, TimeUnit.SECONDS));
-			wo.setTaskCompleted(taskCompletedFuture.get(10, TimeUnit.SECONDS));
-			wo.setRead(readFuture.get(10, TimeUnit.SECONDS));
-			wo.setReadCompleted(readCompletedFuture.get(10, TimeUnit.SECONDS));
-			wo.setReview(reviewFuture.get(10, TimeUnit.SECONDS));
+			wo.setTask(taskFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
+			wo.setTaskCompleted(
+					taskCompletedFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
+			wo.setRead(readFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
+			wo.setReadCompleted(
+					readCompletedFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
+			wo.setReview(reviewFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
 		}
 		result.setData(wo);
 		return result;

+ 8 - 8
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionGetWithWorkOrWorkCompleted.java

@@ -20,6 +20,7 @@ import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.dataitem.ItemCategory;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.config.Config;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
 import com.x.base.core.project.exception.ExceptionEntityNotExist;
 import com.x.base.core.project.gson.GsonPropertyObject;
@@ -59,22 +60,23 @@ class ActionGetWithWorkOrWorkCompleted extends BaseAction {
 			CompletableFuture<Data> dataFuture = this.dataFuture(work);
 			CompletableFuture<List<WoTask>> taskFuture = this.taskFuture(work.getJob());
 			CompletableFuture<List<WoRead>> readFuture = this.readFuture(work.getJob());
-			wo.setData(dataFuture.get(10, TimeUnit.SECONDS));
-			wo.setTaskList(taskFuture.get(10, TimeUnit.SECONDS));
-			wo.setReadList(readFuture.get(10, TimeUnit.SECONDS));
+			wo.setData(dataFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
+			wo.setTaskList(taskFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
+			wo.setReadList(readFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
 			this.setCurrentReadIndex(effectivePerson, wo);
 			this.setCurrentTaskIndex(effectivePerson, wo);
 			wo.setWork(gson.toJsonTree(work));
 		} else if (null != workCompleted) {
 			CompletableFuture<Data> dataFuture = this.dataFuture(workCompleted);
 			CompletableFuture<List<WoRead>> readFuture = this.readFuture(workCompleted.getJob());
-			wo.setData(dataFuture.get(10, TimeUnit.SECONDS));
-			wo.setReadList(readFuture.get(10, TimeUnit.SECONDS));
+			wo.setData(dataFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
+			wo.setReadList(readFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS));
 			this.setCurrentReadIndex(effectivePerson, wo);
 			wo.setWork(gson.toJsonTree(workCompleted));
 		}
 
-		if (BooleanUtils.isFalse(checkControlFuture.get(10, TimeUnit.SECONDS))) {
+		if (BooleanUtils
+				.isFalse(checkControlFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS))) {
 			throw new ExceptionAccessDenied(effectivePerson, workOrWorkCompleted);
 		}
 
@@ -82,8 +84,6 @@ class ActionGetWithWorkOrWorkCompleted extends BaseAction {
 		return result;
 	}
 
-
-
 	private CompletableFuture<Data> dataFuture(Work work) {
 		return CompletableFuture.supplyAsync(() -> {
 			try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {

+ 6 - 5
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionRefer.java

@@ -11,6 +11,7 @@ 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.config.Config;
 import com.x.base.core.project.gson.GsonPropertyObject;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
@@ -80,11 +81,11 @@ class ActionRefer extends BaseAction {
 				logger.error(e);
 			}
 		});
-		future_task.get(10, TimeUnit.SECONDS);
-		future_taskCompleted.get(10, TimeUnit.SECONDS);
-		future_read.get(10, TimeUnit.SECONDS);
-		future_readCompleted.get(10, TimeUnit.SECONDS);
-		future_review.get(10, TimeUnit.SECONDS);
+		future_task.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+		future_taskCompleted.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+		future_read.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+		future_readCompleted.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+		future_review.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
 		result.setData(wo);
 
 		return result;

+ 11 - 11
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/BaseAction.java

@@ -748,17 +748,17 @@ abstract class BaseAction extends StandardJaxrsAction {
 //			}
 //			return o;
 //		});
-//		future_tasks.get(300, TimeUnit.SECONDS);
-//		future_taskCompleteds.get(300, TimeUnit.SECONDS);
-//		future_reads.get(300, TimeUnit.SECONDS);
-//		future_readCompleteds.get(300, TimeUnit.SECONDS);
-//		future_attachments.get(300, TimeUnit.SECONDS);
-//		future_workLogs.get(300, TimeUnit.SECONDS);
-//		future_data.get(300, TimeUnit.SECONDS);
-//		application = future_application.get(300, TimeUnit.SECONDS);
-//		process = future_process.get(300, TimeUnit.SECONDS);
-//		activity = future_activity.get(300, TimeUnit.SECONDS);
-//		reviewCount = future_reviewCount.get(300, TimeUnit.SECONDS);
+//		future_tasks.get(300, TimeUnit.SECONDS1111);
+//		future_taskCompleteds.get(300, TimeUnit.SECONDS1111);
+//		future_reads.get(300, TimeUnit.SECONDS1111);
+//		future_readCompleteds.get(300, TimeUnit.SECONDS1111);
+//		future_attachments.get(300, TimeUnit.SECONDS1111);
+//		future_workLogs.get(300, TimeUnit.SECONDS1111);
+//		future_data.get(300, TimeUnit.SECONDS1111);
+//		application = future_application.get(300, TimeUnit.SECONDS1111);
+//		process = future_process.get(300, TimeUnit.SECONDS1111);
+//		activity = future_activity.get(300, TimeUnit.SECONDS1111);
+//		reviewCount = future_reviewCount.get(300, TimeUnit.SECONDS1111);
 //
 //		t.setWork(WoWork.copier.copy(work));
 //		this.arrangeWorkLog(business, t, woTaskCompleteds, woReadCompleteds);

+ 20 - 19
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/V2GetWorkOrWorkCompleted.java

@@ -21,6 +21,7 @@ import com.x.base.core.entity.dataitem.DataItem;
 import com.x.base.core.entity.dataitem.ItemCategory;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.config.Config;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
 import com.x.base.core.project.gson.GsonPropertyObject;
 import com.x.base.core.project.http.ActionResult;
@@ -76,16 +77,16 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
 			CompletableFuture<Void> creatorUnitFuture = this.creatorUnitFuture(work.getCreatorUnit(), wo);
 			CompletableFuture<Void> attachmentFuture = this.attachmentFuture(effectivePerson, work.getJob(), wo);
 			CompletableFuture<Void> recordFuture = this.recordFuture(effectivePerson, work.getJob(), wo);
-			workJsonFuture.get(10, TimeUnit.SECONDS);
-			activityRouteFuture.get(10, TimeUnit.SECONDS);
-			dataFuture.get(10, TimeUnit.SECONDS);
-			taskFuture.get(10, TimeUnit.SECONDS);
-			readFuture.get(10, TimeUnit.SECONDS);
-			creatorIdentityFuture.get(10, TimeUnit.SECONDS);
-			creatorPersonFuture.get(10, TimeUnit.SECONDS);
-			creatorUnitFuture.get(10, TimeUnit.SECONDS);
-			attachmentFuture.get(10, TimeUnit.SECONDS);
-			recordFuture.get(10, TimeUnit.SECONDS);
+			workJsonFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+			activityRouteFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+			dataFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+			taskFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+			readFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+			creatorIdentityFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+			creatorPersonFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+			creatorUnitFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+			attachmentFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+			recordFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
 			for (WoTask woTask : wo.getTaskList()) {
 				wo.getRecordList().add(taskToRecord(woTask));
 			}
@@ -100,17 +101,17 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
 			CompletableFuture<Void> attachmentFuture = attachmentFuture(effectivePerson, workCompleted.getJob(), wo);
 			CompletableFuture<Void> workCompletedRecordFuture = this.workCompletedRecordFuture(effectivePerson,
 					workCompleted, wo);
-			workCompletedJsonFuture.get(10, TimeUnit.SECONDS);
-			workCompletedDataFuture.get(10, TimeUnit.SECONDS);
-			readFuture.get(10, TimeUnit.SECONDS);
-			creatorIdentityFuture.get(10, TimeUnit.SECONDS);
-			creatorPersonFuture.get(10, TimeUnit.SECONDS);
-			creatorUnitFuture.get(10, TimeUnit.SECONDS);
-			attachmentFuture.get(10, TimeUnit.SECONDS);
-			workCompletedRecordFuture.get(10, TimeUnit.SECONDS);
+			workCompletedJsonFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+			workCompletedDataFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+			readFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+			creatorIdentityFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+			creatorPersonFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+			creatorUnitFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+			attachmentFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+			workCompletedRecordFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
 		}
 
-		if (BooleanUtils.isFalse(checkControlFuture.get(10, TimeUnit.SECONDS))) {
+		if (BooleanUtils.isFalse(checkControlFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS))) {
 			throw new ExceptionAccessDenied(effectivePerson, workOrWorkCompleted);
 		}
 

+ 5 - 4
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/workcompleted/ActionManageGetAssignment.java

@@ -12,6 +12,7 @@ import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.config.Config;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
 import com.x.base.core.project.gson.GsonPropertyObject;
 import com.x.base.core.project.http.ActionResult;
@@ -122,10 +123,10 @@ class ActionManageGetAssignment extends BaseAction {
 				logger.error(e);
 			}
 		});
-		future_taskCompleted.get(10, TimeUnit.SECONDS);
-		future_read.get(10, TimeUnit.SECONDS);
-		future_readCompleted.get(10, TimeUnit.SECONDS);
-		future_review.get(10, TimeUnit.SECONDS);
+		future_taskCompleted.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+		future_read.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+		future_readCompleted.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
+		future_review.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS);
 		result.setData(wo);
 		return result;
 	}

+ 9 - 9
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/workcompleted/BaseAction.java

@@ -449,15 +449,15 @@ abstract class BaseAction extends StandardJaxrsAction {
 //			return o;
 //		});
 //
-//		future_taskCompleteds.get(300, TimeUnit.SECONDS);
-//		future_reads.get(300, TimeUnit.SECONDS);
-//		future_readCompleteds.get(300, TimeUnit.SECONDS);
-//		future_attachments.get(300, TimeUnit.SECONDS);
-//		future_workLogs.get(300, TimeUnit.SECONDS);
-//		future_data.get(300, TimeUnit.SECONDS);
-//		application = future_application.get(300, TimeUnit.SECONDS);
-//		process = future_process.get(300, TimeUnit.SECONDS);
-//		reviewCount = future_reviewCount.get(300, TimeUnit.SECONDS);
+//		future_taskCompleteds.get(300, TimeUnit.SECONDS1111);
+//		future_reads.get(300, TimeUnit.SECONDS1111);
+//		future_readCompleteds.get(300, TimeUnit.SECONDS1111);
+//		future_attachments.get(300, TimeUnit.SECONDS1111);
+//		future_workLogs.get(300, TimeUnit.SECONDS1111);
+//		future_data.get(300, TimeUnit.SECONDS1111);
+//		application = future_application.get(300, TimeUnit.SECONDS1111);
+//		process = future_process.get(300, TimeUnit.SECONDS1111);
+//		reviewCount = future_reviewCount.get(300, TimeUnit.SECONDS1111);
 //
 //		t.setWorkCompleted(WoWorkCompleted.copier.copy(workCompleted));
 //		this.arrangeWorkLog(business, t, woTaskCompleteds, woReadCompleteds);

+ 2 - 2
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/log/SignalStack.java

@@ -1,8 +1,8 @@
 package com.x.processplatform.core.entity.log;
 
-import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.ConcurrentLinkedDeque;
 
-public class SignalStack extends CopyOnWriteArrayList<Signal> {
+public class SignalStack extends   ConcurrentLinkedDeque<Signal> {
 
 	private static final long serialVersionUID = -3971898583590304010L;
 

+ 0 - 1
o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/ProcessingAttributes.java

@@ -40,7 +40,6 @@ public class ProcessingAttributes extends GsonPropertyObject {
 
 	private SignalStack signalStack = new SignalStack();
 
-	
 	public SignalStack getSignalStack() {
 		return signalStack;
 	}

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

@@ -51,7 +51,8 @@ class ActionProcessing extends BaseAction {
 
 		try {
 			open(id, wi);
-			Wo wo = ProcessPlatformExecutorFactory.get(job).submit(new CallableExecute(wi, id)).get(300, TimeUnit.SECONDS);
+			Wo wo = ProcessPlatformExecutorFactory.get(job).submit(new CallableExecute(wi, id)).get(300,
+					TimeUnit.SECONDS);
 			persistSignalStack(id, job, wi);
 			result.setData(wo);
 			return result;