提交 63f66846 编写于 作者: O o2null

Merge branch 'feature/soleDirect' into 'wrdp'

增加优先路由立即执行配置项

See merge request o2oa/o2oa!2034
......@@ -72,6 +72,7 @@ public class Route extends SliceJpaObject {
@PostLoad
public void postLoad() {
this.asyncSupported = this.getProperties().getAsyncSupported();
this.soleDirect = this.getProperties().getSoleDirect();
}
public Route() {
......@@ -93,14 +94,26 @@ public class Route extends SliceJpaObject {
return asyncSupported;
}
public Boolean getSoleDirect() {
return soleDirect;
}
public void setAsyncSupported(Boolean asyncSupported) {
this.asyncSupported = asyncSupported;
this.getProperties().setAsyncSupported(asyncSupported);
}
public void setSoleDirect(Boolean soleDirect) {
this.soleDirect = soleDirect;
this.getProperties().setSoleDirect(soleDirect);
}
@Transient
private Boolean asyncSupported;
@Transient
private Boolean soleDirect;
public static final String name_FIELDNAME = "name";
@FieldDescribe("名称.")
@Column(length = length_255B, name = ColumnNamePrefix + name_FIELDNAME)
......
package com.x.processplatform.core.entity.element;
import org.apache.commons.lang3.BooleanUtils;
import com.x.base.core.entity.JsonProperties;
import com.x.base.core.project.annotation.FieldDescribe;
public class RouteProperties extends JsonProperties {
private static final long serialVersionUID = -7792270726211126577L;
@FieldDescribe("是否启用异步返回.")
private Boolean asyncSupported = true;
@FieldDescribe("选择优先路由时是否直接执行路由(一票否决),默认true.")
private Boolean soleDirect;
public Boolean getAsyncSupported() {
return asyncSupported;
}
......@@ -16,4 +23,12 @@ public class RouteProperties extends JsonProperties {
this.asyncSupported = asyncSupported;
}
public Boolean getSoleDirect() {
return BooleanUtils.isNotFalse(soleDirect);
}
public void setSoleDirect(Boolean soleDirect) {
this.soleDirect = soleDirect;
}
}
......@@ -453,8 +453,9 @@ public class ManualProcessor extends AbstractManualProcessor {
boolean passThrough = false;
// 取得本环节已经处理的已办
List<TaskCompleted> taskCompleteds = this.listJoinInquireTaskCompleted(aeiObjects, identities);
// 存在优先路由,如果有人选择了优先路由那么直接流转.
Route soleRoute = aeiObjects.getRoutes().stream().filter(r -> BooleanUtils.isTrue(r.getSole())).findFirst()
// 存在优先路由,如果有人选择了优先路由那么直接流转.需要判断是否启用了soleDirect
Route soleRoute = aeiObjects.getRoutes().stream()
.filter(r -> BooleanUtils.isTrue(r.getSole()) && BooleanUtils.isTrue(r.getSoleDirect())).findFirst()
.orElse(null);
if (null != soleRoute) {
TaskCompleted soleTaskCompleted = taskCompleteds.stream()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册