Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fuyue82
o2oa
提交
1ac5297a
o2oa
项目概览
fuyue82
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
0
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,发现更多精彩内容 >>
提交
1ac5297a
编写于
2月 17, 2022
作者:
R
Ray
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化embed
上级
c233924c
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
67 addition
and
150 deletion
+67
-150
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Embed.java
...java/com/x/processplatform/core/entity/element/Embed.java
+12
-12
o2server/x_processplatform_core_entity/src/test/resources/test.json
..._processplatform_core_entity/src/test/resources/test.json
+0
-100
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/ThisApplication.java
...x/processplatform/service/processing/ThisApplication.java
+0
-4
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/cancel/CancelProcessor.java
.../service/processing/processor/cancel/CancelProcessor.java
+0
-1
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/embed/EmbedProcessor.java
...rm/service/processing/processor/embed/EmbedProcessor.java
+53
-16
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/embed/SyncEmbedQueue.java
...rm/service/processing/processor/embed/SyncEmbedQueue.java
+0
-14
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_core_entity/src/main/java/com/x/processplatform/core/entity/element/Embed.java
浏览文件 @
1ac5297a
...
...
@@ -615,11 +615,11 @@ public class Embed extends Activity {
@CheckPersist
(
allowEmpty
=
true
)
private
String
targetAssginDataScriptText
;
public
static
final
String
async_FIELDNAME
=
"async"
;
@FieldDescribe
(
"是否是异步调用"
)
@Column
(
name
=
ColumnNamePrefix
+
async_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
private
Boolean
async
;
//
public static final String async_FIELDNAME = "async";
//
@FieldDescribe("是否是异步调用")
//
@Column(name = ColumnNamePrefix + async_FIELDNAME)
//
@CheckPersist(allowEmpty = true)
//
private Boolean async;
@IdReference
(
Script
.
class
)
@FieldDescribe
(
"生成displayLog脚本."
)
...
...
@@ -1101,13 +1101,13 @@ public class Embed extends Activity {
this
.
reviewGroupList
=
reviewGroupList
;
}
public
Boolean
getAsync
()
{
return
async
;
}
public
void
setAsync
(
Boolean
async
)
{
this
.
async
=
async
;
}
//
public Boolean getAsync() {
//
return async;
//
}
//
//
public void setAsync(Boolean async) {
//
this.async = async;
//
}
public
String
getGroup
()
{
return
group
;
...
...
o2server/x_processplatform_core_entity/src/test/resources/test.json
已删除
100644 → 0
浏览文件 @
c233924c
{
"$attachmentList"
:
[],
"$work"
:
{
"activityName"
:
"部门审核"
,
"application"
:
"690f3614-5fb8-464e-a4c6-64972c46c6c8"
,
"applicationAlias"
:
""
,
"applicationName"
:
"公文管理"
,
"creatorIdentity"
:
"李义@50747cd3-141e-48a2-b2d6-b06853cae667@I"
,
"creatorPerson"
:
"李义@liyi@P"
,
"creatorUnit"
:
"开发部@22@U"
,
"creatorUnitLevelName"
:
"兰德纵横/开发部"
,
"job"
:
"614679ae-0564-48a2-a1ba-6a3bda66858c"
,
"manualTaskIdentityText"
:
"周睿"
,
"process"
:
"2f4530a6-c199-4915-84c9-cb1675cbd444"
,
"processAlias"
:
"发文"
,
"processName"
:
"发文管理"
,
"serial"
:
""
,
"startTime"
:
"2019-09-03 16:33:40"
,
"startTimeMonth"
:
"2019-09"
,
"title"
:
"李义测试一下附件的阅读权限问题"
,
"workId"
:
"19f56ec0-40df-4e27-b987-ee667d67b4ff"
},
"arrays"
:
[
"aaa"
,
"bbb"
,
"ccc"
,
"ddd"
],
"attachment"
:
[
"工作流需求文档v3.pdf"
,
"前端调用写法.docx"
,
"表单管理需求说明v1.pdf"
],
"copies"
:
""
,
"copySend"
:
[],
"fileno"
:
"2019"
,
"mainSend"
:
[
{
"control"
:
{
"allowDelete"
:
false
,
"allowEdit"
:
false
},
"controllerList"
:
[],
"createTime"
:
"2018-10-26 08:50:16"
,
"description"
:
""
,
"distinguishedName"
:
"开发部@22@U"
,
"id"
:
"d5356fd4-6675-45ad-9a00-5eff20b83dfa"
,
"inheritedControllerList"
:
[],
"level"
:
2.0
,
"levelName"
:
"兰德纵横/开发部"
,
"name"
:
"开发部"
,
"orderNumber"
:
2.147483247E9
,
"pinyin"
:
"kaifabu"
,
"pinyinInitial"
:
"kfb"
,
"qiyeweixinHash"
:
"4eecf48995e828b63235ea6556ae368d51220b13f677568da837688676d4017b"
,
"qiyeweixinId"
:
"22"
,
"shortName"
:
""
,
"subDirectIdentityCount"
:
27.0
,
"subDirectUnitCount"
:
0.0
,
"superior"
:
"f3264577-136f-43af-b9f7-5b739d17f2e0"
,
"typeList"
:
[
"一级部门"
],
"unique"
:
"22"
,
"updateTime"
:
"2019-08-08 14:48:15"
,
"woSupNestedUnitList"
:
[
{
"control"
:
{
"allowDelete"
:
false
,
"allowEdit"
:
false
},
"controllerList"
:
[],
"createTime"
:
"2018-10-26 08:50:12"
,
"description"
:
""
,
"distinguishedName"
:
"兰德纵横@1@U"
,
"id"
:
"f3264577-136f-43af-b9f7-5b739d17f2e0"
,
"inheritedControllerList"
:
[],
"level"
:
1.0
,
"levelName"
:
"兰德纵横"
,
"name"
:
"兰德纵横"
,
"orderNumber"
:
2.0
,
"pinyin"
:
"landezongheng"
,
"pinyinInitial"
:
"ldzh"
,
"qiyeweixinHash"
:
"6e4879547dae8ea033f679bbc2d76c1212ef5219f6f41c956082c92ac9707e84"
,
"qiyeweixinId"
:
"1"
,
"shortName"
:
""
,
"subDirectIdentityCount"
:
0.0
,
"subDirectUnitCount"
:
0.0
,
"superior"
:
""
,
"typeList"
:
[],
"unique"
:
"1"
,
"updateTime"
:
"2018-11-30 15:32:18"
}
]
}
],
"office"
:
""
,
"subject"
:
"李义测试一下附件的阅读权限问题"
,
"urgency"
:
"一般"
}
\ No newline at end of file
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/ThisApplication.java
浏览文件 @
1ac5297a
...
...
@@ -6,7 +6,6 @@ import com.x.base.core.project.Context;
import
com.x.base.core.project.cache.CacheManager
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.message.MessageConnector
;
import
com.x.processplatform.service.processing.processor.embed.SyncEmbedQueue
;
import
com.x.processplatform.service.processing.processor.invoke.SyncJaxrsInvokeQueue
;
import
com.x.processplatform.service.processing.processor.invoke.SyncJaxwsInvokeQueue
;
import
com.x.processplatform.service.processing.schedule.DeleteDraft
;
...
...
@@ -30,8 +29,6 @@ public class ThisApplication {
public
static
final
SyncJaxwsInvokeQueue
syncJaxwsInvokeQueue
=
new
SyncJaxwsInvokeQueue
();
public
static
final
SyncEmbedQueue
syncEmbedQueue
=
new
SyncEmbedQueue
();
private
static
ProcessingToProcessingSignalStack
processingToProcessingSignalStack
=
new
ProcessingToProcessingSignalStack
();
public
static
ProcessingToProcessingSignalStack
getProcessingToProcessingSignalStack
()
{
...
...
@@ -48,7 +45,6 @@ public class ThisApplication {
MessageConnector
.
start
(
context
());
context
().
startQueue
(
syncJaxrsInvokeQueue
);
context
().
startQueue
(
syncJaxwsInvokeQueue
);
context
().
startQueue
(
syncEmbedQueue
);
if
(
BooleanUtils
.
isTrue
(
Config
.
processPlatform
().
getMerge
().
getEnable
()))
{
context
.
schedule
(
Merge
.
class
,
Config
.
processPlatform
().
getMerge
().
getCron
());
}
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/cancel/CancelProcessor.java
浏览文件 @
1ac5297a
...
...
@@ -95,7 +95,6 @@ public class CancelProcessor extends AbstractCancelProcessor {
try
{
Work
parent
=
aeiObjects
.
entityManagerContainer
()
.
find
(
aeiObjects
.
getWork
().
getProperties
().
getParentWork
(),
Work
.
class
);
aeiObjects
.
entityManagerContainer
().
get
(
Work
.
class
).
detach
(
parent
);
if
((
null
!=
parent
)
&&
Objects
.
equals
(
parent
.
getActivityType
(),
ActivityType
.
embed
))
{
Embed
embed
=
(
Embed
)
aeiObjects
.
business
().
element
().
get
(
parent
.
getActivity
(),
parent
.
getActivityType
());
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/embed/EmbedProcessor.java
浏览文件 @
1ac5297a
...
...
@@ -27,7 +27,6 @@ import com.x.processplatform.core.express.service.processing.jaxrs.work.ActionAs
import
com.x.processplatform.core.express.service.processing.jaxrs.work.ActionAssignCreateWi.WiAttachment
;
import
com.x.processplatform.core.express.service.processing.jaxrs.work.ActionAssignCreateWo
;
import
com.x.processplatform.service.processing.Business
;
import
com.x.processplatform.service.processing.ThisApplication
;
import
com.x.processplatform.service.processing.WrapScriptObject
;
import
com.x.processplatform.service.processing.processor.AeiObjects
;
...
...
@@ -60,19 +59,61 @@ public class EmbedProcessor extends AbstractEmbedProcessor {
// 发送ProcessingSignal
aeiObjects
.
getProcessingAttributes
().
push
(
Signal
.
embedExecute
(
aeiObjects
.
getWork
().
getActivityToken
(),
embed
));
List
<
Work
>
results
=
new
ArrayList
<>();
if
(
StringUtils
.
isBlank
(
aeiObjects
.
getWork
().
getEmbedTargetWork
()))
{
int
blinker
=
blinker
(
BooleanUtils
.
isTrue
(
embed
.
getWaitUntilCompleted
()),
aeiObjects
.
getWork
().
getEmbedTargetWork
(),
aeiObjects
.
getWork
().
getProperties
().
getEmbedCompleted
());
switch
(
blinker
)
{
case
0
:
// waitUntilCompleted:false, embedTargetWork:false, embedCompleted:false
case
1
:
// waitUntilCompleted:false, embedTargetWork:false, embedCompleted:true X
embed
(
aeiObjects
,
embed
);
if
(
BooleanUtils
.
isTrue
(
embed
.
getAsync
())
||
BooleanUtils
.
isNotTrue
(
embed
.
getWaitUntilCompleted
()))
{
results
.
add
(
aeiObjects
.
getWork
());
}
}
else
if
(
BooleanUtils
.
isNotTrue
(
embed
.
getWaitUntilCompleted
())
||
StringUtils
.
isNotBlank
(
aeiObjects
.
getWork
().
getProperties
().
getEmbedCompleted
()))
{
// 如果设置了停留至子流程结束,需要等待回写的标记.
results
.
add
(
aeiObjects
.
getWork
());
break
;
case
2
:
// waitUntilCompleted:false, embedTargetWork:true, embedCompleted:false
case
3
:
// waitUntilCompleted:false, embedTargetWork:true, embedCompleted:true X
results
.
add
(
aeiObjects
.
getWork
());
break
;
case
4
:
// waitUntilCompleted:true, embedTargetWork:false, embedCompleted:false
embed
(
aeiObjects
,
embed
);
break
;
case
5
:
// waitUntilCompleted:true, embedTargetWork:false, embedCompleted:true
// impossible
results
.
add
(
aeiObjects
.
getWork
());
break
;
case
6
:
// waitUntilCompleted:true, embedTargetWork:true, embedCompleted:false
// wait
break
;
case
7
:
// waitUntilCompleted:true, embedTargetWork:true, embedCompleted:true
results
.
add
(
aeiObjects
.
getWork
());
break
;
default
:
break
;
}
// if (StringUtils.isBlank(aeiObjects.getWork().getEmbedTargetWork())) {
// embed(aeiObjects, embed);
// if (BooleanUtils.isTrue(embed.getAsync()) || BooleanUtils.isNotTrue(embed.getWaitUntilCompleted())) {
// results.add(aeiObjects.getWork());
// }
// } else if (BooleanUtils.isNotTrue(embed.getWaitUntilCompleted())
// || StringUtils.isNotBlank(aeiObjects.getWork().getProperties().getEmbedCompleted())) {
// // 如果设置了停留至子流程结束,需要等待回写的标记.
// results.add(aeiObjects.getWork());
// }
return
results
;
}
private
int
blinker
(
boolean
waitUntilCompleted
,
String
embedTargetWork
,
String
embedCompleted
)
{
int
value
=
0
;
if
(
waitUntilCompleted
)
{
value
+=
4
;
}
if
(
StringUtils
.
isNotBlank
(
embedTargetWork
))
{
value
+=
2
;
}
if
(
StringUtils
.
isNotBlank
(
embedCompleted
))
{
value
+=
1
;
}
return
value
;
}
private
void
embed
(
AeiObjects
aeiObjects
,
Embed
embed
)
throws
Exception
{
ActionAssignCreateWi
assignData
=
new
ActionAssignCreateWi
();
String
targetApplication
=
embed
.
getTargetApplication
();
...
...
@@ -123,14 +164,10 @@ public class EmbedProcessor extends AbstractEmbedProcessor {
}
LOGGER
.
debug
(
"embed:{}, process:{} try to embed application:{}, process:{}, assignData:{}."
,
embed:
:
getName
,
embed:
:
getProcess
,
embed:
:
getTargetApplication
,
embed:
:
getTargetProcess
,
assignData:
:
toString
);
if
(
BooleanUtils
.
isTrue
(
embed
.
getAsync
()))
{
ThisApplication
.
syncEmbedQueue
.
send
(
assignData
);
}
else
{
EmbedExecutor
executor
=
new
EmbedExecutor
();
ActionAssignCreateWo
wo
=
executor
.
execute
(
assignData
);
aeiObjects
.
getWork
().
setEmbedTargetWork
(
wo
.
getId
());
aeiObjects
.
getWork
().
setEmbedTargetJob
(
wo
.
getJob
());
}
EmbedExecutor
executor
=
new
EmbedExecutor
();
ActionAssignCreateWo
wo
=
executor
.
execute
(
assignData
);
aeiObjects
.
getWork
().
setEmbedTargetWork
(
wo
.
getId
());
aeiObjects
.
getWork
().
setEmbedTargetJob
(
wo
.
getJob
());
}
@Override
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/embed/SyncEmbedQueue.java
已删除
100644 → 0
浏览文件 @
c233924c
package
com.x.processplatform.service.processing.processor.embed
;
import
com.x.base.core.project.queue.AbstractQueue
;
import
com.x.processplatform.core.express.service.processing.jaxrs.work.ActionAssignCreateWi
;
public
class
SyncEmbedQueue
extends
AbstractQueue
<
ActionAssignCreateWi
>
{
@Override
protected
void
execute
(
ActionAssignCreateWi
o
)
throws
Exception
{
EmbedExecutor
executor
=
new
EmbedExecutor
();
executor
.
execute
(
o
);
}
}
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/end/EndProcessor.java
浏览文件 @
1ac5297a
...
...
@@ -168,10 +168,9 @@ public class EndProcessor extends AbstractEndProcessor {
try
{
Work
parent
=
aeiObjects
.
entityManagerContainer
()
.
find
(
aeiObjects
.
getWork
().
getProperties
().
getParentWork
(),
Work
.
class
);
aeiObjects
.
entityManagerContainer
().
get
(
Work
.
class
).
detach
(
parent
);
if
((
null
!=
parent
)
&&
Objects
.
equals
(
parent
.
getActivityType
(),
ActivityType
.
embed
))
{
Embed
embed
=
(
Embed
)
aeiObjects
.
business
().
element
().
get
(
parent
.
getActivity
(),
parent
.
getActivityType
());
Embed
embed
=
(
Embed
)
aeiObjects
.
business
().
element
().
get
(
parent
.
getActivity
(),
ActivityType
.
embed
);
if
((
null
!=
embed
)
&&
BooleanUtils
.
isTrue
(
embed
.
getWaitUntilCompleted
()))
{
updateParentWork
(
aeiObjects
,
parent
,
embed
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录