提交 d9c8fd59 编写于 作者: O o2null

Merge branch 'fix/callabletimeout' into 'wrdp'

本次提交处理由于无权限用户访问V2GetWorkOrWorkCompleted导致的线程锁死

See merge request o2oa/o2oa!2272
......@@ -282,7 +282,7 @@ public class PersistenceXmlHelper {
properties.put("openjpa.QueryCompilationCache", "false");
properties.put("openjpa.LockManager", "none");
properties.put("openjpa.jdbc.ResultSetType", "scroll-insensitive");
properties.put("openjpa.Multithreaded", "true");
properties.put("openjpa.Multithreaded", "false");
/* 如果启用本地初始化会导致classLoad的问题 */
properties.put("openjpa.DynamicEnhancementAgent", "false");
properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=false)");
......
......@@ -35,7 +35,7 @@ class ActionCloseCheck extends BaseAction {
process = business.process().pick(work.getProcess());
}
}
if (null != work && null != process) {
if ((null != work) && (null != process)) {
wo.setDraft(this.draft(effectivePerson, work, process));
} else {
WoDraft woDraft = new WoDraft();
......
......@@ -119,6 +119,12 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
private WoRecord taskToRecord(WoTask woTask) {
WoRecord o = new WoRecord();
// id必须设置为空,否则会影响每次输出的内容都不同,那么会导致etag每次不同.
o.setId("");
// order设置为task的最后修改时间,否则会影响每次输出的内容都不同,那么会导致etag每次不同.
o.setOrder(woTask.getUpdateTime().getTime());
// recordTime设置为task的最后修改时间,否则会影响每次输出的内容都不同,那么会导致etag每次不同.
o.setRecordTime(woTask.getUpdateTime());
o.setType(Record.TYPE_CURRENTTASK);
o.setFromActivity(woTask.getActivity());
o.setFromActivityAlias(woTask.getActivityAlias());
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -35,7 +36,7 @@ class ActionCreateDataPath0 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
public static class Wo extends WoId {
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -35,7 +36,7 @@ class ActionCreateDataPath1 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
public static class Wo extends WoId {
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -36,7 +37,7 @@ class ActionCreateDataPath2 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
public static class Wo extends WoId {
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -36,7 +37,7 @@ class ActionCreateDataPath3 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
public static class Wo extends WoId {
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -36,7 +37,7 @@ class ActionCreateDataPath4 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
public static class Wo extends WoId {
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -36,7 +37,7 @@ class ActionCreateDataPath5 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
public static class Wo extends WoId {
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -36,7 +37,7 @@ class ActionCreateDataPath6 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
public static class Wo extends WoId {
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -36,7 +37,7 @@ class ActionCreateDataPath7 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
public static class Wo extends WoId {
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -34,7 +35,7 @@ class ActionDeleteDataPath0 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
public static class Wo extends WoId {
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -34,7 +35,7 @@ class ActionDeleteDataPath1 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
public static class Wo extends WoId {
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -34,7 +35,7 @@ class ActionDeleteDataPath2 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
public static class Wo extends WoId {
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -34,7 +35,7 @@ class ActionDeleteDataPath3 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
public static class Wo extends WoId {
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -35,7 +36,7 @@ class ActionDeleteDataPath4 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
public static class Wo extends WoId {
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -35,7 +36,7 @@ class ActionDeleteDataPath5 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
public static class Wo extends WoId {
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -35,7 +36,7 @@ class ActionDeleteDataPath6 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
public static class Wo extends WoId {
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -35,7 +36,7 @@ class ActionDeleteDataPath7 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
public static class Wo extends WoId {
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -48,7 +49,7 @@ class ActionUpdate extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -35,7 +36,7 @@ class ActionUpdateDataPath0 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -35,7 +36,7 @@ class ActionUpdateDataPath1 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -36,7 +37,7 @@ class ActionUpdateDataPath2 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -36,7 +37,7 @@ class ActionUpdateDataPath3 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -36,7 +37,7 @@ class ActionUpdateDataPath4 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -36,7 +37,7 @@ class ActionUpdateDataPath5 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -36,7 +37,7 @@ class ActionUpdateDataPath6 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
......
package com.x.processplatform.service.processing.jaxrs.applicationdict;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -36,7 +37,7 @@ class ActionUpdateDataPath7 extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(id).submit(callable).get();
return ProcessPlatformExecutorFactory.get(id).submit(callable).get(300, TimeUnit.SECONDS);
}
......
......@@ -3,6 +3,7 @@ package com.x.processplatform.service.processing.jaxrs.attachment;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -88,7 +89,7 @@ class ActionCopyToWork extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
return ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
}
......
......@@ -3,6 +3,7 @@ package com.x.processplatform.service.processing.jaxrs.attachment;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -89,7 +90,7 @@ class ActionCopyToWorkCompleted extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
return ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
}
......
package com.x.processplatform.service.processing.jaxrs.attachment;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -64,7 +65,7 @@ class ActionDelete extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.attachment;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -69,7 +70,7 @@ class ActionDeleteWithWork extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.attachment;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -68,7 +69,7 @@ class ActionDeleteWithWorkCompleted extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
......@@ -2,6 +2,7 @@ package com.x.processplatform.service.processing.jaxrs.attachment;
import java.util.Arrays;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -56,7 +57,7 @@ class ActionEdit extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
return ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
}
......
......@@ -2,6 +2,7 @@ package com.x.processplatform.service.processing.jaxrs.attachment;
import java.util.Arrays;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -59,7 +60,7 @@ class ActionEditText extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
return ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
}
......
......@@ -2,6 +2,7 @@ package com.x.processplatform.service.processing.jaxrs.data;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -68,7 +69,7 @@ class ActionCreateWithWork extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -53,7 +54,7 @@ class ActionCreateWithWorkPath0 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -52,7 +53,7 @@ class ActionCreateWithWorkPath1 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -52,7 +53,7 @@ class ActionCreateWithWorkPath2 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -52,7 +53,7 @@ class ActionCreateWithWorkPath3 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -52,7 +53,7 @@ class ActionCreateWithWorkPath4 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -52,7 +53,7 @@ class ActionCreateWithWorkPath5 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -52,7 +53,7 @@ class ActionCreateWithWorkPath6 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -54,7 +55,7 @@ class ActionCreateWithWorkPath7 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -51,7 +52,7 @@ class ActionDeleteWithWork extends BaseAction {
}
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
}
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -49,7 +50,7 @@ class ActionDeleteWithWorkPath0 extends BaseAction {
return "";
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -48,7 +49,7 @@ class ActionDeleteWithWorkPath1 extends BaseAction {
return "";
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -49,7 +50,7 @@ class ActionDeleteWithWorkPath2 extends BaseAction {
return "";
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -49,7 +50,7 @@ class ActionDeleteWithWorkPath3 extends BaseAction {
return "";
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -49,7 +50,7 @@ class ActionDeleteWithWorkPath4 extends BaseAction {
return "";
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -49,7 +50,7 @@ class ActionDeleteWithWorkPath5 extends BaseAction {
return "";
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -49,7 +50,7 @@ class ActionDeleteWithWorkPath6 extends BaseAction {
return "";
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -49,7 +50,7 @@ class ActionDeleteWithWorkPath7 extends BaseAction {
return "";
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -68,7 +69,7 @@ class ActionUpdateWithWork extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.BooleanUtils;
......@@ -65,7 +66,7 @@ class ActionUpdateWithWorkCompleted extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.BooleanUtils;
......@@ -60,7 +61,7 @@ class ActionUpdateWithWorkCompletedPath0 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.BooleanUtils;
......@@ -59,7 +60,7 @@ class ActionUpdateWithWorkCompletedPath1 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.BooleanUtils;
......@@ -59,7 +60,7 @@ class ActionUpdateWithWorkCompletedPath2 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.BooleanUtils;
......@@ -59,7 +60,7 @@ class ActionUpdateWithWorkCompletedPath3 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.BooleanUtils;
......@@ -59,7 +60,7 @@ class ActionUpdateWithWorkCompletedPath4 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.BooleanUtils;
......@@ -59,7 +60,7 @@ class ActionUpdateWithWorkCompletedPath5 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.BooleanUtils;
......@@ -59,7 +60,7 @@ class ActionUpdateWithWorkCompletedPath6 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.BooleanUtils;
......@@ -61,7 +62,7 @@ class ActionUpdateWithWorkCompletedPath7 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
......@@ -2,6 +2,7 @@ package com.x.processplatform.service.processing.jaxrs.data;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.BooleanUtils;
......@@ -98,7 +99,7 @@ class ActionUpdateWithWorkCompletedPrimitivePath0 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -55,7 +56,7 @@ class ActionUpdateWithWorkPath0 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -55,7 +56,7 @@ class ActionUpdateWithWorkPath1 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -55,7 +56,7 @@ class ActionUpdateWithWorkPath2 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -55,7 +56,7 @@ class ActionUpdateWithWorkPath3 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -55,7 +56,7 @@ class ActionUpdateWithWorkPath4 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -55,7 +56,7 @@ class ActionUpdateWithWorkPath5 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -55,7 +56,7 @@ class ActionUpdateWithWorkPath6 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.data;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -56,7 +57,7 @@ class ActionUpdateWithWorkPath7 extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
//package com.x.processplatform.service.processing.jaxrs.data;
//
//import java.util.ArrayList;
//import java.util.List;
//import java.util.Map.Entry;
//import java.util.concurrent.Callable;
//
//import org.apache.commons.lang3.ArrayUtils;
//import org.apache.commons.lang3.StringUtils;
//import org.apache.commons.lang3.math.NumberUtils;
//
//import com.google.gson.JsonElement;
//import com.google.gson.JsonObject;
//import com.x.base.core.container.EntityManagerContainer;
//import com.x.base.core.container.factory.EntityManagerContainerFactory;
//import com.x.base.core.project.annotation.ActionLogger;
//import com.x.base.core.project.exception.ExceptionEntityNotExist;
//import com.x.base.core.project.executor.ProcessPlatformExecutorFactory;
//import com.x.base.core.project.http.ActionResult;
//import com.x.base.core.project.http.EffectivePerson;
//import com.x.base.core.project.jaxrs.WoId;
//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.processplatform.core.entity.content.Work;
//import com.x.processplatform.service.processing.Business;
//import com.x.processplatform.service.processing.jaxrs.data.ActionUpdateWithWorkPath7.Wo;
//
//class ActionUpdateWithWorkSection extends BaseAction {
//
// @ActionLogger
// private static Logger logger = LoggerFactory.getLogger(ActionUpdateWithWorkSection.class);
//
// ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, JsonElement jsonElement) throws Exception {
//
// ActionResult<Wo> result = new ActionResult<>();
// Wo wo = new Wo();
// String executorSeed = null;
//
// try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
// Work work = emc.fetch(id, Work.class, ListTools.toList(Work.job_FIELDNAME));
// if (null == work) {
// throw new ExceptionEntityNotExist(id, Work.class);
// }
// executorSeed = work.getJob();
// }
// Callable<String> callable = new Callable<String>() {
// public String call() throws Exception {
// try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
// /* 防止提交空数据清空data */
// if (null == jsonElement || (!jsonElement.isJsonObject())) {
// throw new ExceptionNotJsonObject();
// }
// if (jsonElement.getAsJsonObject().entrySet().isEmpty()) {
// throw new ExceptionEmptyData();
// }
// Business business = new Business(emc);
// Work work = emc.find(id, Work.class);
// if (null == work) {
// throw new ExceptionEntityNotExist(id, Work.class);
// }
// wo.setId(work.getId());
// /* 进行区段数据合并 */
// SectionData sectionData = gson.fromJson(jsonElement, SectionData.class);
// JsonElement merged;
// if (sectionData.hasSection()) {
// JsonElement data = sectionData.getData();
// JsonElement source = getData(business, work.getJob());
// for (Section section : sectionData.getSectionList()) {
// if (StringUtils.isNotEmpty(section.getPath())) {
// data = mergeSection(data, section.paths(), section.getKey(), source);
// }
// }
// merged = data;
// } else {
// merged = sectionData.getData();
// }
// /** 先更新title和serial,再更新DataItem,因为旧的DataItem中也有title和serial数据. */
// updateTitleSerial(business, work, merged);
// updateData(business, work, merged);
// /* updateTitleSerial 和 updateData 方法内进行了提交 */
// }
// return "";
// }
// };
// ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
//
// result.setData(wo);
// return result;
// }
//
// private JsonElement mergeSection(JsonElement data, String[] paths, String key, JsonElement source)
// throws Exception {
// JsonObject data_part_object = this.navigateElseEmptyObject(data, paths).getAsJsonObject();
// JsonObject source_part_object = this.navigateElseEmptyObject(source, paths).getAsJsonObject();
// for (Entry<String, JsonElement> entry : source_part_object.entrySet()) {
// if (!StringUtils.equals(key, entry.getKey())) {
// data_part_object.add(entry.getKey(), entry.getValue());
// }
// }
// return data;
// }
//
// private JsonElement navigateElseEmptyObject(JsonElement jsonElement, String[] paths) throws Exception {
// /* 判断在前 */
// if (null == jsonElement || jsonElement.isJsonPrimitive() || jsonElement.isJsonNull()) {
// return new JsonObject();
// }
// if (paths.length == 0) {
// return jsonElement;
// }
//
// if (jsonElement.isJsonArray()) {
// return navigateElseEmptyObject(jsonElement.getAsJsonArray().get(NumberUtils.toInt(paths[0])),
// ArrayUtils.remove(paths, 0));
// }
// return navigateElseEmptyObject(jsonElement.getAsJsonObject().get(paths[0]), ArrayUtils.remove(paths, 0));
// }
//
// public static class SectionData {
//
// private JsonElement data;
//
// private List<Section> sectionList = new ArrayList<>();
//
// public boolean hasSection() {
// if (ListTools.isNotEmpty(this.sectionList)) {
// for (Section section : this.sectionList) {
// if (StringUtils.isNotEmpty(section.getPath())) {
// return true;
// }
// }
// }
// return false;
// }
//
// public JsonElement getData() {
// return data;
// }
//
// public void setData(JsonElement data) {
// this.data = data;
// }
//
// public List<Section> getSectionList() {
// return sectionList;
// }
//
// public void setSectionList(List<Section> sectionList) {
// this.sectionList = sectionList;
// }
// }
//
// public static class Section {
//
// public String[] paths() {
// return StringUtils.split(path, ".");
// }
//
// private String path;
//
// private String key;
//
// public String getPath() {
// return path;
// }
//
// public void setPath(String path) {
// this.path = path;
// }
//
// public String getKey() {
// return key;
// }
//
// public void setKey(String key) {
// this.key = key;
// }
// }
//
// public static class Wo extends WoId {
//
// }
//
//}
package com.x.processplatform.service.processing.jaxrs.documentversion;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -67,7 +68,7 @@ class ActionCreate extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
return ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
}
public static class Wi extends DocumentVersion {
......
......@@ -3,6 +3,7 @@ package com.x.processplatform.service.processing.jaxrs.job;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -108,7 +109,7 @@ public class ActionDelete extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(job).submit(callable).get();
return ProcessPlatformExecutorFactory.get(job).submit(callable).get(300, TimeUnit.SECONDS);
}
......
......@@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.BooleanUtils;
......@@ -137,7 +138,7 @@ class ActionCreateWithWork extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wos);
return result;
......
......@@ -6,6 +6,7 @@ import java.util.Date;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import org.apache.commons.lang3.BooleanUtils;
......@@ -149,7 +150,7 @@ class ActionCreateWithWorkCompleted extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wos);
return result;
......
package com.x.processplatform.service.processing.jaxrs.read;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -54,7 +55,7 @@ class ActionDelete extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
......@@ -3,6 +3,7 @@ package com.x.processplatform.service.processing.jaxrs.read;
import java.util.Date;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -77,7 +78,7 @@ class ActionProcessing extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.readcompleted;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -54,7 +55,7 @@ class ActionDelete extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
package com.x.processplatform.service.processing.jaxrs.record;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -46,7 +47,7 @@ class ActionCreateWithJob extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(job).submit(callable).get();
return ProcessPlatformExecutorFactory.get(job).submit(callable).get(300, TimeUnit.SECONDS);
}
......
package com.x.processplatform.service.processing.jaxrs.record;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -49,7 +50,7 @@ class ActionDelete extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(bag.job).submit(callable).get();
return ProcessPlatformExecutorFactory.get(bag.job).submit(callable).get(300, TimeUnit.SECONDS);
}
......
package com.x.processplatform.service.processing.jaxrs.record;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -69,7 +70,7 @@ class ActionEdit extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(bag.job).submit(callable).get();
return ProcessPlatformExecutorFactory.get(bag.job).submit(callable).get(300, TimeUnit.SECONDS);
}
......
......@@ -3,6 +3,7 @@ package com.x.processplatform.service.processing.jaxrs.review;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -75,7 +76,7 @@ class ActionCreateWithWork extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wos);
return result;
......
......@@ -3,6 +3,7 @@ package com.x.processplatform.service.processing.jaxrs.review;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -70,7 +71,7 @@ class ActionCreateWithWorkCompleted extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wos);
return result;
......
package com.x.processplatform.service.processing.jaxrs.review;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -49,7 +50,7 @@ class ActionDelete extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
......@@ -4,6 +4,7 @@ import java.lang.reflect.Type;
import java.util.LinkedHashMap;
import java.util.Objects;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.google.gson.reflect.TypeToken;
......@@ -35,7 +36,7 @@ class ActionTouch extends BaseAction{
}
job = work.getJob();
}
return ProcessPlatformExecutorFactory.get(job).submit(new CallableAction(id, jsonElement)).get();
return ProcessPlatformExecutorFactory.get(job).submit(new CallableAction(id, jsonElement)).get(300, TimeUnit.SECONDS);
}
public class CallableAction implements Callable<ActionResult<Wo>> {
......
package com.x.processplatform.service.processing.jaxrs.snap;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -34,7 +35,7 @@ class ActionDelete extends BaseAction {
}
job = snap.getJob();
}
return ProcessPlatformExecutorFactory.get(job).submit(new CallableImpl(id)).get();
return ProcessPlatformExecutorFactory.get(job).submit(new CallableImpl(id)).get(300, TimeUnit.SECONDS);
}
public class CallableImpl implements Callable<ActionResult<Wo>> {
......
......@@ -3,6 +3,7 @@ package com.x.processplatform.service.processing.jaxrs.snap;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -46,7 +47,7 @@ class ActionRestore extends BaseAction {
}
job = snap.getJob();
}
return ProcessPlatformExecutorFactory.get(job).submit(new CallableImpl(id)).get();
return ProcessPlatformExecutorFactory.get(job).submit(new CallableImpl(id)).get(300, TimeUnit.SECONDS);
}
public class CallableImpl implements Callable<ActionResult<Wo>> {
......
......@@ -3,6 +3,7 @@ package com.x.processplatform.service.processing.jaxrs.snap;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -43,7 +44,7 @@ class ActionTypeAbandoned extends BaseAction {
}
job = work.getJob();
}
return ProcessPlatformExecutorFactory.get(job).submit(new CallableImpl(workId)).get();
return ProcessPlatformExecutorFactory.get(job).submit(new CallableImpl(workId)).get(300, TimeUnit.SECONDS);
}
public class CallableImpl implements Callable<ActionResult<Wo>> {
......
......@@ -3,6 +3,7 @@ package com.x.processplatform.service.processing.jaxrs.snap;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -42,7 +43,7 @@ class ActionTypeSnap extends BaseAction {
}
job = work.getJob();
}
return ProcessPlatformExecutorFactory.get(job).submit(new CallableImpl(workId)).get();
return ProcessPlatformExecutorFactory.get(job).submit(new CallableImpl(workId)).get(300, TimeUnit.SECONDS);
}
public class CallableImpl implements Callable<ActionResult<Wo>> {
......
......@@ -3,6 +3,7 @@ package com.x.processplatform.service.processing.jaxrs.snap;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -43,7 +44,7 @@ class ActionTypeSuspend extends BaseAction {
}
job = work.getJob();
}
return ProcessPlatformExecutorFactory.get(job).submit(new CallableImpl(workId)).get();
return ProcessPlatformExecutorFactory.get(job).submit(new CallableImpl(workId)).get(300, TimeUnit.SECONDS);
}
public class CallableImpl implements Callable<ActionResult<Wo>> {
......
......@@ -3,6 +3,7 @@ package com.x.processplatform.service.processing.jaxrs.task;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import javax.script.Bindings;
import javax.script.CompiledScript;
......@@ -140,7 +141,7 @@ class ActionAppend extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
return ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
}
public static ScriptContext scriptContext(Business business, Work work, Data data, Activity activity, Task task)
......
package com.x.processplatform.service.processing.jaxrs.task;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -54,7 +55,7 @@ class ActionDelete extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
return ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
}
......
package com.x.processplatform.service.processing.jaxrs.task;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -73,7 +74,7 @@ class ActionExpire extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
result.setData(wo);
return result;
......
......@@ -3,6 +3,7 @@ package com.x.processplatform.service.processing.jaxrs.task;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -73,7 +74,7 @@ class ActionGrab extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
return result;
}
......
......@@ -2,6 +2,7 @@ package com.x.processplatform.service.processing.jaxrs.task;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
......@@ -79,7 +80,7 @@ class ActionPassExpired extends BaseAction {
}
};
return ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
return ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
}
......
......@@ -3,6 +3,7 @@ package com.x.processplatform.service.processing.jaxrs.task;
import java.util.Date;
import java.util.Objects;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import javax.script.CompiledScript;
import javax.script.ScriptContext;
......@@ -60,7 +61,7 @@ class ActionProcessing extends BaseAction {
job = task.getJob();
}
return ProcessPlatformExecutorFactory.get(job).submit(new CallableExecute(wi, id)).get();
return ProcessPlatformExecutorFactory.get(job).submit(new CallableExecute(wi, id)).get(300, TimeUnit.SECONDS);
}
......
......@@ -3,6 +3,7 @@ package com.x.processplatform.service.processing.jaxrs.task;
import java.util.Date;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import org.apache.commons.collections4.ListUtils;
import org.apache.commons.lang3.BooleanUtils;
......@@ -105,7 +106,7 @@ class ActionReset extends BaseAction {
}
};
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get();
ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);
return result;
}
......
......@@ -2,6 +2,7 @@ package com.x.processplatform.service.processing.jaxrs.task;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
......@@ -84,7 +85,7 @@ class ActionUpdatePrevTaskIdentity extends BaseAction {
return result;
};
return ProcessPlatformExecutorFactory.get(bag.job).submit(callable).get();
return ProcessPlatformExecutorFactory.get(bag.job).submit(callable).get(300, TimeUnit.SECONDS);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册