Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
z_stack
Activiti
提交
9c65aef9
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,发现更多精彩内容 >>
提交
9c65aef9
编写于
10月 16, 2018
作者:
S
salaboy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updating connectors integration to be optional in DefaultServiceTaskBehavior
上级
0d049439
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
49 addition
and
30 deletion
+49
-30
activiti-api-impl/activiti-api-process-runtime-impl/src/main/java/org/activiti/runtime/api/connector/DefaultServiceTaskBehavior.java
...iti/runtime/api/connector/DefaultServiceTaskBehavior.java
+35
-19
activiti-api-impl/activiti-api-process-runtime-impl/src/main/java/org/activiti/runtime/api/connector/IntegrationContextBuilder.java
...viti/runtime/api/connector/IntegrationContextBuilder.java
+5
-2
activiti-api-impl/activiti-api-process-runtime-impl/src/main/resources/META-INF/spring.factories
...runtime-impl/src/main/resources/META-INF/spring.factories
+1
-1
pom.xml
pom.xml
+8
-8
未找到文件。
activiti-api-impl/activiti-api-process-runtime-impl/src/main/java/org/activiti/runtime/api/connector/DefaultServiceTaskBehavior.java
浏览文件 @
9c65aef9
...
...
@@ -33,9 +33,14 @@ public class DefaultServiceTaskBehavior extends AbstractBpmnActivityBehavior {
private
final
ApplicationContext
applicationContext
;
private
final
IntegrationContextBuilder
integrationContextBuilder
;
private
final
List
<
ConnectorDefinition
>
connectorDefinitions
;
private
final
ConnectorActionDefinitionFinder
connectorActionDefinitionFinder
;
private
final
VariablesMatchHelper
variablesMatchHelper
;
private
List
<
ConnectorDefinition
>
connectorDefinitions
;
private
ConnectorActionDefinitionFinder
connectorActionDefinitionFinder
;
private
VariablesMatchHelper
variablesMatchHelper
;
public
DefaultServiceTaskBehavior
(
ApplicationContext
applicationContext
,
IntegrationContextBuilder
integrationContextBuilder
)
{
this
.
applicationContext
=
applicationContext
;
this
.
integrationContextBuilder
=
integrationContextBuilder
;
}
public
DefaultServiceTaskBehavior
(
ApplicationContext
applicationContext
,
IntegrationContextBuilder
integrationContextBuilder
,
...
...
@@ -59,29 +64,40 @@ public class DefaultServiceTaskBehavior extends AbstractBpmnActivityBehavior {
IntegrationContext
context
;
String
implementation
=
((
ServiceTask
)
execution
.
getCurrentFlowElement
()).
getImplementation
();
List
<
VariableDefinition
>
outBoundVariableDefinitions
=
null
;
if
(
connectorActionDefinitionFinder
!=
null
&&
connectorDefinitions
!=
null
)
{
Optional
<
ActionDefinition
>
actionDefinitionOptional
=
connectorActionDefinitionFinder
.
find
(
implementation
,
connectorDefinitions
);
ActionDefinition
actionDefinition
=
null
;
if
(
actionDefinitionOptional
.
isPresent
())
{
actionDefinition
=
actionDefinitionOptional
.
get
();
Optional
<
ActionDefinition
>
actionDefinitionOptional
=
connectorActionDefinitionFinder
.
find
(
implementation
,
connectorDefinitions
);
ActionDefinition
actionDefinition
=
null
;
if
(
actionDefinitionOptional
.
isPresent
())
{
actionDefinition
=
actionDefinitionOptional
.
get
();
context
=
integrationContextBuilder
.
from
(
execution
,
actionDefinition
);
connector
=
applicationContext
.
getBean
(
actionDefinition
.
getName
(),
Connector
.
class
);
}
else
{
context
=
integrationContextBuilder
.
from
(
execution
,
null
);
connector
=
applicationContext
.
getBean
(
implementation
,
Connector
.
class
);
}
outBoundVariableDefinitions
=
actionDefinition
==
null
?
null
:
actionDefinition
.
getOutput
();
}
else
{
context
=
integrationContextBuilder
.
from
(
execution
,
actionDefinition
);
connector
=
applicationContext
.
getBean
(
actionDefinition
.
getName
(),
Connector
.
class
);
}
else
{
context
=
integrationContextBuilder
.
from
(
execution
,
null
);
null
);
connector
=
applicationContext
.
getBean
(
implementation
,
Connector
.
class
);
Connector
.
class
);
}
IntegrationContext
results
=
connector
.
execute
(
context
);
List
<
VariableDefinition
>
outBoundVariableDefinitions
=
actionDefinition
==
null
?
null
:
actionDefinition
.
getOutput
();
execution
.
setVariables
(
variablesMatchHelper
.
match
(
results
.
getOutBoundVariables
(),
outBoundVariableDefinitions
));
if
(
variablesMatchHelper
!=
null
)
{
execution
.
setVariables
(
variablesMatchHelper
.
match
(
results
.
getOutBoundVariables
(),
outBoundVariableDefinitions
));
}
else
{
execution
.
setVariables
(
results
.
getOutBoundVariables
());
}
leave
(
execution
);
}
...
...
activiti-api-impl/activiti-api-process-runtime-impl/src/main/java/org/activiti/runtime/api/connector/IntegrationContextBuilder.java
浏览文件 @
9c65aef9
...
...
@@ -70,7 +70,10 @@ public class IntegrationContextBuilder {
DelegateExecution
execution
)
{
List
<
VariableDefinition
>
inBoundVariableDefinitions
=
actionDefinition
==
null
?
null
:
actionDefinition
.
getInput
();
return
variablesMatchHelper
.
match
(
execution
.
getVariables
(),
inBoundVariableDefinitions
);
if
(
variablesMatchHelper
!=
null
)
{
return
variablesMatchHelper
.
match
(
execution
.
getVariables
(),
inBoundVariableDefinitions
);
}
else
{
return
execution
.
getVariables
();
}
}
}
activiti-api-impl/activiti-api-process-runtime-impl/src/main/resources/META-INF/spring.factories
浏览文件 @
9c65aef9
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.conf.activiti.runtime.api.ConnectorsAutoConfiguration,\
org.conf.activiti.runtime.api.ProcessRuntimeAutoConfiguration,\
org.activiti.spring.connector.autoconfigure.ConnectorAutoConfiguration
\ No newline at end of file
org.activiti.core.common.spring.connector.autoconfigure.ConnectorAutoConfiguration
\ No newline at end of file
pom.xml
浏览文件 @
9c65aef9
...
...
@@ -18,7 +18,7 @@
<properties>
<activiti-build.version>
7.0.39
</activiti-build.version>
<activiti-api.version>
7.0.33
</activiti-api.version>
<activiti-core-common.version>
7.0.
0
</activiti-core-common.version>
<activiti-core-common.version>
7.0.
1
</activiti-core-common.version>
<activiti.version>
${project.version}
</activiti.version>
<batik.version>
1.10
</batik.version>
<commons-email.version>
1.5
</commons-email.version>
...
...
@@ -50,13 +50,6 @@
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<dependency>
<groupId>
org.activiti.core.common
</groupId>
<artifactId>
activiti-core-common-dependencies
</artifactId>
<version>
${activiti-core-common.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<!-- Activiti Modules for managed dependencies -->
<!-- This duplicates activiti-dependencies module but we can't import that module here as this is its parent-->
<dependency>
...
...
@@ -66,6 +59,13 @@
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<dependency>
<groupId>
org.activiti.core.common
</groupId>
<artifactId>
activiti-core-common-dependencies
</artifactId>
<version>
${activiti-core-common.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<dependency>
<groupId>
org.activiti
</groupId>
<artifactId>
activiti-api-impl
</artifactId>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录