Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
Flowable Engine
提交
139c0835
F
Flowable Engine
项目概览
开发团队
/
Flowable Engine
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Flowable Engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
139c0835
编写于
11月 18, 2015
作者:
J
Joram Barrez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Ported
https://github.com/Activiti/Activiti/commit/fa50cb5b2939bfd6b66cd34b7a5ced84d5c1f887
to v6
上级
ecd6cee5
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
69 addition
and
19 deletion
+69
-19
modules/activiti-spring-boot/spring-boot-samples/spring-boot-sample-basic/src/main/resources/processes/basic2.bpmn
...oot-sample-basic/src/main/resources/processes/basic2.bpmn
+40
-0
modules/activiti-spring-boot/spring-boot-samples/spring-boot-sample-basic/src/test/java/org/activiti/test/spring/boot/ProcessEngineAutoConfigurationTest.java
.../test/spring/boot/ProcessEngineAutoConfigurationTest.java
+1
-0
modules/activiti-spring-boot/spring-boot-starters/activiti-spring-boot-starter-basic/src/main/java/org/activiti/spring/boot/AbstractProcessEngineAutoConfiguration.java
...i/spring/boot/AbstractProcessEngineAutoConfiguration.java
+1
-1
modules/activiti-spring-boot/spring-boot-starters/activiti-spring-boot-starter-basic/src/main/java/org/activiti/spring/boot/AbstractProcessEngineConfiguration.java
...iviti/spring/boot/AbstractProcessEngineConfiguration.java
+17
-9
modules/activiti-spring-boot/spring-boot-starters/activiti-spring-boot-starter-basic/src/main/java/org/activiti/spring/boot/ActivitiProperties.java
...ain/java/org/activiti/spring/boot/ActivitiProperties.java
+10
-9
未找到文件。
modules/activiti-spring-boot/spring-boot-samples/spring-boot-sample-basic/src/main/resources/processes/basic2.bpmn
0 → 100644
浏览文件 @
139c0835
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<definitions
id=
"processDefinitions"
xmlns=
"http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:activiti=
"http://activiti.org/bpmn"
targetNamespace=
"processDefinitions"
>
<process
id=
"waiter2"
>
<startEvent
id=
"start"
/>
<sequenceFlow
id=
"flow1"
sourceRef=
"start"
targetRef=
"service1"
/>
<scriptTask
id=
"service1"
scriptFormat=
"groovy"
>
<script>
println 'customerId=' + customerId
</script>
</scriptTask>
<sequenceFlow
id=
"flow2"
sourceRef=
"service1"
targetRef=
"end"
/>
<endEvent
id=
"end"
/>
</process>
</definitions>
\ No newline at end of file
modules/activiti-spring-boot/spring-boot-samples/spring-boot-sample-basic/src/test/java/org/activiti/test/spring/boot/ProcessEngineAutoConfigurationTest.java
浏览文件 @
139c0835
...
...
@@ -30,6 +30,7 @@ public class ProcessEngineAutoConfigurationTest {
DataSourceAutoConfiguration
.
class
,
DataSourceProcessEngineAutoConfiguration
.
DataSourceProcessEngineConfiguration
.
class
);
RepositoryService
repositoryService
=
applicationContext
.
getBean
(
RepositoryService
.
class
);
Assert
.
assertNotNull
(
"we should have a default repositoryService included"
,
repositoryService
);
Assert
.
assertEquals
(
2
,
repositoryService
.
createProcessDefinitionQuery
().
count
());
List
<
ProcessDefinition
>
processDefinitionList
=
repositoryService
.
createProcessDefinitionQuery
()
.
processDefinitionKey
(
"waiter"
)
.
list
();
...
...
modules/activiti-spring-boot/spring-boot-starters/activiti-spring-boot-starter-basic/src/main/java/org/activiti/spring/boot/AbstractProcessEngineAutoConfiguration.java
浏览文件 @
139c0835
...
...
@@ -73,7 +73,7 @@ public abstract class AbstractProcessEngineAutoConfiguration
List
<
Resource
>
procDefResources
=
this
.
discoverProcessDefinitionResources
(
this
.
resourceLoader
,
this
.
activitiProperties
.
getProcessDefinitionLocationPrefix
(),
this
.
activitiProperties
.
getProcessDefinitionLocationSuffix
(),
this
.
activitiProperties
.
getProcessDefinitionLocationSuffix
es
(),
this
.
activitiProperties
.
isCheckProcessDefinitions
());
SpringProcessEngineConfiguration
conf
=
super
.
processEngineConfigurationBean
(
...
...
modules/activiti-spring-boot/spring-boot-starters/activiti-spring-boot-starter-basic/src/main/java/org/activiti/spring/boot/AbstractProcessEngineConfiguration.java
浏览文件 @
139c0835
...
...
@@ -14,7 +14,6 @@ package org.activiti.spring.boot;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
javax.sql.DataSource
;
...
...
@@ -35,7 +34,6 @@ import org.slf4j.LoggerFactory;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.support.ResourcePatternResolver
;
import
org.springframework.transaction.PlatformTransactionManager
;
import
org.springframework.util.Assert
;
/**
* Provides sane definitions for the various beans required to be productive with Activiti in Spring.
...
...
@@ -73,15 +71,25 @@ public abstract class AbstractProcessEngineConfiguration {
return
engine
;
}
public
List
<
Resource
>
discoverProcessDefinitionResources
(
ResourcePatternResolver
applicationContext
,
String
prefix
,
String
suffix
,
boolean
checkPDs
)
throws
IOException
{
String
path
=
prefix
+
suffix
;
public
List
<
Resource
>
discoverProcessDefinitionResources
(
ResourcePatternResolver
applicationContext
,
String
prefix
,
List
<
String
>
suffixes
,
boolean
checkPDs
)
throws
IOException
{
if
(
checkPDs
)
{
if
(!
applicationContext
.
getResource
(
prefix
).
exists
())
{
logger
.
warn
(
String
.
format
(
"No process definitions were found using the specified path (%s)."
,
path
));
return
new
ArrayList
<
Resource
>();
}
return
Arrays
.
asList
(
applicationContext
.
getResources
(
path
));
List
<
Resource
>
result
=
new
ArrayList
<
Resource
>();
for
(
String
suffix
:
suffixes
)
{
String
path
=
prefix
+
suffix
;
Resource
[]
resources
=
applicationContext
.
getResources
(
path
);
if
(
resources
!=
null
&&
resources
.
length
>
0
)
{
for
(
Resource
resource
:
resources
)
{
result
.
add
(
resource
);
}
}
}
if
(
result
.
isEmpty
())
{
logger
.
info
(
String
.
format
(
"No process definitions were found for autodeployment"
));
}
return
result
;
}
return
new
ArrayList
<
Resource
>();
}
...
...
modules/activiti-spring-boot/spring-boot-starters/activiti-spring-boot-starter-basic/src/main/java/org/activiti/spring/boot/ActivitiProperties.java
浏览文件 @
139c0835
...
...
@@ -12,6 +12,7 @@
*/
package
org.activiti.spring.boot
;
import
java.util.Arrays
;
import
java.util.List
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
...
...
@@ -39,7 +40,7 @@ public class ActivitiProperties {
private
String
databaseSchemaUpdate
=
"true"
;
private
String
databaseSchema
;
private
String
processDefinitionLocationPrefix
=
"classpath:/processes/"
;
private
String
processDefinitionLocationSuffix
=
"**.bpmn20.xml"
;
private
List
<
String
>
processDefinitionLocationSuffixes
=
Arrays
.
asList
(
"**.bpmn20.xml"
,
"**.bpmn"
)
;
private
String
restApiMapping
=
"/api/*"
;
private
String
restApiServletName
=
"activitiRestApi"
;
private
boolean
jpaEnabled
=
true
;
// true by default
...
...
@@ -143,16 +144,16 @@ public class ActivitiProperties {
this
.
processDefinitionLocationPrefix
=
processDefinitionLocationPrefix
;
}
public
String
getProcessDefinitionLocationSuffix
()
{
return
processDefinitionLocationSuffix
;
}
public
List
<
String
>
getProcessDefinitionLocationSuffixes
()
{
return
processDefinitionLocationSuffixes
;
}
public
void
setProcessDefinitionLocationSuffix
(
String
processDefinitionLocationSuffix
)
{
this
.
processDefinitionLocationSuffix
=
processDefinitionLocationSuffix
;
}
public
void
setProcessDefinitionLocationSuffixes
(
List
<
String
>
processDefinitionLocationSuffixes
)
{
this
.
processDefinitionLocationSuffixes
=
processDefinitionLocationSuffixes
;
}
public
String
getMailServerHost
()
{
public
String
getMailServerHost
()
{
return
mailServerHost
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录