Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
datacollector
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenweisong
datacollector
Commits
de4dddd3
Commit
de4dddd3
authored
Mar 08, 2020
by
chenweisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
c8c89bc8
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
722 additions
and
349 deletions
+722
-349
ExceptionHandlerConfig.java
...om/keymobile/rest/common/conf/ExceptionHandlerConfig.java
+37
-0
TwinkleException.java
...com/keymobile/rest/common/exception/TwinkleException.java
+18
-0
AbstractValidator.java
...om/keymobile/rest/common/validator/AbstractValidator.java
+67
-0
TwinkleValidator.java
...com/keymobile/rest/common/validator/TwinkleValidator.java
+116
-0
IndexCtrl.java
src/main/java/com/keymobile/rest/ctrl/IndexCtrl.java
+116
-68
ExcelDao.java
src/main/java/com/keymobile/rest/dao/ExcelDao.java
+2
-0
JobDao.java
src/main/java/com/keymobile/rest/dao/JobDao.java
+1
-0
RecordInfoDao.java
src/main/java/com/keymobile/rest/dao/RecordInfoDao.java
+4
-0
Excel.java
src/main/java/com/keymobile/rest/model/Excel.java
+5
-2
Job.java
src/main/java/com/keymobile/rest/model/Job.java
+8
-7
RecordData.java
src/main/java/com/keymobile/rest/model/RecordData.java
+5
-3
RecordInfo.java
src/main/java/com/keymobile/rest/model/RecordInfo.java
+3
-1
User.java
src/main/java/com/keymobile/rest/model/User.java
+2
-0
ExcelService.java
src/main/java/com/keymobile/rest/service/ExcelService.java
+10
-1
JobService.java
src/main/java/com/keymobile/rest/service/JobService.java
+5
-1
RecordDataService.java
...in/java/com/keymobile/rest/service/RecordDataService.java
+3
-2
RecordInfoService.java
...in/java/com/keymobile/rest/service/RecordInfoService.java
+10
-1
ExcelForm.java
src/main/java/com/keymobile/rest/vo/ExcelForm.java
+4
-0
JobForm.java
src/main/java/com/keymobile/rest/vo/JobForm.java
+5
-3
RecordDataForm.java
src/main/java/com/keymobile/rest/vo/RecordDataForm.java
+7
-0
CompDataStandardProcess(new).bpmn
src/main/resources/CompDataStandardProcess(new).bpmn
+69
-68
RecordProcess.bpmn
src/main/resources/RecordProcess.bpmn
+73
-91
RecordStandardProcess.bpmn
src/main/resources/RecordStandardProcess.bpmn
+108
-0
application-test.yml
src/main/resources/application-test.yml
+5
-5
demo.bpmn
src/main/resources/demo.bpmn
+0
-76
demo.bpmn.png
src/main/resources/demo.bpmn.png
+0
-0
ProcessTest.java
src/test/java/com/keymobile/ProcessTest.java
+39
-20
No files found.
src/main/java/com/keymobile/rest/common/conf/ExceptionHandlerConfig.java
0 → 100644
View file @
de4dddd3
package
com
.
keymobile
.
rest
.
common
.
conf
;
import
com.keymobile.rest.common.bean.ApiResponse
;
import
com.keymobile.rest.common.constant.ApiConstant
;
import
com.keymobile.rest.common.exception.TwinkleException
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
/**
* description: 全局异常处理
*
* @author :ws6049
* @date :2019/1/13 0:26
*/
@RestControllerAdvice
public
class
ExceptionHandlerConfig
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ExceptionHandlerConfig
.
class
);
/**
* description: 捕获全局异常
* created by King on 2019/1/13 0:30.
*
* @return ApiResponse
* @Param: ex
*/
@ExceptionHandler
(
Exception
.
class
)
public
ApiResponse
globalException
(
Throwable
ex
)
{
if
(
ex
instanceof
TwinkleException
)
{
logger
.
warn
(
"访问出错:"
+
ex
.
getMessage
());
return
ApiResponse
.
fail
(
ApiConstant
.
FAILED_CODE
,
ex
.
getMessage
());
}
logger
.
error
(
"访问出错:"
,
ex
);
return
ApiResponse
.
fail
(
ApiConstant
.
FAILED_CODE
,
"网络不给力"
);
}
}
src/main/java/com/keymobile/rest/common/exception/TwinkleException.java
0 → 100644
View file @
de4dddd3
package
com
.
keymobile
.
rest
.
common
.
exception
;
import
lombok.Data
;
/**
* description: 通用异常
*
* @author :chenws
* @date :2019/1/12 23:28
*/
@Data
public
class
TwinkleException
extends
RuntimeException
{
private
static
final
long
serialVersionUID
=
3455708526465670030L
;
public
TwinkleException
(
String
msg
)
{
super
(
msg
);
}
}
src/main/java/com/keymobile/rest/common/validator/AbstractValidator.java
0 → 100644
View file @
de4dddd3
package
com
.
keymobile
.
rest
.
common
.
validator
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
java.util.Collection
;
import
java.util.Map
;
/**
* description: 通用校验抽象类,放校验辅助方法
*
* @author :chenws
* @date :2019/1/12 23:28
*/
public
abstract
class
AbstractValidator
{
public
static
<
T
>
boolean
notNull
(
T
value
)
{
return
value
!=
null
;
}
public
static
<
T
>
boolean
notEmpty
(
T
[]
value
)
{
return
ArrayUtils
.
isNotEmpty
(
value
);
}
public
static
<
T
extends
Collection
<?>>
boolean
notEmpty
(
T
value
)
{
return
!(
value
==
null
||
value
.
isEmpty
());
}
public
static
<
T
extends
Map
<?,
?>>
boolean
notEmpty
(
T
value
)
{
return
!(
value
==
null
||
value
.
isEmpty
());
}
public
static
<
T
extends
CharSequence
>
boolean
notEmpty
(
T
value
)
{
return
StringUtils
.
isNotEmpty
(
value
);
}
public
static
boolean
maxLength
(
String
value
,
int
maxLength
)
{
int
len
=
StringUtils
.
length
(
value
);
return
len
<=
maxLength
;
}
public
static
boolean
range
(
String
value
,
int
minLength
,
int
maxLength
)
{
int
len
=
StringUtils
.
length
(
value
);
return
len
>=
minLength
&&
len
<=
maxLength
;
}
public
static
boolean
range
(
Integer
value
,
int
min
,
int
max
)
{
if
(
value
==
null
)
{
return
true
;
}
return
value
>=
min
&&
value
<=
max
;
}
public
static
Boolean
isNotNULL
(
Object
...
value
)
{
if
(
null
==
value
||
value
.
length
<
1
)
{
return
false
;
}
else
{
for
(
int
i
=
0
;
i
<
value
.
length
;
i
++)
{
if
(
null
==
value
[
i
]
||
""
.
equals
(
value
[
i
].
toString
())
||
"null"
.
equals
(
value
[
i
].
toString
().
toLowerCase
()))
{
return
false
;
}
}
}
return
true
;
}
}
\ No newline at end of file
src/main/java/com/keymobile/rest/common/validator/TwinkleValidator.java
0 → 100644
View file @
de4dddd3
package
com
.
keymobile
.
rest
.
common
.
validator
;
import
com.keymobile.rest.common.exception.TwinkleException
;
import
java.util.Collection
;
import
java.util.Map
;
import
java.util.regex.Pattern
;
/**
* description: 通用校验类
*
* @author :chenws
* @date :2019/1/12 23:28
*/
public
final
class
TwinkleValidator
extends
AbstractValidator
{
public
static
void
isTrue
(
boolean
flag
,
String
message
)
{
if
(!
flag
)
{
throw
new
TwinkleException
(
message
);
}
}
public
static
void
isFalse
(
boolean
flag
,
String
message
)
{
if
(
flag
)
{
throw
new
TwinkleException
(
message
);
}
}
public
static
void
notLessThan
(
int
value
,
int
flag
,
String
message
)
{
if
(
value
<
flag
)
{
throw
new
TwinkleException
(
message
);
}
}
public
static
void
notMessThan
(
int
value
,
int
flag
,
String
message
)
{
if
(
value
>
flag
)
{
throw
new
TwinkleException
(
message
);
}
}
public
static
<
T
>
boolean
notNull
(
T
value
,
String
message
)
{
boolean
isValid
=
notNull
(
value
);
if
(!
isValid
)
{
throw
new
TwinkleException
(
message
);
}
return
isValid
;
}
public
static
boolean
isNotNumber
(
String
input
,
String
message
)
{
if
(!
isNotNULL
(
input
))
{
return
false
;
}
boolean
isValid
=
Pattern
.
matches
(
"^\\d+$"
,
input
);
if
(!
isValid
)
{
throw
new
TwinkleException
(
message
);
}
return
isValid
;
}
public
static
<
T
extends
CharSequence
>
boolean
notEmpty
(
T
value
,
String
message
)
{
boolean
isValid
=
notEmpty
(
value
);
if
(!
isValid
)
{
throw
new
TwinkleException
(
message
);
}
return
isValid
;
}
public
static
<
T
>
boolean
notEmpty
(
T
[]
value
,
String
message
)
{
boolean
isValid
=
notEmpty
(
value
);
if
(!
isValid
)
{
throw
new
TwinkleException
(
message
);
}
return
isValid
;
}
public
static
<
T
extends
Collection
<?>>
boolean
notEmpty
(
T
value
,
String
message
)
{
boolean
isValid
=
notEmpty
(
value
);
if
(!
isValid
)
{
throw
new
TwinkleException
(
message
);
}
return
isValid
;
}
public
static
<
T
extends
Map
<?,
?>>
boolean
notEmpty
(
T
value
,
String
message
)
{
boolean
isValid
=
notEmpty
(
value
);
if
(!
isValid
)
{
throw
new
TwinkleException
(
message
);
}
return
isValid
;
}
public
static
boolean
maxLength
(
String
value
,
int
maxLength
,
String
message
)
{
boolean
isValid
=
maxLength
(
value
,
maxLength
);
if
(!
isValid
)
{
throw
new
TwinkleException
(
message
);
}
return
isValid
;
}
public
static
boolean
range
(
String
value
,
int
minLength
,
int
maxLength
,
String
message
)
{
boolean
isValid
=
range
(
value
,
minLength
,
maxLength
);
if
(!
isValid
)
{
throw
new
TwinkleException
(
message
);
}
return
isValid
;
}
public
static
boolean
range
(
Integer
value
,
int
min
,
int
max
,
String
message
)
{
boolean
isValid
=
range
(
value
,
min
,
max
);
if
(!
isValid
)
{
throw
new
TwinkleException
(
message
);
}
return
isValid
;
}
}
src/main/java/com/keymobile/rest/ctrl/IndexCtrl.java
View file @
de4dddd3
...
...
@@ -3,29 +3,25 @@ package com.keymobile.rest.ctrl;
import
com.google.common.collect.ImmutableMap
;
import
com.keymobile.activiti.service.formService.FormExcelFileService
;
import
com.keymobile.rest.common.bean.ApiResponse
;
import
com.keymobile.rest.model.Excel
;
import
com.keymobile.rest.model.Job
;
import
com.keymobile.rest.model.User
;
import
com.keymobile.rest.common.validator.TwinkleValidator
;
import
com.keymobile.rest.model.*
;
import
com.keymobile.rest.service.*
;
import
com.keymobile.rest.vo.ExcelForm
;
import
com.keymobile.rest.vo.RecordDataForm
;
import
com.keymobile.rest.vo.JobForm
;
import
com.keymobile.rest.vo.*
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.activiti.engine.*
;
import
org.activiti.engine.TaskService
;
import
org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl
;
import
org.activiti.engine.repository.Deployment
;
import
org.activiti.engine.repository.ProcessDefinition
;
import
org.activiti.engine.runtime.ProcessInstance
;
import
org.activiti.engine.task.Task
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.Page
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@RestController
...
...
@@ -74,84 +70,131 @@ public class IndexCtrl {
@ApiOperation
(
value
=
"查看收数"
)
@PostMapping
(
value
=
"/task/get"
)
public
ApiResponse
get
(
@RequestParam
@ApiParam
(
name
=
"id"
,
value
=
"收数id"
)
long
i
d
)
{
Job
job
=
jobService
.
get
(
i
d
);
public
ApiResponse
get
(
@RequestParam
@ApiParam
(
required
=
true
,
name
=
"taskId"
,
value
=
"收数id"
)
Long
taskI
d
)
{
Job
job
=
jobService
.
get
(
taskI
d
);
return
ApiResponse
.
ok
(
job
);
}
@ApiOperation
(
value
=
"补录人员查看自己补录任务"
)
@PostMapping
(
value
=
"/task/getMyTasks"
)
public
ApiResponse
getMyTasks
()
{
List
<
User
>
userList
=
userService
.
findAllByRole
(
User
.
ROLE_NORMAL
);
User
curUser
=
userList
.
get
(
0
);
List
<
Excel
>
excelList
=
new
ArrayList
<>();
// 发起人把流程发送到下一个人
List
<
Task
>
taskList
=
taskService
.
createTaskQuery
()
.
taskAssignee
(
curUser
.
getUsername
()).
list
();
if
(
taskList
.
size
()
>
0
)
{
Task
task
=
taskList
.
get
(
0
);
String
processId
=
task
.
getProcessInstanceId
();
Job
job
=
jobService
.
findByProcessId
(
processId
);
if
(
job
.
getStatus
()
!=
Job
.
STATUS_COMPLETED
)
{
excelList
=
excelService
.
findAllByJobId
(
job
.
getId
());
}
}
return
ApiResponse
.
ok
(
excelList
);
}
@ApiOperation
(
value
=
"新建收数"
)
@PostMapping
(
value
=
"/task/create"
)
public
ApiResponse
createTask
(
@RequestBody
JobForm
form
)
{
TwinkleValidator
.
notEmpty
(
form
.
getName
(),
"名称不能为空"
);
TwinkleValidator
.
notNull
(
form
.
getType
(),
"类型不能为空"
);
TwinkleValidator
.
notLessThan
(
form
.
getExcels
().
size
(),
1
,
"补录模板不能为空"
);
// 创建人
User
manager
=
userService
.
getManager
();
form
.
setUser
(
manager
);
Job
job
=
jobService
.
save
(
form
);
// 新建excel实例
if
(
form
.
getExcelIds
()
!=
null
)
{
String
[]
excelIds
=
form
.
getExcelIds
().
split
(
","
);
List
<
Long
>
excelIdList
=
Arrays
.
asList
(
excelIds
).
stream
().
map
(
Long:
:
parseLong
).
collect
(
Collectors
.
toList
());
List
<
Excel
>
excelList
=
excelService
.
findAllByIdIn
(
excelIdList
);
excelList
.
forEach
(
excel
->
{
excel
.
setJob
(
job
);
// 新建补录人员任务关联
if
(
form
.
getUserIds
()
!=
null
)
{
String
[]
userIds
=
form
.
getUserIds
().
split
(
","
);
List
<
Long
>
userIdList
=
Arrays
.
asList
(
userIds
).
stream
().
map
(
Long:
:
parseLong
).
collect
(
Collectors
.
toList
());
List
<
User
>
userList
=
userService
.
findAllByIdIn
(
userIdList
);
userList
.
forEach
(
user
->
{
recordInfoService
.
save
(
user
,
excel
);
});
}
});
excelService
.
saveAll
(
excelList
);
}
return
ApiResponse
.
ok
();
List
<
ExcelForm
>
excelFormList
=
form
.
getExcels
();
excelFormList
.
forEach
(
excelForm
->
{
excelForm
.
setJob
(
job
);
Excel
excel
=
excelService
.
save
(
excelForm
);
// 新建补录人员任务关联
if
(
StringUtils
.
isNotEmpty
(
form
.
getUserIds
()))
{
String
[]
userIds
=
form
.
getUserIds
().
split
(
","
);
List
<
Long
>
userIdList
=
Arrays
.
asList
(
userIds
).
stream
().
map
(
Long:
:
parseLong
).
collect
(
Collectors
.
toList
());
List
<
User
>
userList
=
userService
.
findAllByIdIn
(
userIdList
);
userList
.
forEach
(
user
->
{
recordInfoService
.
save
(
user
,
excel
);
});
}
});
return
ApiResponse
.
ok
(
job
.
getId
());
}
@ApiOperation
(
value
=
"手动发起收数"
)
@PostMapping
(
value
=
"/task/start"
)
public
ApiResponse
startTask
(
@RequestParam
long
id
)
{
Job
job
=
jobService
.
get
(
id
);
// 启动流程
// 获取流的引擎
ProcessEngine
processEngine
=
ProcessEngines
.
getDefaultProcessEngine
();
Deployment
deploy
=
processEngine
.
getRepositoryService
()
public
ApiResponse
startTask
(
@RequestParam
Long
taskId
)
{
Job
job
=
jobService
.
get
(
taskId
);
TwinkleValidator
.
notNull
(
job
,
"收数不存在"
);
// 部署补录流程
Deployment
deploy
=
repositoryService
.
createDeployment
()
.
addClasspathResource
(
process
)
.
deploy
();
ProcessDefinition
processDefinition
=
processEngine
.
getRepositoryService
().
createProcessDefinitionQuery
().
deploymentId
(
deploy
.
getId
()).
singleResult
();
ProcessInstance
processInstance
=
processEngine
.
getRuntimeService
()
.
startProcessInstanceByKey
(
processDefinition
.
getKey
());
org
.
activiti
.
engine
.
task
.
Task
resultTask
=
processEngine
.
getTaskService
().
createTaskQuery
().
processInstanceId
(
processInstance
.
getId
()).
taskInvolvedUser
(
"管理"
).
singleResult
();
//直接提交标准到下个节点
processEngine
.
getTaskService
().
claim
(
resultTask
.
getId
(),
"管理"
);
//保存审批意见
processEngine
.
getTaskService
().
addComment
(
resultTask
.
getId
(),
processInstance
.
getId
(),
""
);
//审批任务
processEngine
.
getTaskService
().
complete
(
resultTask
.
getId
());
// 获取流程定义
ProcessDefinition
processDefinition
=
repositoryService
.
createProcessDefinitionQuery
().
deploymentId
(
deploy
.
getId
()).
singleResult
();
String
inputUser
=
job
.
getUser
().
getUsername
();
Map
<
String
,
Object
>
variables
=
new
HashMap
<>();
variables
.
put
(
"managerId"
,
inputUser
);
//启动流程
ProcessInstance
processInstance
=
runtimeService
.
startProcessInstanceByKey
(
processDefinition
.
getKey
(),
variables
);
job
.
setProcessId
(
processInstance
.
getId
());
// 发起人把流程发送到下一个人
Task
resultTask
=
taskService
.
createTaskQuery
().
processInstanceId
(
processInstance
.
getId
()).
taskInvolvedUser
(
inputUser
).
singleResult
();
// 根据收数查找需要填写的人 目前只支持一人
List
<
Excel
>
excelList
=
excelService
.
findAllByJobId
(
taskId
);
TwinkleValidator
.
notLessThan
(
excelList
.
size
(),
1
,
"补录模板不存在"
);
Excel
excel
=
excelList
.
get
(
0
);
List
<
RecordInfo
>
recordInfoList
=
recordInfoService
.
findAllByExcelId
(
excel
.
getId
());
TwinkleValidator
.
notLessThan
(
recordInfoList
.
size
(),
1
,
"补录人员不存在"
);
taskService
.
complete
(
resultTask
.
getId
(),
ImmutableMap
.
of
(
"userId"
,
recordInfoList
.
get
(
0
).
getUser
().
getUsername
()));
return
ApiResponse
.
ok
();
}
@ApiOperation
(
value
=
"审核通过收数"
)
@PostMapping
(
value
=
"/task/pass"
)
public
ApiResponse
passTask
(
@RequestParam
long
id
)
{
public
ApiResponse
passTask
(
@RequestParam
Long
taskId
)
{
Job
job
=
jobService
.
get
(
taskId
);
// 完结收数, 流程跑完
List
<
User
>
judgeList
=
userService
.
findAllByRole
(
User
.
ROLE_JUDGE
);
User
judge
=
judgeList
.
get
(
0
);
List
<
Task
>
taskList
=
taskService
.
createTaskQuery
().
processInstanceId
(
job
.
getProcessId
())
.
taskAssignee
(
judge
.
getUsername
()).
list
();
Task
task
=
taskList
.
get
(
0
);
taskService
.
complete
(
task
.
getId
(),
ImmutableMap
.
of
(
"pass"
,
"true"
));
return
ApiResponse
.
ok
();
}
@ApiOperation
(
value
=
"审核驳回收数"
)
@PostMapping
(
value
=
"/task/reject"
)
public
ApiResponse
rejectTask
(
@RequestParam
long
id
)
{
public
ApiResponse
rejectTask
(
@RequestParam
Long
taskId
)
{
Job
job
=
jobService
.
get
(
taskId
);
// 完结收数, 流程跑完
List
<
User
>
judgeList
=
userService
.
findAllByRole
(
User
.
ROLE_JUDGE
);
User
judge
=
judgeList
.
get
(
0
);
List
<
Task
>
taskList
=
taskService
.
createTaskQuery
().
processInstanceId
(
job
.
getProcessId
())
.
taskAssignee
(
judge
.
getUsername
()).
list
();
Task
task
=
taskList
.
get
(
0
);
taskService
.
complete
(
task
.
getId
(),
ImmutableMap
.
of
(
"pass"
,
"false"
));
return
ApiResponse
.
ok
();
}
@ApiOperation
(
value
=
"查看当前收数进度"
)
@PostMapping
(
value
=
"/task/saveData
"
)
public
ApiResponse
viewTaskProcess
(
@RequestParam
long
i
d
)
{
return
ApiResponse
.
ok
();
}
//
@ApiOperation(value = "查看当前收数进度")
// @PostMapping(value = "/task/viewTaskProcess
")
// public ApiResponse viewTaskProcess(@RequestParam Long taskI
d) {
//
return ApiResponse.ok();
//
}
@ApiOperation
(
value
=
"获取补录人员列表"
)
...
...
@@ -161,19 +204,24 @@ public class IndexCtrl {
return
ApiResponse
.
ok
(
userList
);
}
@ApiOperation
(
value
=
"新建模板"
)
@PostMapping
(
value
=
"/excel/create"
)
public
ApiResponse
saveExcel
(
@RequestBody
ExcelForm
form
)
{
Excel
excel
=
excelService
.
save
(
form
);
return
ApiResponse
.
ok
();
}
@ApiOperation
(
value
=
"填写补录数据"
)
@PostMapping
(
value
=
"/excel/saveData"
)
public
ApiResponse
saveRecordData
(
RecordDataForm
form
)
{
return
ApiResponse
.
ok
();
RecordData
recordData
=
recordDataService
.
save
(
form
);
List
<
User
>
userList
=
userService
.
findAllByRole
(
User
.
ROLE_NORMAL
);
User
curUser
=
userList
.
get
(
0
);
Excel
excel
=
excelService
.
get
(
form
.
getExcelId
());
Job
job
=
excel
.
getJob
();
String
processId
=
job
.
getProcessId
();
// 发起人把流程发送到下一个人
List
<
Task
>
taskList
=
taskService
.
createTaskQuery
().
processInstanceId
(
processId
)
.
taskAssignee
(
curUser
.
getUsername
()).
list
();
Task
task
=
taskList
.
get
(
0
);
List
<
User
>
judgeList
=
userService
.
findAllByRole
(
User
.
ROLE_JUDGE
);
User
judge
=
judgeList
.
get
(
0
);
taskService
.
complete
(
task
.
getId
(),
ImmutableMap
.
of
(
"judgeId"
,
judge
.
getUsername
()));
return
ApiResponse
.
ok
(
recordData
.
getId
());
}
...
...
src/main/java/com/keymobile/rest/dao/ExcelDao.java
View file @
de4dddd3
...
...
@@ -9,5 +9,7 @@ public interface ExcelDao extends JpaRepository<Excel, Long> {
List
<
Excel
>
findAllByIdIn
(
List
<
Long
>
ids
);
List
<
Excel
>
findAllByJobId
(
long
jid
);
}
src/main/java/com/keymobile/rest/dao/JobDao.java
View file @
de4dddd3
...
...
@@ -11,4 +11,5 @@ public interface JobDao extends JpaRepository<Job, Long> {
Page
<
Job
>
findAllByNameLike
(
String
valueOf
,
Pageable
pageable
);
Job
findByProcessId
(
String
pid
);
}
src/main/java/com/keymobile/rest/dao/RecordInfoDao.java
View file @
de4dddd3
...
...
@@ -3,7 +3,11 @@ package com.keymobile.rest.dao;
import
com.keymobile.rest.model.RecordInfo
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
public
interface
RecordInfoDao
extends
JpaRepository
<
RecordInfo
,
Long
>
{
List
<
RecordInfo
>
findAllByExcelId
(
long
eid
);
List
<
RecordInfo
>
findAllByUserId
(
long
uid
);
}
src/main/java/com/keymobile/rest/model/Excel.java
View file @
de4dddd3
package
com
.
keymobile
.
rest
.
model
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -14,6 +15,7 @@ import java.util.List;
/**
* spreadJs 配置的报表
*/
@JsonIgnoreProperties
(
value
=
{
"hibernateLazyInitializer"
,
"handler"
,
"fieldHandler"
})
@NoArgsConstructor
@AllArgsConstructor
@Data
...
...
@@ -24,18 +26,19 @@ public class Excel implements Serializable {
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
long
id
;
@Column
(
columnDefinition
=
"VARCHAR(300) COMMENT 'SpreadJs表格配置'"
)
@Column
(
nullable
=
false
)
private
String
config
;
@Column
private
String
desc
;
@Column
(
columnDefinition
=
"DATETIME COMMENT '创建时间'
"
)
@Column
(
nullable
=
false
,
name
=
"create_at
"
)
@CreationTimestamp
private
Timestamp
createAt
;
// 级别游离关联, 当加载的时候急加载这个对象
@ManyToOne
(
cascade
=
CascadeType
.
DETACH
,
fetch
=
FetchType
.
EAGER
)
@JsonIgnore
private
Job
job
;
@OneToMany
...
...
src/main/java/com/keymobile/rest/model/Job.java
View file @
de4dddd3
package
com
.
keymobile
.
rest
.
model
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
Properties
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -16,6 +16,7 @@ import java.util.List;
* @name 流程、任务
* @desc 包含属于哪个activiti流程、相关人员、附件信息id
*/
@JsonIgnoreProperties
(
value
=
{
"hibernateLazyInitializer"
,
"handler"
,
"fieldHandler"
})
@NoArgsConstructor
// 自动生成无参数构造函数。
@AllArgsConstructor
// 自动生成全参数构造函数。
@Data
...
...
@@ -28,6 +29,7 @@ public class Job implements Serializable {
public
static
int
STATUS_RELEASED
=
2
;
public
static
int
STATUS_UNRELEASED
=
1
;
public
static
int
STATUS_COMPLETED
=
3
;
public
static
int
JUDGE_NEED
=
2
;
public
static
int
JUDGE_NO_NEED
=
1
;
...
...
@@ -37,7 +39,7 @@ public class Job implements Serializable {
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
long
id
;
@Column
@Column
(
nullable
=
false
)
private
String
name
;
@Column
...
...
@@ -49,18 +51,17 @@ public class Job implements Serializable {
@Column
private
int
judge
=
2
;
@Column
private
lo
ng
processId
;
@Column
(
name
=
"process_id"
)
private
Stri
ng
processId
;
@Column
@Column
(
name
=
"start_at"
)
private
Timestamp
startAt
;
@Column
(
nullable
=
false
)
@Column
(
nullable
=
false
,
name
=
"create_at"
)
@CreationTimestamp
private
Timestamp
createAt
;
@OneToMany
@JsonIgnore
private
List
<
Excel
>
excelList
;
@ManyToOne
...
...
src/main/java/com/keymobile/rest/model/RecordData.java
View file @
de4dddd3
package
com
.
keymobile
.
rest
.
model
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
Properties
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -13,6 +13,7 @@ import java.sql.Timestamp;
/**
* spreadJs 填写的数据
*/
@JsonIgnoreProperties
(
value
=
{
"hibernateLazyInitializer"
,
"handler"
,
"fieldHandler"
})
@NoArgsConstructor
@AllArgsConstructor
@Data
...
...
@@ -23,11 +24,12 @@ public class RecordData implements Serializable {
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
long
id
;
@Column
(
columnDefinition
=
"DATETIME COMMENT '创建时间'"
)
@Column
(
name
=
"create_at"
,
nullable
=
false
,
columnDefinition
=
"DATETIME COMMENT '创建时间'"
)
@CreationTimestamp
private
Timestamp
createAt
;
@ManyToOne
private
RecordInfo
recordInfo
;
...
...
src/main/java/com/keymobile/rest/model/RecordInfo.java
View file @
de4dddd3
package
com
.
keymobile
.
rest
.
model
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -14,6 +15,7 @@ import java.util.List;
/**
* spreadJs 补录人员信息
*/
@JsonIgnoreProperties
(
value
=
{
"hibernateLazyInitializer"
,
"handler"
,
"fieldHandler"
})
@NoArgsConstructor
@AllArgsConstructor
@Data
...
...
@@ -25,7 +27,7 @@ public class RecordInfo implements Serializable {
private
long
id
;
@Column
(
columnDefinition
=
"DATETIME COMMENT '创建时间'"
)
@Column
(
name
=
"create_at"
,
nullable
=
false
,
columnDefinition
=
"DATETIME COMMENT '创建时间'"
)
@CreationTimestamp
private
Timestamp
createAt
;
...
...
src/main/java/com/keymobile/rest/model/User.java
View file @
de4dddd3
package
com
.
keymobile
.
rest
.
model
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -7,6 +8,7 @@ import lombok.NoArgsConstructor;
import
javax.persistence.*
;
import
java.io.Serializable
;
@JsonIgnoreProperties
(
value
=
{
"hibernateLazyInitializer"
,
"handler"
,
"fieldHandler"
})
@NoArgsConstructor
@AllArgsConstructor
@Data
...
...
src/main/java/com/keymobile/rest/service/ExcelService.java
View file @
de4dddd3
...
...
@@ -18,14 +18,23 @@ public class ExcelService {
Excel
excel
=
new
Excel
();
excel
.
setConfig
(
form
.
getConfig
());
excel
.
setDesc
(
form
.
getDesc
());
excelDao
.
save
(
excel
);
excel
.
setJob
(
form
.
getJob
());
excel
=
excelDao
.
save
(
excel
);
return
excel
;
}
public
Excel
get
(
long
id
)
{
return
excelDao
.
getOne
(
id
);
}
public
List
<
Excel
>
findAllByIdIn
(
List
<
Long
>
ids
)
{
return
excelDao
.
findAllByIdIn
(
ids
);
}
public
List
<
Excel
>
findAllByJobId
(
long
jid
)
{
return
excelDao
.
findAllByJobId
(
jid
);
}
public
void
saveAll
(
List
<
Excel
>
excelList
)
{
excelDao
.
saveAll
(
excelList
);
}
...
...
src/main/java/com/keymobile/rest/service/JobService.java
View file @
de4dddd3
...
...
@@ -35,10 +35,14 @@ public class JobService {
job
.
setStartAt
(
Timestamp
.
valueOf
(
form
.
getStartAt
()));
}
job
.
setUser
(
form
.
getUser
());
jobDao
.
save
(
job
);
job
=
job
Dao
.
save
(
job
);
return
job
;
}
public
Job
findByProcessId
(
String
pid
)
{
return
jobDao
.
findByProcessId
(
pid
);
}
public
Page
<
Job
>
findAll
(
int
pageNo
,
int
pageSize
)
{
Pageable
pageable
=
convert
(
pageNo
,
pageSize
);
return
jobDao
.
findAll
(
pageable
);
...
...
src/main/java/com/keymobile/rest/service/RecordDataService.java
View file @
de4dddd3
...
...
@@ -2,6 +2,7 @@ package com.keymobile.rest.service;
import
com.keymobile.rest.dao.*
;
import
com.keymobile.rest.model.RecordData
;
import
com.keymobile.rest.vo.RecordDataForm
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -11,10 +12,10 @@ public class RecordDataService {
@Autowired
private
RecordDataDao
recordDataDao
;
public
RecordData
save
()
{
public
RecordData
save
(
RecordDataForm
form
)
{
RecordData
data
=
new
RecordData
();
recordDataDao
.
save
(
data
);
data
=
recordDataDao
.
save
(
data
);
return
data
;
}
}
src/main/java/com/keymobile/rest/service/RecordInfoService.java
View file @
de4dddd3
...
...
@@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
java.sql.Timestamp
;
import
java.util.List
;
@Service
public
class
RecordInfoService
{
...
...
@@ -22,7 +23,15 @@ public class RecordInfoService {
info
.
setUser
(
user
);
Timestamp
now
=
Timestamp
.
valueOf
(
DateUtil
.
getDateTime
());
info
.
setCreateAt
(
now
);
recordInfoDao
.
save
(
info
);
info
=
recordInfoDao
.
save
(
info
);
return
info
;
}
public
List
<
RecordInfo
>
findAllByExcelId
(
long
eid
)
{
return
recordInfoDao
.
findAllByExcelId
(
eid
);
}
public
List
<
RecordInfo
>
findByUserId
(
long
uid
)
{
return
recordInfoDao
.
findAllByUserId
(
uid
);
}
}
src/main/java/com/keymobile/rest/vo/ExcelForm.java
View file @
de4dddd3
package
com
.
keymobile
.
rest
.
vo
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.keymobile.rest.model.Job
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -20,4 +22,6 @@ public class ExcelForm {
@ApiModelProperty
(
name
=
"desc"
,
value
=
"表格描述"
)
private
String
desc
;
@JsonIgnore
private
Job
job
;
}
src/main/java/com/keymobile/rest/vo/JobForm.java
View file @
de4dddd3
...
...
@@ -6,6 +6,8 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
@ApiModel
public
class
JobForm
{
...
...
@@ -19,10 +21,10 @@ public class JobForm {
@ApiModelProperty
(
name
=
"startAt"
,
value
=
"自动发起需要提写的时间"
)
private
String
startAt
;
@ApiModelProperty
(
name
=
"excel
Ids"
,
value
=
"新建的模板ids, 用逗号隔开
"
)
private
String
excelId
s
;
@ApiModelProperty
(
name
=
"excel
s"
,
value
=
"新建的模板配置数组
"
)
private
List
<
ExcelForm
>
excel
s
;
@ApiModelProperty
(
name
=
"
excel
Ids"
,
value
=
"补录人员ids, 用逗号隔开"
)
@ApiModelProperty
(
name
=
"
user
Ids"
,
value
=
"补录人员ids, 用逗号隔开"
)
private
String
userIds
;
@JsonIgnore
...
...
src/main/java/com/keymobile/rest/vo/RecordDataForm.java
View file @
de4dddd3
...
...
@@ -4,8 +4,15 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@ApiModel
@Data
public
class
RecordDataForm
{
@ApiModelProperty
(
required
=
true
,
name
=
"excelId"
,
value
=
"当前模板id"
)
private
long
excelId
;
@ApiModelProperty
(
required
=
true
,
name
=
"dataList"
,
value
=
"当前数据数组"
)
private
List
<
Object
>
dataList
;
}
src/main/resources/CompDataStandardProcess(new).bpmn
View file @
de4dddd3
...
...
@@ -46,244 +46,245 @@
<bpmndi:BPMNDiagram
documentation=
"background=#3C3F41;count=1;horizontalcount=1;orientation=0;width=842.4;height=1195.2;imageableWidth=832.4;imageableHeight=1185.2;imageableX=5.0;imageableY=5.0"
id=
"Diagram-_1"
name=
"New Diagram"
>
<bpmndi:BPMNPlane
bpmnElement=
"CompDataStandardProcess"
>
<bpmndi:BPMNShape
bpmnElement=
"startevent1"
id=
"Shape-startevent1"
>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"
20.0"
y=
"7
0.0"
/>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"
185.0"
y=
"38
0.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"dataStandardMake"
id=
"Shape-dataStandardMake"
>
<omgdc:Bounds
height=
"75.0"
width=
"85.0"
x=
"
80.0"
y=
"50
.0"
/>
<omgdc:Bounds
height=
"75.0"
width=
"85.0"
x=
"
195.0"
y=
"195
.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"75.0"
width=
"85.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"applyTask1"
id=
"Shape-applyTask1"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
210.0"
y=
"60
.0"
/>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
105.0"
y=
"15
.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"exclusivegateway1"
id=
"Shape-exclusivegateway1"
isMarkerVisible=
"false"
>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"3
61.0"
y=
"67
.0"
/>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"3
05.0"
y=
"65
.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"selectStandardApartment"
id=
"Shape-selectStandardApartment"
>
<omgdc:Bounds
height=
"63.0"
width=
"105.0"
x=
"
450.0"
y=
"56
.0"
/>
<omgdc:Bounds
height=
"63.0"
width=
"105.0"
x=
"
600.0"
y=
"270
.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"63.0"
width=
"105.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"writeStandardAttr"
id=
"Shape-writeStandardAttr"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
580.0"
y=
"6
0.0"
/>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
745.0"
y=
"37
0.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"applyTask2"
id=
"Shape-applyTask2"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
710.0"
y=
"23
0.0"
/>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
875.0"
y=
"54
0.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"exclusivegateway2"
id=
"Shape-exclusivegateway2"
isMarkerVisible=
"false"
>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"
638.0"
y=
"23
7.0"
/>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"
803.0"
y=
"54
7.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"applyTask3"
id=
"Shape-applyTask3"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
470.0"
y=
"23
0.0"
/>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
635.0"
y=
"54
0.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"exclusivegateway3"
id=
"Shape-exclusivegateway3"
isMarkerVisible=
"false"
>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"
409.0"
y=
"23
7.0"
/>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"
574.0"
y=
"54
7.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"applyTask4"
id=
"Shape-applyTask4"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
264.0"
y=
"23
0.0"
/>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
429.0"
y=
"54
0.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"exclusivegateway4"
id=
"Shape-exclusivegateway4"
isMarkerVisible=
"false"
>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"
165.0"
y=
"23
7.0"
/>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"
330.0"
y=
"54
7.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"endevent1"
id=
"Shape-endevent1"
>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"
20.0"
y=
"24
0.0"
/>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"
185.0"
y=
"55
0.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"publishStandard"
id=
"Shape-publishStandard"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
82.0"
y=
"28
4.0"
/>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
247.0"
y=
"59
4.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"commentCollction"
id=
"Shape-commentCollction"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
710.0"
y=
"6
0.0"
/>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
875.0"
y=
"37
0.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"askComment"
id=
"Shape-askComment"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
710.0"
y=
"14
0.0"
/>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
875.0"
y=
"45
0.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge
bpmnElement=
"flow29"
id=
"BPMNEdge_flow29"
sourceElement=
"dataStandardMake"
targetElement=
"applyTask1"
>
<omgdi:waypoint
x=
"
165.0"
y=
"87.5
"
/>
<omgdi:waypoint
x=
"2
10.0"
y=
"87.5
"
/>
<omgdi:waypoint
x=
"
202.5"
y=
"195.0
"
/>
<omgdi:waypoint
x=
"2
02.5"
y=
"70.0
"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"-1.0"
width=
"-1.0"
x=
"-1.0"
y=
"-1.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow24"
id=
"BPMNEdge_flow24"
sourceElement=
"exclusivegateway4"
targetElement=
"writeStandardAttr"
>
<omgdi:waypoint
x=
"
185.0"
y=
"24
1.0"
/>
<omgdi:waypoint
x=
"
185.0"
y=
"16
0.0"
/>
<omgdi:waypoint
x=
"
376.0"
y=
"16
0.0"
/>
<omgdi:waypoint
x=
"
485.0"
y=
"16
0.0"
/>
<omgdi:waypoint
x=
"
632.0"
y=
"16
0.0"
/>
<omgdi:waypoint
x=
"
580.0"
y=
"8
7.5"
/>
<omgdi:waypoint
x=
"
350.0"
y=
"55
1.0"
/>
<omgdi:waypoint
x=
"
350.0"
y=
"47
0.0"
/>
<omgdi:waypoint
x=
"
541.0"
y=
"47
0.0"
/>
<omgdi:waypoint
x=
"
650.0"
y=
"47
0.0"
/>
<omgdi:waypoint
x=
"
797.0"
y=
"47
0.0"
/>
<omgdi:waypoint
x=
"
745.0"
y=
"39
7.5"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"14.0"
width=
"7.0"
x=
"185.0"
y=
"237.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow25"
id=
"BPMNEdge_flow25"
sourceElement=
"exclusivegateway2"
targetElement=
"writeStandardAttr"
>
<omgdi:waypoint
x=
"
657.0"
y=
"24
0.0"
/>
<omgdi:waypoint
x=
"
657.0"
y=
"17
3.0"
/>
<omgdi:waypoint
x=
"
657.0"
y=
"15
6.0"
/>
<omgdi:waypoint
x=
"
657.0"
y=
"15
6.0"
/>
<omgdi:waypoint
x=
"
632.0"
y=
"15
6.0"
/>
<omgdi:waypoint
x=
"
632.0"
y=
"15
6.0"
/>
<omgdi:waypoint
x=
"
657.0"
y=
"11
5.0"
/>
<omgdi:waypoint
x=
"
822.0"
y=
"55
0.0"
/>
<omgdi:waypoint
x=
"
822.0"
y=
"48
3.0"
/>
<omgdi:waypoint
x=
"
822.0"
y=
"46
6.0"
/>
<omgdi:waypoint
x=
"
822.0"
y=
"46
6.0"
/>
<omgdi:waypoint
x=
"
797.0"
y=
"46
6.0"
/>
<omgdi:waypoint
x=
"
797.0"
y=
"46
6.0"
/>
<omgdi:waypoint
x=
"
822.0"
y=
"42
5.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"14.0"
width=
"7.0"
x=
"658.0"
y=
"237.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow1"
id=
"BPMNEdge_flow1"
sourceElement=
"startevent1"
targetElement=
"dataStandardMake"
>
<omgdi:waypoint
x=
"
52.0"
y=
"86.0
"
/>
<omgdi:waypoint
x=
"
80.0"
y=
"87.5
"
/>
<omgdi:waypoint
x=
"
206.0"
y=
"380.80131584642936
"
/>
<omgdi:waypoint
x=
"
206.0"
y=
"270.0
"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"-1.0"
width=
"-1.0"
x=
"-1.0"
y=
"-1.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow4"
id=
"BPMNEdge_flow4"
sourceElement=
"exclusivegateway1"
targetElement=
"dataStandardMake"
>
<omgdi:waypoint
x=
"3
80.0"
y=
"96
.0"
/>
<omgdi:waypoint
x=
"
380.0"
y=
"14
8.0"
/>
<omgdi:waypoint
x=
"
251.0"
y=
"14
8.0"
/>
<omgdi:waypoint
x=
"
133.0"
y=
"14
8.0"
/>
<omgdi:waypoint
x=
"
122.5"
y=
"125.0
"
/>
<omgdi:waypoint
x=
"3
37.0"
y=
"81
.0"
/>
<omgdi:waypoint
x=
"
545.0"
y=
"45
8.0"
/>
<omgdi:waypoint
x=
"
416.0"
y=
"45
8.0"
/>
<omgdi:waypoint
x=
"
298.0"
y=
"45
8.0"
/>
<omgdi:waypoint
x=
"
280.0"
y=
"232.5
"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"14.0"
width=
"7.0"
x=
"381.0"
y=
"107.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow5"
id=
"BPMNEdge_flow5"
sourceElement=
"exclusivegateway1"
targetElement=
"selectStandardApartment"
>
<omgdi:waypoint
x=
"393.0"
y=
"83.0"
/>
<omgdi:waypoint
x=
"450.0"
y=
"87.5"
/>
<omgdi:waypoint
x=
"337.0"
y=
"81.0"
/>
<omgdi:waypoint
x=
"650.0"
y=
"180.0"
/>
<omgdi:waypoint
x=
"650.0"
y=
"270.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"14.0"
width=
"8.0"
x=
"401.0"
y=
"87.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow6"
id=
"BPMNEdge_flow6"
sourceElement=
"selectStandardApartment"
targetElement=
"writeStandardAttr"
>
<omgdi:waypoint
x=
"
555.0"
y=
"87
.5"
/>
<omgdi:waypoint
x=
"
580.0"
y=
"8
7.5"
/>
<omgdi:waypoint
x=
"
705.0"
y=
"301
.5"
/>
<omgdi:waypoint
x=
"
745.0"
y=
"39
7.5"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"-1.0"
width=
"-1.0"
x=
"-1.0"
y=
"-1.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow17"
id=
"BPMNEdge_flow17"
sourceElement=
"exclusivegateway4"
targetElement=
"endevent1"
>
<omgdi:waypoint
x=
"
165.0"
y=
"25
3.0"
/>
<omgdi:waypoint
x=
"
52.0"
y=
"25
6.0"
/>
<omgdi:waypoint
x=
"
330.0"
y=
"56
3.0"
/>
<omgdi:waypoint
x=
"
217.0"
y=
"56
6.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"14.0"
width=
"8.0"
x=
"165.0"
y=
"257.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow18"
id=
"BPMNEdge_flow18"
sourceElement=
"exclusivegateway3"
targetElement=
"publishStandard"
>
<omgdi:waypoint
x=
"
428.0"
y=
"26
6.0"
/>
<omgdi:waypoint
x=
"
428.0"
y=
"31
1.0"
/>
<omgdi:waypoint
x=
"
187.0"
y=
"31
1.0"
/>
<omgdi:waypoint
x=
"
593.0"
y=
"57
6.0"
/>
<omgdi:waypoint
x=
"
593.0"
y=
"62
1.0"
/>
<omgdi:waypoint
x=
"
352.0"
y=
"62
1.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"14.0"
width=
"8.0"
x=
"429.0"
y=
"277.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow19"
id=
"BPMNEdge_flow19"
sourceElement=
"publishStandard"
targetElement=
"endevent1"
>
<omgdi:waypoint
x=
"
82.0"
y=
"31
0.0"
/>
<omgdi:waypoint
x=
"
37.0"
y=
"31
0.0"
/>
<omgdi:waypoint
x=
"
37.0"
y=
"27
1.9687194226713"
/>
<omgdi:waypoint
x=
"
247.0"
y=
"62
0.0"
/>
<omgdi:waypoint
x=
"
202.0"
y=
"62
0.0"
/>
<omgdi:waypoint
x=
"
202.0"
y=
"58
1.9687194226713"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"-1.0"
width=
"-1.0"
x=
"-1.0"
y=
"-1.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow13"
id=
"BPMNEdge_flow13"
sourceElement=
"applyTask3"
targetElement=
"exclusivegateway3"
>
<omgdi:waypoint
x=
"
470.0"
y=
"25
7.5"
/>
<omgdi:waypoint
x=
"
441.0"
y=
"25
3.0"
/>
<omgdi:waypoint
x=
"
635.0"
y=
"56
7.5"
/>
<omgdi:waypoint
x=
"
606.0"
y=
"56
3.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"-1.0"
width=
"-1.0"
x=
"-1.0"
y=
"-1.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow15"
id=
"BPMNEdge_flow15"
sourceElement=
"applyTask4"
targetElement=
"exclusivegateway4"
>
<omgdi:waypoint
x=
"
264.0"
y=
"25
7.5"
/>
<omgdi:waypoint
x=
"
197.0"
y=
"25
3.0"
/>
<omgdi:waypoint
x=
"
429.0"
y=
"56
7.5"
/>
<omgdi:waypoint
x=
"
362.0"
y=
"56
3.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"-1.0"
width=
"-1.0"
x=
"-1.0"
y=
"-1.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow16"
id=
"BPMNEdge_flow16"
sourceElement=
"exclusivegateway3"
targetElement=
"applyTask4"
>
<omgdi:waypoint
x=
"
409.0"
y=
"25
3.0"
/>
<omgdi:waypoint
x=
"
369.0"
y=
"25
7.5"
/>
<omgdi:waypoint
x=
"
574.0"
y=
"56
3.0"
/>
<omgdi:waypoint
x=
"
534.0"
y=
"56
7.5"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"14.0"
width=
"7.0"
x=
"409.0"
y=
"257.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow31"
id=
"BPMNEdge_flow31"
sourceElement=
"applyTask2"
targetElement=
"exclusivegateway2"
>
<omgdi:waypoint
x=
"
710.0"
y=
"25
7.5"
/>
<omgdi:waypoint
x=
"
670.0"
y=
"25
3.0"
/>
<omgdi:waypoint
x=
"
875.0"
y=
"56
7.5"
/>
<omgdi:waypoint
x=
"
835.0"
y=
"56
3.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"-1.0"
width=
"-1.0"
x=
"-1.0"
y=
"-1.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow32"
id=
"BPMNEdge_flow32"
sourceElement=
"writeStandardAttr"
targetElement=
"commentCollction"
>
<omgdi:waypoint
x=
"
685.0"
y=
"8
7.5"
/>
<omgdi:waypoint
x=
"
710.0"
y=
"8
7.5"
/>
<omgdi:waypoint
x=
"
850.0"
y=
"39
7.5"
/>
<omgdi:waypoint
x=
"
875.0"
y=
"39
7.5"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"-1.0"
width=
"-1.0"
x=
"-1.0"
y=
"-1.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow11"
id=
"BPMNEdge_flow11"
sourceElement=
"exclusivegateway2"
targetElement=
"applyTask3"
>
<omgdi:waypoint
x=
"
638.0"
y=
"25
3.0"
/>
<omgdi:waypoint
x=
"
575.0"
y=
"25
7.5"
/>
<omgdi:waypoint
x=
"
803.0"
y=
"56
3.0"
/>
<omgdi:waypoint
x=
"
740.0"
y=
"56
7.5"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"14.0"
width=
"8.0"
x=
"638.0"
y=
"257.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow33"
id=
"BPMNEdge_flow33"
sourceElement=
"commentCollction"
targetElement=
"askComment"
>
<omgdi:waypoint
x=
"
762.5"
y=
"11
5.0"
/>
<omgdi:waypoint
x=
"
762.5"
y=
"14
0.0"
/>
<omgdi:waypoint
x=
"
927.5"
y=
"42
5.0"
/>
<omgdi:waypoint
x=
"
927.5"
y=
"45
0.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"-1.0"
width=
"-1.0"
x=
"-1.0"
y=
"-1.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow34"
id=
"BPMNEdge_flow34"
sourceElement=
"askComment"
targetElement=
"applyTask2"
>
<omgdi:waypoint
x=
"
762.5"
y=
"19
5.0"
/>
<omgdi:waypoint
x=
"
762.5"
y=
"23
0.0"
/>
<omgdi:waypoint
x=
"
927.5"
y=
"50
5.0"
/>
<omgdi:waypoint
x=
"
927.5"
y=
"54
0.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"-1.0"
width=
"-1.0"
x=
"-1.0"
y=
"-1.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow30"
id=
"BPMNEdge_flow30"
sourceElement=
"applyTask1"
targetElement=
"exclusivegateway1"
>
<omgdi:waypoint
x=
"
315.0"
y=
"87
.5"
/>
<omgdi:waypoint
x=
"3
61.0"
y=
"83
.0"
/>
<omgdi:waypoint
x=
"
210.0"
y=
"42
.5"
/>
<omgdi:waypoint
x=
"3
05.0"
y=
"81
.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"-1.0"
width=
"-1.0"
x=
"-1.0"
y=
"-1.0"
/>
</bpmndi:BPMNLabel>
...
...
src/main/resources/RecordProcess.bpmn
View file @
de4dddd3
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions
xmlns=
"http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:activiti=
"http://activiti.org/bpmn"
xmlns:bpmndi=
"http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:omgdc=
"http://www.omg.org/spec/DD/20100524/DC"
xmlns:omgdi=
"http://www.omg.org/spec/DD/20100524/DI"
xmlns:tns=
"http://www.activiti.org/test"
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
expressionLanguage=
"http://www.w3.org/1999/XPath"
id=
"m1583334145142"
name=
""
targetNamespace=
"http://www.activiti.org/test"
typeLanguage=
"http://www.w3.org/2001/XMLSchema"
>
<process
id=
"testProcess"
isClosed=
"false"
isExecutable=
"true"
name=
"Test process"
processType=
"None"
>
<startEvent
id=
"startevent1"
name=
"流程开始"
/>
<endEvent
id=
"endevent1"
name=
"End"
/>
<userTask
activiti:assignee=
"chenws"
activiti:candidateUsers=
"${activityDemoServiceImpl.findUsersForSP(execution)}"
activiti:exclusive=
"true"
id=
"usertask2"
name=
"审批数据"
/>
<exclusiveGateway
gatewayDirection=
"Unspecified"
id=
"exclusivegateway3"
name=
"Exclusive Gateway"
/>
<serviceTask
activiti:exclusive=
"true"
activiti:expression=
"#{activityDemoServiceImpl.updateBizStatus(execution,"qf")}"
id=
"servicetask2"
name=
"数据符合"
/>
<serviceTask
activiti:exclusive=
"true"
activiti:expression=
"#{activityDemoServiceImpl.updateBizStatus(execution,"bq")}"
id=
"servicetask3"
name=
"数据填写不符合"
/>
<sequenceFlow
id=
"flow5"
sourceRef=
"usertask2"
targetRef=
"exclusivegateway3"
/>
<sequenceFlow
id=
"flow6"
skipExpression=
"${sign=='true'}"
sourceRef=
"exclusivegateway3"
targetRef=
"servicetask2"
/>
<sequenceFlow
id=
"flow7"
sourceRef=
"servicetask2"
targetRef=
"endevent1"
/>
<sequenceFlow
id=
"flow8"
skipExpression=
"${sign=='false'}"
sourceRef=
"exclusivegateway3"
targetRef=
"servicetask3"
/>
<userTask
activiti:assignee=
"管理"
activiti:async=
"false"
activiti:exclusive=
"true"
id=
"_2"
name=
"发起流程"
/>
<sequenceFlow
id=
"_3"
sourceRef=
"startevent1"
targetRef=
"_2"
/>
<userTask
activiti:assignee=
"管理"
activiti:exclusive=
"true"
id=
"_4"
name=
"添加补录模板"
/>
<sequenceFlow
id=
"_5"
sourceRef=
"_2"
targetRef=
"_4"
/>
<userTask
activiti:assignee=
"chenws"
activiti:exclusive=
"true"
id=
"_6"
name=
"补录人员填写模板"
/>
<sequenceFlow
id=
"_7"
sourceRef=
"_4"
targetRef=
"_6"
/>
<sequenceFlow
id=
"_8"
sourceRef=
"_6"
targetRef=
"usertask2"
/>
<sequenceFlow
id=
"_9"
sourceRef=
"servicetask3"
targetRef=
"_6"
/>
<process
id=
"RecordProcess"
isClosed=
"false"
isExecutable=
"true"
name=
"RecordProcess"
processType=
"None"
>
<startEvent
id=
"startEvent"
name=
"流程开始"
>
<extensionElements>
<activiti:executionListener
event=
"start"
/>
</extensionElements>
</startEvent>
<endEvent
id=
"endEvent"
name=
"End"
/>
<userTask
activiti:assignee=
"chenws"
activiti:candidateUsers=
"${activityDemoServiceImpl.findUsersForSP(execution)}"
activiti:exclusive=
"true"
id=
"checkData"
name=
"审批数据"
/>
<exclusiveGateway
gatewayDirection=
"Unspecified"
id=
"isDataPass"
name=
"数据是否正确通过"
>
<extensionElements>
<activiti:executionListener
event=
"start"
>
<activiti:field>
<activiti:string/>
</activiti:field>
</activiti:executionListener>
</extensionElements>
</exclusiveGateway>
<sequenceFlow
id=
"flow5"
sourceRef=
"checkData"
targetRef=
"isDataPass"
/>
<userTask
activiti:assignee=
"管理"
activiti:exclusive=
"true"
id=
"addExcel"
name=
"添加补录模板"
>
<extensionElements>
<activiti:taskListener
event=
"create"
/>
</extensionElements>
</userTask>
<userTask
activiti:assignee=
"chenws"
activiti:candidateUsers=
"${userIds}"
activiti:exclusive=
"true"
id=
"addData"
name=
"补录人员填写模板"
/>
<sequenceFlow
id=
"_7"
sourceRef=
"addExcel"
targetRef=
"addData"
/>
<sequenceFlow
id=
"_8"
sourceRef=
"addData"
targetRef=
"checkData"
/>
<sequenceFlow
id=
"_10"
sourceRef=
"startEvent"
targetRef=
"addExcel"
/>
<sequenceFlow
id=
"_12"
skipExpression=
"${sign=='false'}"
sourceRef=
"isDataPass"
targetRef=
"addData"
>
<conditionExpression
xsi:type=
"tFormalExpression"
>
<![CDATA[
]]>
</conditionExpression>
</sequenceFlow>
<sequenceFlow
id=
"_13"
sourceRef=
"isDataPass"
targetRef=
"endEvent"
>
<extensionElements>
<activiti:executionListener
event=
"start"
/>
</extensionElements>
<conditionExpression
xsi:type=
"tFormalExpression"
>
<![CDATA[
]]>
</conditionExpression>
</sequenceFlow>
</process>
<bpmndi:BPMNDiagram
documentation=
"background=#3C3F41;count=1;horizontalcount=1;orientation=0;width=842.4;height=1195.2;imageableWidth=832.4;imageableHeight=1185.2;imageableX=5.0;imageableY=5.0"
id=
"Diagram-_1"
name=
"New Diagram"
>
<bpmndi:BPMNPlane
bpmnElement=
"
test
Process"
>
<bpmndi:BPMNShape
bpmnElement=
"start
event1"
id=
"Shape-startevent1
"
>
<bpmndi:BPMNPlane
bpmnElement=
"
Record
Process"
>
<bpmndi:BPMNShape
bpmnElement=
"start
Event"
id=
"Shape-startEvent
"
>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"450.0"
y=
"45.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"end
event1"
id=
"Shape-endevent1
"
>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"
645.0"
y=
"680
.0"
/>
<bpmndi:BPMNShape
bpmnElement=
"end
Event"
id=
"Shape-endEvent
"
>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"
455.0"
y=
"675
.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"
usertask2"
id=
"Shape-usertask2
"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"4
20.0"
y=
"450
.0"
/>
<bpmndi:BPMNShape
bpmnElement=
"
checkData"
id=
"Shape-checkData
"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"4
10.0"
y=
"445
.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"
exclusivegateway3"
id=
"Shape-exclusivegateway3
"
isMarkerVisible=
"false"
>
<bpmndi:BPMNShape
bpmnElement=
"
isDataPass"
id=
"Shape-isDataPass
"
isMarkerVisible=
"false"
>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"455.0"
y=
"545.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"
servicetask2"
id=
"Shape-servicetask2
"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
605.0"
y=
"53
5.0"
/>
<bpmndi:BPMNShape
bpmnElement=
"
addExcel"
id=
"Shape-addExcel
"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"
415.0"
y=
"20
5.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"
servicetask3"
id=
"Shape-servicetask3
"
>
<omgdc:Bounds
height=
"
55.0"
width=
"105.0"
x=
"245.0"
y=
"53
5.0"
/>
<bpmndi:BPMNShape
bpmnElement=
"
addData"
id=
"Shape-addData
"
>
<omgdc:Bounds
height=
"
70.0"
width=
"105.0"
x=
"400.0"
y=
"31
5.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"_2"
id=
"Shape-_2"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"420.0"
y=
"155.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"0.0"
y=
"0.0"
/>
<omgdc:Bounds
height=
"70.0"
width=
"105.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"_4"
id=
"Shape-_4"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"415.0"
y=
"235.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"_6"
id=
"Shape-_6"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"415.0"
y=
"335.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge
bpmnElement=
"_3"
id=
"BPMNEdge__3"
sourceElement=
"startevent1"
targetElement=
"_2"
>
<omgdi:waypoint
x=
"466.0"
y=
"77.0"
/>
<omgdi:waypoint
x=
"466.0"
y=
"155.0"
/>
<bpmndi:BPMNEdge
bpmnElement=
"_13"
id=
"BPMNEdge__13"
sourceElement=
"isDataPass"
targetElement=
"endEvent"
>
<omgdi:waypoint
x=
"471.0"
y=
"577.0"
/>
<omgdi:waypoint
x=
"471.0"
y=
"675.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"0.0"
width=
"0.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"_5"
id=
"BPMNEdge__5"
sourceElement=
"_2"
targetElement=
"_4"
>
<omgdi:waypoint
x=
"470.0"
y=
"210.0"
/>
<omgdi:waypoint
x=
"470.0"
y=
"235.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"0.0"
width=
"0.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow5"
id=
"BPMNEdge_flow5"
sourceElement=
"usertask2"
targetElement=
"exclusivegateway3"
>
<omgdi:waypoint
x=
"471.0"
y=
"505.0"
/>
<omgdi:waypoint
x=
"471.0"
y=
"545.0"
/>
<bpmndi:BPMNEdge
bpmnElement=
"_12"
id=
"BPMNEdge__12"
sourceElement=
"isDataPass"
targetElement=
"addData"
>
<omgdi:waypoint
x=
"458.0"
y=
"558.0"
/>
<omgdi:waypoint
x=
"350.0"
y=
"558.0"
/>
<omgdi:waypoint
x=
"400.0"
y=
"350.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"-1.0"
width=
"-1.0"
x=
"-1.0"
y=
"-1.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow6"
id=
"BPMNEdge_flow6"
sourceElement=
"exclusivegateway3"
targetElement=
"servicetask2"
>
<omgdi:waypoint
x=
"486.0"
y=
"560.0"
/>
<omgdi:waypoint
x=
"560.0"
y=
"560.0"
/>
<omgdi:waypoint
x=
"605.0"
y=
"560.0"
/>
<bpmndi:BPMNEdge
bpmnElement=
"flow5"
id=
"BPMNEdge_flow5"
sourceElement=
"checkData"
targetElement=
"isDataPass"
>
<omgdi:waypoint
x=
"471.0"
y=
"500.0"
/>
<omgdi:waypoint
x=
"471.0"
y=
"545.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"-1.0"
width=
"-1.0"
x=
"-1.0"
y=
"-1.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"_7"
id=
"BPMNEdge__7"
sourceElement=
"
_4"
targetElement=
"_6
"
>
<omgdi:waypoint
x=
"46
7.5"
y=
"29
0.0"
/>
<omgdi:waypoint
x=
"46
7.5"
y=
"33
5.0"
/>
<bpmndi:BPMNEdge
bpmnElement=
"_7"
id=
"BPMNEdge__7"
sourceElement=
"
addExcel"
targetElement=
"addData
"
>
<omgdi:waypoint
x=
"46
0.0"
y=
"26
0.0"
/>
<omgdi:waypoint
x=
"46
0.0"
y=
"31
5.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"0.0"
width=
"0.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow7"
id=
"BPMNEdge_flow7"
sourceElement=
"servicetask2"
targetElement=
"endevent1"
>
<omgdi:waypoint
x=
"661.0"
y=
"590.0"
/>
<omgdi:waypoint
x=
"661.0"
y=
"680.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"-1.0"
width=
"-1.0"
x=
"-1.0"
y=
"-1.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"_8"
id=
"BPMNEdge__8"
sourceElement=
"_6"
targetElement=
"usertask2"
>
<omgdi:waypoint
x=
"470.0"
y=
"390.0"
/>
<omgdi:waypoint
x=
"470.0"
y=
"450.0"
/>
<bpmndi:BPMNEdge
bpmnElement=
"_8"
id=
"BPMNEdge__8"
sourceElement=
"addData"
targetElement=
"checkData"
>
<omgdi:waypoint
x=
"457.5"
y=
"385.0"
/>
<omgdi:waypoint
x=
"457.5"
y=
"445.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"0.0"
width=
"0.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow8"
id=
"BPMNEdge_flow8"
sourceElement=
"exclusivegateway3"
targetElement=
"servicetask3"
>
<omgdi:waypoint
x=
"456.0"
y=
"560.0"
/>
<omgdi:waypoint
x=
"395.0"
y=
"560.0"
/>
<omgdi:waypoint
x=
"350.0"
y=
"560.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"-1.0"
width=
"-1.0"
x=
"-1.0"
y=
"-1.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"_9"
id=
"BPMNEdge__9"
sourceElement=
"servicetask3"
targetElement=
"_6"
>
<omgdi:waypoint
x=
"290.0"
y=
"535.0"
/>
<omgdi:waypoint
x=
"290.0"
y=
"450.0"
/>
<omgdi:waypoint
x=
"415.0"
y=
"362.5"
/>
<bpmndi:BPMNEdge
bpmnElement=
"_10"
id=
"BPMNEdge__10"
sourceElement=
"startEvent"
targetElement=
"addExcel"
>
<omgdi:waypoint
x=
"466.0"
y=
"77.0"
/>
<omgdi:waypoint
x=
"466.0"
y=
"205.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"0.0"
width=
"0.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
...
...
src/main/resources/RecordStandardProcess.bpmn
0 → 100644
View file @
de4dddd3
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions
xmlns=
"http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:activiti=
"http://activiti.org/bpmn"
xmlns:bpmndi=
"http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:dc=
"http://www.omg.org/spec/DD/20100524/DC"
xmlns:di=
"http://www.omg.org/spec/DD/20100524/DI"
xmlns:tns=
"http://www.activiti.org/testm1583600477586"
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
expressionLanguage=
"http://www.w3.org/1999/XPath"
id=
"m1583600477586"
name=
""
targetNamespace=
"http://www.activiti.org/testm1583600477586"
typeLanguage=
"http://www.w3.org/2001/XMLSchema"
>
<process
id=
"RecordStandardProcess"
isClosed=
"false"
isExecutable=
"true"
name=
"RecordStandardProcess"
processType=
"None"
>
<startEvent
id=
"RecordStartEvent"
name=
"StartEvent"
/>
<userTask
activiti:assignee=
"${userId}"
activiti:exclusive=
"true"
id=
"addData"
name=
"填写补录报表"
/>
<userTask
activiti:assignee=
"${managerId}"
activiti:exclusive=
"true"
id=
"addExcel"
name=
"发起流程添加模板"
/>
<userTask
activiti:assignee=
"${judgeId}"
activiti:exclusive=
"true"
id=
"JudgeData"
name=
"审核数据"
/>
<endEvent
id=
"RecordEndEvent"
name=
"EndEvent"
/>
<sequenceFlow
id=
"_8"
sourceRef=
"RecordStartEvent"
targetRef=
"addExcel"
/>
<sequenceFlow
id=
"_9"
sourceRef=
"addExcel"
targetRef=
"addData"
/>
<sequenceFlow
id=
"_7"
sourceRef=
"addData"
targetRef=
"JudgeData"
/>
<exclusiveGateway
gatewayDirection=
"Unspecified"
id=
"JudgeGateway"
name=
"JudgeGateway"
/>
<sequenceFlow
id=
"_11"
sourceRef=
"JudgeData"
targetRef=
"JudgeGateway"
/>
<sequenceFlow
id=
"_12"
sourceRef=
"JudgeGateway"
targetRef=
"RecordEndEvent"
>
<conditionExpression
xsi:type=
"tFormalExpression"
>
<![CDATA[${pass = true}]]>
</conditionExpression>
</sequenceFlow>
<sequenceFlow
id=
"_13"
sourceRef=
"JudgeGateway"
targetRef=
"addData"
>
<conditionExpression
xsi:type=
"tFormalExpression"
>
<![CDATA[${pass = false}]]>
</conditionExpression>
</sequenceFlow>
</process>
<bpmndi:BPMNDiagram
documentation=
"background=#3C3F41;count=1;horizontalcount=1;orientation=0;width=842.4;height=1195.2;imageableWidth=832.4;imageableHeight=1185.2;imageableX=5.0;imageableY=5.0"
id=
"Diagram-_1"
name=
"New Diagram"
>
<bpmndi:BPMNPlane
bpmnElement=
"RecordStandardProcess"
>
<bpmndi:BPMNShape
bpmnElement=
"RecordStartEvent"
id=
"Shape-RecordStartEvent"
>
<dc:Bounds
height=
"32.0"
width=
"32.0"
x=
"625.0"
y=
"35.0"
/>
<bpmndi:BPMNLabel>
<dc:Bounds
height=
"32.0"
width=
"32.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"addData"
id=
"Shape-addData"
>
<dc:Bounds
height=
"55.0"
width=
"85.0"
x=
"595.0"
y=
"215.0"
/>
<bpmndi:BPMNLabel>
<dc:Bounds
height=
"55.0"
width=
"85.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"addExcel"
id=
"Shape-addExcel"
>
<dc:Bounds
height=
"55.0"
width=
"85.0"
x=
"600.0"
y=
"110.0"
/>
<bpmndi:BPMNLabel>
<dc:Bounds
height=
"55.0"
width=
"85.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"JudgeData"
id=
"Shape-JudgeData"
>
<dc:Bounds
height=
"55.0"
width=
"85.0"
x=
"590.0"
y=
"325.0"
/>
<bpmndi:BPMNLabel>
<dc:Bounds
height=
"55.0"
width=
"85.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"RecordEndEvent"
id=
"Shape-RecordEndEvent"
>
<dc:Bounds
height=
"32.0"
width=
"32.0"
x=
"620.0"
y=
"565.0"
/>
<bpmndi:BPMNLabel>
<dc:Bounds
height=
"32.0"
width=
"32.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"JudgeGateway"
id=
"Shape-JudgeGateway"
isMarkerVisible=
"false"
>
<dc:Bounds
height=
"32.0"
width=
"32.0"
x=
"620.0"
y=
"455.0"
/>
<bpmndi:BPMNLabel>
<dc:Bounds
height=
"32.0"
width=
"32.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge
bpmnElement=
"_13"
id=
"BPMNEdge__13"
sourceElement=
"_10"
targetElement=
"_3"
>
<di:waypoint
x=
"620.0"
y=
"471.0"
/>
<di:waypoint
x=
"500.0"
y=
"345.0"
/>
<di:waypoint
x=
"595.0"
y=
"242.5"
/>
<bpmndi:BPMNLabel>
<dc:Bounds
height=
"0.0"
width=
"0.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"_12"
id=
"BPMNEdge__12"
sourceElement=
"_10"
targetElement=
"_6"
>
<di:waypoint
x=
"636.0"
y=
"487.0"
/>
<di:waypoint
x=
"636.0"
y=
"565.0"
/>
<bpmndi:BPMNLabel>
<dc:Bounds
height=
"0.0"
width=
"0.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"_7"
id=
"BPMNEdge__7"
sourceElement=
"_3"
targetElement=
"_5"
>
<di:waypoint
x=
"635.0"
y=
"270.0"
/>
<di:waypoint
x=
"635.0"
y=
"325.0"
/>
<bpmndi:BPMNLabel>
<dc:Bounds
height=
"0.0"
width=
"0.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"_8"
id=
"BPMNEdge__8"
sourceElement=
"_2"
targetElement=
"_4"
>
<di:waypoint
x=
"641.0"
y=
"67.0"
/>
<di:waypoint
x=
"641.0"
y=
"110.0"
/>
<bpmndi:BPMNLabel>
<dc:Bounds
height=
"0.0"
width=
"0.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"_9"
id=
"BPMNEdge__9"
sourceElement=
"_4"
targetElement=
"_3"
>
<di:waypoint
x=
"640.0"
y=
"165.0"
/>
<di:waypoint
x=
"640.0"
y=
"215.0"
/>
<bpmndi:BPMNLabel>
<dc:Bounds
height=
"0.0"
width=
"0.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"_11"
id=
"BPMNEdge__11"
sourceElement=
"_5"
targetElement=
"_10"
>
<di:waypoint
x=
"636.0"
y=
"380.0"
/>
<di:waypoint
x=
"636.0"
y=
"455.0"
/>
<bpmndi:BPMNLabel>
<dc:Bounds
height=
"0.0"
width=
"0.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
src/main/resources/application-test.yml
View file @
de4dddd3
...
...
@@ -11,8 +11,8 @@ spring:
jpa
:
show-sql
:
true
database-platform
:
org.hibernate.dialect.MySQL5Dialect
# hibernate:
# ddl-auto: update
# hibernate:
# ddl-auto: update
datasource
:
url
:
jdbc:mysql://47.105.193.165:3306/test?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username
:
root
...
...
@@ -49,11 +49,11 @@ server:
app
:
active-process
:
RecordProcess.bpmn
active-process
:
Record
Standard
Process.bpmn
swagger2
:
host
:
localhost:8110
#
host: 47.105.236.43/activiti
#
host: localhost:8110
host
:
47.105.236.43/activiti
...
...
src/main/resources/demo.bpmn
deleted
100644 → 0
View file @
c8c89bc8
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions
xmlns=
"http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:activiti=
"http://activiti.org/bpmn"
xmlns:bpmndi=
"http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:omgdc=
"http://www.omg.org/spec/DD/20100524/DC"
xmlns:omgdi=
"http://www.omg.org/spec/DD/20100524/DI"
xmlns:tns=
"http://www.activiti.org/test"
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
expressionLanguage=
"http://www.w3.org/1999/XPath"
id=
"m1583416072125"
name=
""
targetNamespace=
"http://www.activiti.org/test"
typeLanguage=
"http://www.w3.org/2001/XMLSchema"
>
<process
id=
"demo"
isClosed=
"false"
isExecutable=
"true"
name=
"demo"
processType=
"None"
>
<startEvent
id=
"Start"
name=
"Start"
/>
<userTask
activiti:assignee=
"chenws"
activiti:exclusive=
"true"
id=
"请假"
name=
"请假"
/>
<sequenceFlow
id=
"_4"
sourceRef=
"Start"
targetRef=
"请假"
/>
<userTask
activiti:assignee=
"主管"
activiti:exclusive=
"true"
id=
"主管"
name=
"主管"
/>
<sequenceFlow
id=
"_6"
sourceRef=
"请假"
targetRef=
"主管"
/>
<userTask
activiti:assignee=
"总监"
activiti:exclusive=
"true"
id=
"总监"
name=
"总监"
/>
<sequenceFlow
id=
"_8"
sourceRef=
"主管"
targetRef=
"总监"
/>
<endEvent
id=
"_9"
name=
"EndEvent"
/>
<sequenceFlow
id=
"_10"
sourceRef=
"总监"
targetRef=
"_9"
/>
</process>
<bpmndi:BPMNDiagram
documentation=
"background=#3C3F41;count=1;horizontalcount=1;orientation=0;width=842.4;height=1195.2;imageableWidth=832.4;imageableHeight=1185.2;imageableX=5.0;imageableY=5.0"
id=
"Diagram-_1"
name=
"New Diagram"
>
<bpmndi:BPMNPlane
bpmnElement=
"demo"
>
<bpmndi:BPMNShape
bpmnElement=
"Start"
id=
"Shape-Start"
>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"50.0"
y=
"120.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"请假"
id=
"Shape-请假"
>
<omgdc:Bounds
height=
"55.0"
width=
"85.0"
x=
"155.0"
y=
"115.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"55.0"
width=
"85.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"主管"
id=
"Shape-主管"
>
<omgdc:Bounds
height=
"55.0"
width=
"85.0"
x=
"325.0"
y=
"120.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"55.0"
width=
"85.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"总监"
id=
"Shape-总监"
>
<omgdc:Bounds
height=
"55.0"
width=
"85.0"
x=
"465.0"
y=
"135.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"55.0"
width=
"85.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"_9"
id=
"Shape-_9"
>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"605.0"
y=
"135.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"32.0"
width=
"32.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge
bpmnElement=
"_4"
id=
"BPMNEdge__4"
sourceElement=
"Start"
targetElement=
"_3"
>
<omgdi:waypoint
x=
"82.0"
y=
"136.0"
/>
<omgdi:waypoint
x=
"155.0"
y=
"142.5"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"0.0"
width=
"0.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"_6"
id=
"BPMNEdge__6"
sourceElement=
"_3"
targetElement=
"主管"
>
<omgdi:waypoint
x=
"240.0"
y=
"142.5"
/>
<omgdi:waypoint
x=
"325.0"
y=
"147.5"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"0.0"
width=
"0.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"_8"
id=
"BPMNEdge__8"
sourceElement=
"主管"
targetElement=
"总监"
>
<omgdi:waypoint
x=
"410.0"
y=
"147.5"
/>
<omgdi:waypoint
x=
"465.0"
y=
"162.5"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"0.0"
width=
"0.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"_10"
id=
"BPMNEdge__10"
sourceElement=
"总监"
targetElement=
"_9"
>
<omgdi:waypoint
x=
"550.0"
y=
"162.5"
/>
<omgdi:waypoint
x=
"605.0"
y=
"151.0"
/>
<bpmndi:BPMNLabel>
<omgdc:Bounds
height=
"0.0"
width=
"0.0"
x=
"0.0"
y=
"0.0"
/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
src/main/resources/demo.bpmn.png
deleted
100644 → 0
View file @
c8c89bc8
3.84 KB
src/test/java/com/keymobile/ProcessTest.java
View file @
de4dddd3
...
...
@@ -56,35 +56,54 @@ public class ProcessTest {
// try {
ProcessEngine
processEngine
=
ProcessEngines
.
getDefaultProcessEngine
();
ProcessEngine
processEngine
=
ProcessEngines
.
getDefaultProcessEngine
();
//
//
List<ProcessDefinition> processDefList = processEngine.getRepositoryService().createProcessDefinitionQuery()
//
.orderByProcessDefinitionVersion().asc()//按照版本的升序排列
//
.list();
//
for (ProcessDefinition processDefinition : processDefList) {
List
<
ProcessDefinition
>
processDefList
=
processEngine
.
getRepositoryService
().
createProcessDefinitionQuery
()
.
orderByProcessDefinitionVersion
().
asc
()
//按照版本的升序排列
.
list
();
for
(
ProcessDefinition
processDefinition
:
processDefList
)
{
// System.out.println(processDefinition.getName());
//
// runtimeService.startProcessInstanceByKey(processDefinition.getKey());//流程的名称,也可以使用ByID来启动流
// repositoryService.deleteDeployment(processDefinition.getDeploymentId());
// repositoryService.suspendProcessDefinitionByKey(processDefinition.getKey());
// HistoricProcessInstanceQuery historicProcessInstanceQuery = historyService.createHistoricProcessInstanceQuery();
// historicProcessInstanceQuery.processDefinitionId(processDefinition.getId());
// List<HistoricProcessInstance> list = historicProcessInstanceQuery.list();
//
// list.forEach(pi -> {
// runtimeService.suspendProcessInstanceById(pi.getId()); // 挂起流程
// runtimeService.deleteProcessInstance(pi.getId(), "删除原因");//删除流程
// });
try
{
repositoryService
.
deleteDeployment
(
processDefinition
.
getDeploymentId
());
}
catch
(
Exception
e
)
{
// }
}
try
{
repositoryService
.
suspendProcessDefinitionByKey
(
processDefinition
.
getKey
());
}
catch
(
Exception
e
)
{
List
<
Task
>
tasks
=
processEngine
.
getTaskService
().
createTaskQuery
().
taskAssignee
(
"chenws"
).
list
();
for
(
Task
task
:
tasks
)
{
System
.
out
.
println
(
task
.
getName
()
+
"***"
+
task
.
getAssignee
());
}
HistoricProcessInstanceQuery
historicProcessInstanceQuery
=
historyService
.
createHistoricProcessInstanceQuery
();
historicProcessInstanceQuery
.
processDefinitionId
(
processDefinition
.
getId
());
List
<
HistoricProcessInstance
>
list
=
historicProcessInstanceQuery
.
list
();
list
.
forEach
(
pi
->
{
try
{
runtimeService
.
suspendProcessInstanceById
(
pi
.
getId
());
// 挂起流程
}
catch
(
Exception
e
)
{
}
try
{
runtimeService
.
deleteProcessInstance
(
pi
.
getId
(),
"删除原因"
);
//删除流程
}
catch
(
Exception
e
)
{
}
});
}
// List<Task> tasks = processEngine.getTaskService().createTaskQuery().taskAssignee("chenws").list();
// for (Task task : tasks) {
// System.out.println(task.getName() + "***" + task.getAssignee());
// }
// DeploymentBuilder deployBuilder = repositoryService.createDeployment().;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment