Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
e248b9b8
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e248b9b8
编写于
9月 07, 2020
作者:
Z
zhourui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
async in route object
上级
a5f59524
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
107 addition
and
68 deletion
+107
-68
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionProcessing.java
...latform/assemble/surface/jaxrs/task/ActionProcessing.java
+8
-6
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ProcessingRunnableImpl.java
...m/assemble/surface/jaxrs/task/ProcessingRunnableImpl.java
+0
-9
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/PersistenceProperties.java
.../x/processplatform/core/entity/PersistenceProperties.java
+16
-0
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Manual.java
...ava/com/x/processplatform/core/entity/element/Manual.java
+12
-12
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/ManualProperties.java
...processplatform/core/entity/element/ManualProperties.java
+0
-11
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Route.java
...java/com/x/processplatform/core/entity/element/Route.java
+44
-4
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/RouteProperties.java
.../processplatform/core/entity/element/RouteProperties.java
+19
-0
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/log/SignalStackLogProperties.java
...essplatform/core/entity/log/SignalStackLogProperties.java
+1
-1
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/Processing.java
.../com/x/processplatform/service/processing/Processing.java
+3
-7
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/ProcessingToProcessingSignalStack.java
...service/processing/ProcessingToProcessingSignalStack.java
+0
-13
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/end/EndProcessor.java
...atform/service/processing/processor/end/EndProcessor.java
+2
-3
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/manual/ManualProcessor.java
.../service/processing/processor/manual/ManualProcessor.java
+1
-1
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/message/MessageProcessor.java
...ervice/processing/processor/message/MessageProcessor.java
+1
-1
未找到文件。
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionProcessing.java
浏览文件 @
e248b9b8
...
...
@@ -84,7 +84,7 @@ class ActionProcessing extends BaseAction {
Business
business
=
new
Business
(
emc
);
init
(
effectivePerson
,
business
,
id
,
jsonElement
);
updateTaskIfNecessary
(
business
);
seeManual
(
business
);
seeManual
Route
(
business
);
}
LinkedBlockingQueue
<
Wo
>
responeQueue
=
new
LinkedBlockingQueue
<>();
...
...
@@ -193,10 +193,9 @@ class ActionProcessing extends BaseAction {
}
}
private
void
seeManual
(
Business
business
)
throws
Exception
{
private
void
seeManual
Route
(
Business
business
)
throws
Exception
{
Manual
manual
=
business
.
manual
().
pick
(
this
.
task
.
getActivity
());
if
(
null
!=
manual
)
{
this
.
asyncSupported
=
BooleanUtils
.
isNotFalse
(
manual
.
getAsyncSupported
());
Route
route
=
null
;
for
(
Route
o
:
business
.
route
().
pick
(
manual
.
getRouteList
()))
{
if
(
StringUtils
.
equals
(
o
.
getName
(),
this
.
task
.
getRouteName
()))
{
...
...
@@ -204,9 +203,12 @@ class ActionProcessing extends BaseAction {
break
;
}
}
if
((
null
!=
route
)
&&
(
StringUtils
.
equals
(
route
.
getType
(),
Route
.
TYPE_APPENDTASK
))
&&
StringUtils
.
equals
(
manual
.
getId
(),
route
.
getActivity
()))
{
this
.
type
=
TYPE_APPENDTASK
;
if
(
null
!=
route
)
{
this
.
asyncSupported
=
BooleanUtils
.
isNotFalse
(
route
.
getAsyncSupported
());
if
(
StringUtils
.
equals
(
route
.
getType
(),
Route
.
TYPE_APPENDTASK
)
&&
StringUtils
.
equals
(
manual
.
getId
(),
route
.
getActivity
()))
{
this
.
type
=
TYPE_APPENDTASK
;
}
}
}
}
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ProcessingRunnableImpl.java
已删除
100644 → 0
浏览文件 @
a5f59524
package
com.x.processplatform.assemble.surface.jaxrs.task
;
public
class
ProcessingRunnableImpl
implements
Runnable
{
public
void
run
()
{
// TODO Auto-generated method stub
}
}
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/PersistenceProperties.java
浏览文件 @
e248b9b8
...
...
@@ -6,7 +6,14 @@ public final class PersistenceProperties extends AbstractPersistenceProperties {
public
static
class
Content
{
private
Content
()
{
}
public
static
class
Draft
{
private
Draft
()
{
}
public
static
final
String
table
=
"PP_C_DRAFT"
;
}
...
...
@@ -203,8 +210,17 @@ public final class PersistenceProperties extends AbstractPersistenceProperties {
}
public
static
class
Log
{
private
Log
()
{
}
public
static
class
SignalStackLog
{
private
SignalStackLog
()
{
}
public
static
final
String
table
=
"PP_L_SIGNALSTACKLOG"
;
}
}
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Manual.java
浏览文件 @
e248b9b8
...
...
@@ -68,7 +68,7 @@ public class Manual extends Activity {
@PostLoad
public
void
postLoad
()
{
this
.
asyncSupported
=
this
.
getProperties
().
getAsyncSupported
();
//
this.asyncSupported = this.getProperties().getAsyncSupported();
}
public
Manual
()
{
...
...
@@ -82,17 +82,17 @@ public class Manual extends Activity {
return
this
.
properties
;
}
public
Boolean
getAsyncSupported
()
{
return
asyncSupported
;
}
public
void
setAsyncSupported
(
Boolean
asyncSupported
)
{
this
.
asyncSupported
=
asyncSupported
;
this
.
getProperties
().
setAsyncSupported
(
asyncSupported
);
}
@Transient
private
Boolean
asyncSupported
;
//
public Boolean getAsyncSupported() {
//
return asyncSupported;
//
}
//
//
public void setAsyncSupported(Boolean asyncSupported) {
//
this.asyncSupported = asyncSupported;
//
this.getProperties().setAsyncSupported(asyncSupported);
//
}
//
//
@Transient
//
private Boolean asyncSupported;
@FieldDescribe
(
"分组"
)
@CheckPersist
(
allowEmpty
=
true
)
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/ManualProperties.java
浏览文件 @
e248b9b8
...
...
@@ -5,15 +5,4 @@ import com.x.base.core.project.annotation.FieldDescribe;
public
class
ManualProperties
extends
JsonProperties
{
@FieldDescribe
(
"是否启用异步返回."
)
private
Boolean
asyncSupported
=
true
;
public
Boolean
getAsyncSupported
()
{
return
asyncSupported
;
}
public
void
setAsyncSupported
(
Boolean
asyncSupported
)
{
this
.
asyncSupported
=
asyncSupported
;
}
}
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Route.java
浏览文件 @
e248b9b8
...
...
@@ -10,11 +10,15 @@ import javax.persistence.Id;
import
javax.persistence.Inheritance
;
import
javax.persistence.InheritanceType
;
import
javax.persistence.Lob
;
import
javax.persistence.PostLoad
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
javax.persistence.UniqueConstraint
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.openjpa.persistence.Persistent
;
import
org.apache.openjpa.persistence.jdbc.Index
;
import
org.apache.openjpa.persistence.jdbc.Strategy
;
import
com.x.base.core.entity.AbstractPersistenceProperties
;
import
com.x.base.core.entity.JpaObject
;
...
...
@@ -58,16 +62,44 @@ public class Route extends SliceJpaObject {
@Column
(
length
=
length_id
,
name
=
ColumnNamePrefix
+
id_FIELDNAME
)
private
String
id
=
createId
();
/* 以上为 JpaObject 默认字段 */
public
void
onPersist
()
throws
Exception
{
/
* 如果脚本为空,添加默认返回true 的脚本 */
/
/ 如果脚本为空,添加默认返回true 的脚本
if
(
StringUtils
.
isEmpty
(
script
)
&&
StringUtils
.
isEmpty
(
scriptText
))
{
this
.
scriptText
=
"return true;"
;
}
}
/* 更新运行方法 */
@PostLoad
public
void
postLoad
()
{
this
.
asyncSupported
=
this
.
getProperties
().
getAsyncSupported
();
}
public
Route
()
{
this
.
properties
=
new
RouteProperties
();
}
public
RouteProperties
getProperties
()
{
if
(
null
==
this
.
properties
)
{
this
.
properties
=
new
RouteProperties
();
}
return
this
.
properties
;
}
public
void
setProperties
(
RouteProperties
properties
)
{
this
.
properties
=
properties
;
}
public
Boolean
getAsyncSupported
()
{
return
asyncSupported
;
}
public
void
setAsyncSupported
(
Boolean
asyncSupported
)
{
this
.
asyncSupported
=
asyncSupported
;
this
.
getProperties
().
setAsyncSupported
(
asyncSupported
);
}
@Transient
private
Boolean
asyncSupported
;
public
static
final
String
name_FIELDNAME
=
"name"
;
@FieldDescribe
(
"名称."
)
...
...
@@ -270,6 +302,14 @@ public class Route extends SliceJpaObject {
@Column
(
length
=
JpaObject
.
length_255B
,
name
=
ColumnNamePrefix
+
edition_FIELDNAME
)
private
String
edition
;
public
static
final
String
properties_FIELDNAME
=
"properties"
;
@FieldDescribe
(
"属性对象存储字段."
)
@Persistent
(
fetch
=
FetchType
.
EAGER
)
@Strategy
(
JsonPropertiesValueHandler
)
@Column
(
length
=
JpaObject
.
length_10M
,
name
=
ColumnNamePrefix
+
properties_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
private
RouteProperties
properties
;
public
String
getAppendTaskIdentityType
()
{
return
appendTaskIdentityType
;
}
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/RouteProperties.java
0 → 100644
浏览文件 @
e248b9b8
package
com.x.processplatform.core.entity.element
;
import
com.x.base.core.entity.JsonProperties
;
import
com.x.base.core.project.annotation.FieldDescribe
;
public
class
RouteProperties
extends
JsonProperties
{
@FieldDescribe
(
"是否启用异步返回."
)
private
Boolean
asyncSupported
=
true
;
public
Boolean
getAsyncSupported
()
{
return
asyncSupported
;
}
public
void
setAsyncSupported
(
Boolean
asyncSupported
)
{
this
.
asyncSupported
=
asyncSupported
;
}
}
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/log/SignalStackLogProperties.java
浏览文件 @
e248b9b8
...
...
@@ -6,7 +6,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
public
class
SignalStackLogProperties
extends
JsonProperties
{
private
static
final
long
serialVersionUID
=
5194057760551594662L
;
@FieldDescribe
(
"
型
号栈."
)
@FieldDescribe
(
"
信
号栈."
)
private
SignalStack
signalStack
;
public
SignalStack
getSignalStack
()
{
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/Processing.java
浏览文件 @
e248b9b8
package
com.x.processplatform.service.processing
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
org.apache.commons.collections4.list.SetUniqueList
;
...
...
@@ -10,11 +9,8 @@ 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.entity.annotation.CheckPersistType
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.core.entity.content.Work
;
import
com.x.processplatform.core.entity.log.SignalStackLog
;
import
com.x.processplatform.core.express.ProcessingAttributes
;
import
com.x.processplatform.service.processing.configurator.ProcessingConfigurator
;
...
...
@@ -64,9 +60,9 @@ public class Processing extends BaseProcessing {
if
(
StringUtils
.
isEmpty
(
workId
))
{
return
;
}
/
* workStatus is processing */
/
/ workStatus is processing
List
<
String
>
nextLoops
=
SetUniqueList
.
setUniqueList
(
new
ArrayList
<
String
>());
/
* 强制从arrived开始 */
/
/ 强制从arrived开始
if
(
BooleanUtils
.
isTrue
(
processingAttributes
.
ifForceJoinAtArrive
()))
{
workId
=
this
.
arrive
(
workId
,
processingConfigurator
,
processingAttributes
);
}
...
...
@@ -80,7 +76,7 @@ public class Processing extends BaseProcessing {
if
(
BooleanUtils
.
isFalse
(
processingAttributes
.
ifForceJoinAtInquire
()))
{
executed
=
this
.
execute
(
workId
,
processingConfigurator
,
processingAttributes
);
}
else
{
/
* 强制从inquire开始 */
/
/ 强制从inquire开始
executed
=
new
ArrayList
<>();
executed
.
add
(
workId
);
}
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/ProcessingToProcessingSignalStack.java
浏览文件 @
e248b9b8
...
...
@@ -27,17 +27,4 @@ public class ProcessingToProcessingSignalStack extends ConcurrentHashMap<String,
return
work
+
SPLIT
+
series
;
}
// @Test
// public void test() {
// ProcessingToProcessingSignalMapping m = new ProcessingToProcessingSignalMapping();
// Signal s1 = m.open("111", "222");
// System.out.println(s1);
// Signal s2 = m.open("111", "222");
// System.out.println(s2);
// System.out.println(s2==s1);
// m.close("111", "222");
// m.close("111", "222");
// System.out.println(m.size());
// }
}
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/end/EndProcessor.java
浏览文件 @
e248b9b8
...
...
@@ -48,9 +48,8 @@ public class EndProcessor extends AbstractEndProcessor {
aeiObjects
.
getProcessingAttributes
().
push
(
Signal
.
endExecute
());
List
<
Work
>
results
=
new
ArrayList
<>();
Work
other
=
aeiObjects
.
getWorks
().
stream
().
filter
(
o
->
{
return
o
!=
aeiObjects
.
getWork
();
}).
sorted
(
Comparator
.
comparing
(
Work:
:
getCreateTime
)).
findFirst
().
orElse
(
null
);
Work
other
=
aeiObjects
.
getWorks
().
stream
().
filter
(
o
->
o
!=
aeiObjects
.
getWork
())
.
sorted
(
Comparator
.
comparing
(
Work:
:
getCreateTime
)).
findFirst
().
orElse
(
null
);
if
(
null
!=
other
)
{
aeiObjects
.
getUpdateWorks
().
add
(
other
);
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/manual/ManualProcessor.java
浏览文件 @
e248b9b8
...
...
@@ -293,7 +293,7 @@ public class ManualProcessor extends AbstractManualProcessor {
logger
.
info
(
"工作设置的处理人已经全部无效,重新计算当前环节所有处理人进行处理,标题:{}, id:{}, 设置的处理人:{}."
,
aeiObjects
.
getWork
().
getTitle
(),
aeiObjects
.
getWork
().
getId
(),
identities
);
// 后面进行了identitis.remove()这里必须用一个新对象包装
aeiObjects
.
getWork
().
setManualTaskIdentityList
(
new
ArrayList
<
String
>(
identities
));
aeiObjects
.
getWork
().
setManualTaskIdentityList
(
new
ArrayList
<>(
identities
));
}
// 发送ProcessingSignal
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/message/MessageProcessor.java
浏览文件 @
e248b9b8
...
...
@@ -36,7 +36,7 @@ public class MessageProcessor extends AbstractMessageProcessor {
@Override
protected
List
<
Work
>
executing
(
AeiObjects
aeiObjects
,
Message
message
)
throws
Exception
{
// 发送ProcessingSignal
aeiObjects
.
getProcessingAttributes
().
push
(
Signal
.
embed
Execute
());
aeiObjects
.
getProcessingAttributes
().
push
(
Signal
.
message
Execute
());
MessageFactory
.
activity_message
(
aeiObjects
.
getWork
(),
null
);
List
<
Work
>
results
=
new
ArrayList
<>();
results
.
add
(
aeiObjects
.
getWork
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录