提交 a8e6be15 编写于 作者: O o2null

Merge branch 'fix/流程撤回到未设置表单节点打开异常未找到表单' into 'wrdp'

[流程平台]修复流程撤回到未设置表单节点打开异常报未找到表单的问题

See merge request o2oa/o2oa!2620
...@@ -92,14 +92,16 @@ public class ElementFactory extends AbstractFactory { ...@@ -92,14 +92,16 @@ public class ElementFactory extends AbstractFactory {
t = (T) optional.get(); t = (T) optional.get();
} else { } else {
t = this.entityManagerContainer().find(id, clz); t = this.entityManagerContainer().find(id, clz);
CacheManager.put(cacheCategory, cacheKey, t); if(t != null) {
CacheManager.put(cacheCategory, cacheKey, t);
}
} }
return t; return t;
} }
public Activity getActivity(String id) throws Exception { public Activity getActivity(String id) throws Exception {
Activity activity = null; Activity activity = null;
activity = this.get(id, ActivityType.agent); activity = this.get(id, ActivityType.manual);
if (null == activity) { if (null == activity) {
activity = this.get(id, ActivityType.begin); activity = this.get(id, ActivityType.begin);
if (null == activity) { if (null == activity) {
...@@ -111,11 +113,11 @@ public class ElementFactory extends AbstractFactory { ...@@ -111,11 +113,11 @@ public class ElementFactory extends AbstractFactory {
if (null == activity) { if (null == activity) {
activity = this.get(id, ActivityType.embed); activity = this.get(id, ActivityType.embed);
if (null == activity) { if (null == activity) {
activity = this.get(id, ActivityType.end); activity = this.get(id, ActivityType.split);
if (null == activity) { if (null == activity) {
activity = this.get(id, ActivityType.invoke); activity = this.get(id, ActivityType.invoke);
if (null == activity) { if (null == activity) {
activity = this.get(id, ActivityType.manual); activity = this.get(id, ActivityType.agent);
if (null == activity) { if (null == activity) {
activity = this.get(id, ActivityType.merge); activity = this.get(id, ActivityType.merge);
if (null == activity) { if (null == activity) {
...@@ -125,7 +127,7 @@ public class ElementFactory extends AbstractFactory { ...@@ -125,7 +127,7 @@ public class ElementFactory extends AbstractFactory {
if (null == activity) { if (null == activity) {
activity = this.get(id, ActivityType.service); activity = this.get(id, ActivityType.service);
if (null == activity) { if (null == activity) {
activity = this.get(id, ActivityType.split); activity = this.get(id, ActivityType.end);
} }
} }
} }
...@@ -735,4 +737,4 @@ public class ElementFactory extends AbstractFactory { ...@@ -735,4 +737,4 @@ public class ElementFactory extends AbstractFactory {
} }
return compiledScript; return compiledScript;
} }
} }
\ No newline at end of file
...@@ -25,6 +25,7 @@ import com.x.processplatform.core.entity.content.Work; ...@@ -25,6 +25,7 @@ import com.x.processplatform.core.entity.content.Work;
import com.x.processplatform.core.entity.content.WorkLog; import com.x.processplatform.core.entity.content.WorkLog;
import com.x.processplatform.core.entity.element.Activity; import com.x.processplatform.core.entity.element.Activity;
import com.x.processplatform.core.entity.element.Application; import com.x.processplatform.core.entity.element.Application;
import com.x.processplatform.core.entity.element.Form;
import com.x.processplatform.core.entity.element.Process; import com.x.processplatform.core.entity.element.Process;
import com.x.processplatform.core.entity.element.util.WorkLogTree; import com.x.processplatform.core.entity.element.util.WorkLogTree;
import com.x.processplatform.core.entity.element.util.WorkLogTree.Node; import com.x.processplatform.core.entity.element.util.WorkLogTree.Node;
...@@ -99,7 +100,10 @@ class V2Retract extends BaseAction { ...@@ -99,7 +100,10 @@ class V2Retract extends BaseAction {
} }
if (StringUtils.isNotEmpty(activity.getForm())) { if (StringUtils.isNotEmpty(activity.getForm())) {
work.setForm(activity.getForm()); Form form = business.element().get(activity.getForm(), Form.class);
if (null != form) {
work.setForm(activity.getForm());
}
} }
update(work, workLog); update(work, workLog);
...@@ -269,4 +273,4 @@ class V2Retract extends BaseAction { ...@@ -269,4 +273,4 @@ class V2Retract extends BaseAction {
public static class Wo extends WrapBoolean { public static class Wo extends WrapBoolean {
} }
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册