Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
z_stack
Activiti
提交
27f551dc
A
Activiti
项目概览
z_stack
/
Activiti
12 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
Activiti
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
27f551dc
编写于
10月 15, 2018
作者:
F
ffazzini
提交者:
salaboy
1月 08, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Temp PR for adding missing code - do not merge yet
上级
043b7ed4
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
21 addition
and
19 deletion
+21
-19
activiti-api-impl/activiti-api-process-runtime-impl/src/main/java/org/activiti/runtime/api/connector/ConnectorActionDefinitionFinder.java
...untime/api/connector/ConnectorActionDefinitionFinder.java
+7
-2
activiti-api-impl/activiti-api-process-runtime-impl/src/main/java/org/activiti/runtime/api/connector/DefaultServiceTaskBehavior.java
...iti/runtime/api/connector/DefaultServiceTaskBehavior.java
+4
-7
activiti-api-impl/activiti-api-process-runtime-impl/src/main/java/org/activiti/runtime/api/connector/IntegrationContextBuilder.java
...viti/runtime/api/connector/IntegrationContextBuilder.java
+2
-2
activiti-api-impl/activiti-api-process-runtime-impl/src/main/java/org/conf/activiti/runtime/api/ConnectorsAutoConfiguration.java
...onf/activiti/runtime/api/ConnectorsAutoConfiguration.java
+4
-4
activiti-spring-boot-starter/src/test/resources/connectors/process-image.json
...-starter/src/test/resources/connectors/process-image.json
+2
-2
activiti-spring-boot-starter/src/test/resources/connectors/tag-image.json
...boot-starter/src/test/resources/connectors/tag-image.json
+2
-2
未找到文件。
activiti-api-impl/activiti-api-process-runtime-impl/src/main/java/org/activiti/runtime/api/connector/ConnectorActionDefinitionFinder.java
浏览文件 @
27f551dc
...
...
@@ -10,8 +10,13 @@ import org.apache.commons.lang3.StringUtils;
public
class
ConnectorActionDefinitionFinder
{
public
Optional
<
ActionDefinition
>
find
(
String
implementation
,
List
<
ConnectorDefinition
>
connectorDefinitions
)
{
private
final
List
<
ConnectorDefinition
>
connectorDefinitions
;
public
ConnectorActionDefinitionFinder
(
List
<
ConnectorDefinition
>
connectorDefinitions
)
{
this
.
connectorDefinitions
=
connectorDefinitions
;
}
public
Optional
<
ActionDefinition
>
find
(
String
implementation
){
Optional
<
ActionDefinition
>
actionDefinitionOptional
=
Optional
.
empty
();
...
...
activiti-api-impl/activiti-api-process-runtime-impl/src/main/java/org/activiti/runtime/api/connector/DefaultServiceTaskBehavior.java
浏览文件 @
27f551dc
...
...
@@ -44,12 +44,10 @@ public class DefaultServiceTaskBehavior extends AbstractBpmnActivityBehavior {
public
DefaultServiceTaskBehavior
(
ApplicationContext
applicationContext
,
IntegrationContextBuilder
integrationContextBuilder
,
List
<
ConnectorDefinition
>
connectorDefinitions
,
ConnectorActionDefinitionFinder
connectorActionDefinitionFinder
,
VariablesMatchHelper
variablesMatchHelper
)
{
this
.
applicationContext
=
applicationContext
;
this
.
integrationContextBuilder
=
integrationContextBuilder
;
this
.
connectorDefinitions
=
connectorDefinitions
;
this
.
connectorActionDefinitionFinder
=
connectorActionDefinitionFinder
;
this
.
variablesMatchHelper
=
variablesMatchHelper
;
}
...
...
@@ -67,8 +65,7 @@ public class DefaultServiceTaskBehavior extends AbstractBpmnActivityBehavior {
List
<
VariableDefinition
>
outBoundVariableDefinitions
=
null
;
if
(
connectorActionDefinitionFinder
!=
null
&&
connectorDefinitions
!=
null
)
{
Optional
<
ActionDefinition
>
actionDefinitionOptional
=
connectorActionDefinitionFinder
.
find
(
implementation
,
connectorDefinitions
);
Optional
<
ActionDefinition
>
actionDefinitionOptional
=
connectorActionDefinitionFinder
.
find
(
implementation
);
ActionDefinition
actionDefinition
=
null
;
if
(
actionDefinitionOptional
.
isPresent
())
{
actionDefinition
=
actionDefinitionOptional
.
get
();
...
...
@@ -83,11 +80,11 @@ public class DefaultServiceTaskBehavior extends AbstractBpmnActivityBehavior {
Connector
.
class
);
}
outBoundVariableDefinitions
=
actionDefinition
==
null
?
null
:
actionDefinition
.
getOutput
();
}
else
{
}
else
{
context
=
integrationContextBuilder
.
from
(
execution
,
null
);
null
);
connector
=
applicationContext
.
getBean
(
implementation
,
Connector
.
class
);
Connector
.
class
);
}
IntegrationContext
results
=
connector
.
execute
(
context
);
...
...
activiti-api-impl/activiti-api-process-runtime-impl/src/main/java/org/activiti/runtime/api/connector/IntegrationContextBuilder.java
浏览文件 @
27f551dc
...
...
@@ -68,7 +68,7 @@ public class IntegrationContextBuilder {
integrationContext
.
setParentProcessInstanceId
(
processInstance
.
getParentProcessInstanceId
());
}
}
String
implementation
=
((
ServiceTask
)
execution
.
getCurrentFlowElement
()).
getImplementation
();
integrationContext
.
setConnectorType
(
implementation
);
...
...
@@ -79,7 +79,7 @@ public class IntegrationContextBuilder {
return
integrationContext
;
}
private
Map
<
String
,
Object
>
buildInBoundVariables
(
ActionDefinition
actionDefinition
,
DelegateExecution
execution
)
{
...
...
activiti-api-impl/activiti-api-process-runtime-impl/src/main/java/org/conf/activiti/runtime/api/ConnectorsAutoConfiguration.java
浏览文件 @
27f551dc
...
...
@@ -36,11 +36,11 @@ import java.util.List;
public
class
ConnectorsAutoConfiguration
{
@Autowired
private
Connector
Service
connector
Service
;
private
Connector
DefinitionService
connectorDefinition
Service
;
@Bean
public
List
<
ConnectorDefinition
>
connectorDefinitions
()
throws
IOException
{
return
connectorService
.
get
();
return
connector
Definition
Service
.
get
();
}
@Bean
...
...
@@ -53,12 +53,12 @@ public class ConnectorsAutoConfiguration {
public
DefaultServiceTaskBehavior
defaultServiceTaskBehavior
(
ApplicationContext
applicationContext
,
IntegrationContextBuilder
integrationContextBuilder
,
ConnectorActionDefinitionFinder
connectorActionDefinitionFinder
,
VariablesMatchHelper
variablesMatchHelper
)
throws
IOException
{
return
new
DefaultServiceTaskBehavior
(
applicationContext
,
integrationContextBuilder
,
connector
Definitions
(),
connector
ActionDefinitionFinder
,
variablesMatchHelper
);
integrationContextBuilder
,
connectorActionDefinitionFinder
,
variablesMatchHelper
);
}
@Bean
public
ConnectorActionDefinitionFinder
connectorActionDefinitionFinder
()
{
return
new
ConnectorActionDefinitionFinder
();
return
new
ConnectorActionDefinitionFinder
(
connectorDefinitions
()
);
}
@Bean
...
...
activiti-spring-boot-starter/src/test/resources/connectors/process-image.json
浏览文件 @
27f551dc
...
...
@@ -8,7 +8,7 @@
"id"
:
"processImageActionId"
,
"name"
:
"processImageActionName"
,
"description"
:
"..."
,
"input"
:
[
"input
s
"
:
[
{
"id"
:
"input-variable-1"
,
"name"
:
"input-variable-name-1"
,
...
...
@@ -24,7 +24,7 @@
"description"
:
""
}
],
"output"
:
[
"output
s
"
:
[
{
"id"
:
"approved"
,
"name"
:
"approved"
,
...
...
activiti-spring-boot-starter/src/test/resources/connectors/tag-image.json
浏览文件 @
27f551dc
...
...
@@ -8,7 +8,7 @@
"id"
:
"tagImageActionId"
,
"name"
:
"tagImageActionName"
,
"description"
:
"..."
,
"input"
:
[
"input
s
"
:
[
{
"id"
:
"input-variable-2"
,
"name"
:
"input-variable-name-2"
,
...
...
@@ -24,7 +24,7 @@
"description"
:
""
}
],
"output"
:
[
"output
s
"
:
[
{
"id"
:
"approved"
,
"name"
:
"approved"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录