Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Springboot Plus
Commits
82e0fcee
Commit
82e0fcee
authored
Apr 15, 2018
by
xiandafu
Browse files
workflow api
parent
fb8274e9
Changes
27
Hide whitespace changes
Inline
Side-by-side
admin-workflow/.gitignore
0 → 100644
View file @
82e0fcee
/target/
admin-workflow/pom.xml
0 → 100644
View file @
82e0fcee
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.ibeetl
</groupId>
<artifactId>
admin-workflow
</artifactId>
<version>
1.1.1
</version>
<packaging>
jar
</packaging>
<name>
workflow
</name>
<url>
http://maven.apache.org
</url>
<properties>
<java.version>
1.8
</java.version>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<commons-lang3.version>
3.3.2
</commons-lang3.version>
</properties>
<parent>
<groupId>
com.ibeetl
</groupId>
<artifactId>
admin-cloud
</artifactId>
<version>
1.1.1
</version>
</parent>
<dependencies>
<dependency>
<groupId>
org.flowable
</groupId>
<artifactId>
flowable-spring-boot-starter
</artifactId>
<version>
6.3.0
</version>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
5.1.45
</version>
</dependency>
<!-- <dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>6.0.5</version>
</dependency> -->
</dependencies>
</project>
admin-workflow/src/main/java/com/ibeetl/starter/workflow/App.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow
;
import
org.flowable.engine.RepositoryService
;
import
org.flowable.engine.RuntimeService
;
import
org.flowable.engine.TaskService
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.context.annotation.Bean
;
@SpringBootApplication
public
class
App
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
App
.
class
,
args
);
}
@Bean
public
CommandLineRunner
init
(
final
RepositoryService
repositoryService
,
final
RuntimeService
runtimeService
,
final
TaskService
taskService
)
{
return
new
CommandLineRunner
()
{
@Override
public
void
run
(
String
...
strings
)
throws
Exception
{
System
.
out
.
println
(
"Number of process definitions : "
+
repositoryService
.
createProcessDefinitionQuery
().
count
());
System
.
out
.
println
(
"Number of tasks : "
+
taskService
.
createTaskQuery
().
count
());
// runtimeService.startProcessInstanceByKey("simple");
System
.
out
.
println
(
"Number of tasks after process start: "
+
taskService
.
createTaskQuery
().
count
());
}
};
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/config/WorkflowConfig.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow.config
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
com.ibeetl.starter.workflow.event.ProcessEndEvent
;
import
com.ibeetl.starter.workflow.event.ProcessStartEvent
;
import
com.ibeetl.starter.workflow.event.TaskEndEvent
;
import
com.ibeetl.starter.workflow.event.TaskOwnerChangeEvent
;
import
com.ibeetl.starter.workflow.event.TaskStartEvent
;
import
com.ibeetl.starter.workflow.event.TaslClaimEvent
;
import
com.ibeetl.starter.workflow.service.WfNotifyService
;
@Configuration
public
class
WorkflowConfig
{
Log
log
=
LogFactory
.
getLog
(
WorkflowConfig
.
class
);
@Autowired
ApplicationContext
applicationContext
;
/**
* 如果没有配置通知接口,默认打印出消息
* @return
*/
@Bean
@ConditionalOnMissingBean
(
WfNotifyService
.
class
)
public
WfNotifyService
WfNotifyService
()
{
return
new
WfNotifyService
()
{
Log
log
=
LogFactory
.
getLog
(
this
.
getClass
());
@Override
public
void
taskStart
(
TaskStartEvent
startEvent
)
{
log
.
info
(
startEvent
);
}
@Override
public
void
taskEnd
(
TaskEndEvent
endEvent
)
{
log
.
info
(
endEvent
);
}
@Override
public
void
processEnd
(
ProcessEndEvent
endEvent
)
{
log
.
info
(
endEvent
);
}
@Override
public
void
taskOwnerChanged
(
TaskOwnerChangeEvent
changeEvent
)
{
log
.
info
(
changeEvent
);
}
@Override
public
void
taskClaim
(
TaslClaimEvent
claimEvent
)
{
log
.
info
(
claimEvent
);
}
@Override
public
void
processStart
(
ProcessStartEvent
startEvent
)
{
log
.
info
(
startEvent
);
}
@Override
public
void
taskPause
(
String
taskInsId
)
{
log
.
info
(
"taskIns "
+
taskInsId
+
" pause"
);
}
@Override
public
void
processPause
(
String
processInsId
)
{
log
.
info
(
"processInsId "
+
processInsId
+
" pause"
);
}
};
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/engine/CurrentTaskLocal.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow.engine
;
import
com.ibeetl.starter.workflow.model.InternalTaskStartInfo
;
/**
* 记录了当前执行的信息
* @author xiandafu
*
*/
public
class
CurrentTaskLocal
{
static
ThreadLocal
<
InternalTaskStartInfo
>
locals
=
new
ThreadLocal
<
InternalTaskStartInfo
>()
{
public
InternalTaskStartInfo
initialValue
()
{
return
null
;
}
};
public
static
InternalTaskStartInfo
getTaskInfo
()
{
return
locals
.
get
();
}
public
static
void
setTaskInfo
(
InternalTaskStartInfo
id
)
{
locals
.
set
(
id
);
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/event/ProcessEndEvent.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow.event
;
import
com.ibeetl.starter.workflow.model.ProcessStatus
;
import
com.ibeetl.starter.workflow.model.WfUser
;
public
class
ProcessEndEvent
{
String
processInsId
;
//是否正常结束
Integer
status
=
ProcessStatus
.
COMPLETED
.
getStatus
();
WfUser
endUser
=
null
;
String
endButtonCode
;
public
String
getProcessInsId
()
{
return
processInsId
;
}
public
void
setProcessInsId
(
String
processInsId
)
{
this
.
processInsId
=
processInsId
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
WfUser
getEndUser
()
{
return
endUser
;
}
public
void
setEndUser
(
WfUser
endUser
)
{
this
.
endUser
=
endUser
;
}
public
String
getEndButtonCode
()
{
return
endButtonCode
;
}
public
void
setEndButtonCode
(
String
endButtonCode
)
{
this
.
endButtonCode
=
endButtonCode
;
}
@Override
public
String
toString
()
{
return
"ProcessEndEvent [processInsId="
+
processInsId
+
", status="
+
status
+
", endUser="
+
endUser
+
", endButtonCode="
+
endButtonCode
+
"]"
;
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/event/ProcessStartEvent.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow.event
;
import
java.util.Map
;
import
com.ibeetl.starter.workflow.model.ProcessStatus
;
import
com.ibeetl.starter.workflow.model.WfUser
;
public
class
ProcessStartEvent
{
String
processInsId
;
String
processKey
;
String
processName
;
String
taskInsId
;
WfUser
user
;
Map
processVars
;
public
String
getProcessInsId
()
{
return
processInsId
;
}
public
void
setProcessInsId
(
String
processInsId
)
{
this
.
processInsId
=
processInsId
;
}
public
String
getProcessKey
()
{
return
processKey
;
}
public
void
setProcessKey
(
String
processKey
)
{
this
.
processKey
=
processKey
;
}
public
String
getProcessName
()
{
return
processName
;
}
public
void
setProcessName
(
String
processName
)
{
this
.
processName
=
processName
;
}
public
Map
getProcessVars
()
{
return
processVars
;
}
public
void
setProcessVars
(
Map
processVars
)
{
this
.
processVars
=
processVars
;
}
public
String
getTaskInsId
()
{
return
taskInsId
;
}
public
void
setTaskInsId
(
String
taskInsId
)
{
this
.
taskInsId
=
taskInsId
;
}
public
WfUser
getUser
()
{
return
user
;
}
public
void
setUser
(
WfUser
user
)
{
this
.
user
=
user
;
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/event/TaskEndEvent.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow.event
;
import
com.ibeetl.starter.workflow.model.ProcessStatus
;
/**
* 任务结束
* @author lijiazhi
*
*/
public
class
TaskEndEvent
{
String
taskId
;
Integer
status
=
ProcessStatus
.
COMPLETED
.
getStatus
();
String
comment
;
public
String
getTaskId
()
{
return
taskId
;
}
public
void
setTaskId
(
String
taskId
)
{
this
.
taskId
=
taskId
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
String
getComment
()
{
return
comment
;
}
public
void
setComment
(
String
comment
)
{
this
.
comment
=
comment
;
}
@Override
public
String
toString
()
{
return
"TaskEndEvent [taskId="
+
taskId
+
", status="
+
status
+
", comment="
+
comment
+
"]"
;
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/event/TaskOwnerChangeEvent.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow.event
;
import
com.ibeetl.starter.workflow.model.WfUser
;
public
class
TaskOwnerChangeEvent
{
private
WfUser
assignee
;
private
String
taskInsId
;
public
WfUser
getAssignee
()
{
return
assignee
;
}
public
void
setAssignee
(
WfUser
assignee
)
{
this
.
assignee
=
assignee
;
}
public
String
getTaskInsId
()
{
return
taskInsId
;
}
public
void
setTaskInsId
(
String
taskInsId
)
{
this
.
taskInsId
=
taskInsId
;
}
@Override
public
String
toString
()
{
return
"TaskOwnerChangeEvent [assignee="
+
assignee
+
", taskInsId="
+
taskInsId
+
"]"
;
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/event/TaskStartEvent.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow.event
;
import
java.util.Map
;
import
com.ibeetl.starter.workflow.model.WfUser
;
/**
* 任务开始
* @author lijiazhi
*
*/
public
class
TaskStartEvent
{
WfUser
assignee
;
String
taskId
;
String
taskName
;
WfUser
assigner
;
String
lastTaskId
;
String
lastTaskName
;
String
processKey
;
String
processName
;
String
processInsId
;
String
buttonCode
;
String
url
;
String
title
;
//流程是否开始
boolean
processStart
;
//流程参数
Map
processVars
;
public
WfUser
getAssignee
()
{
return
assignee
;
}
public
void
setAssignee
(
WfUser
assignee
)
{
this
.
assignee
=
assignee
;
}
public
String
getTaskId
()
{
return
taskId
;
}
public
void
setTaskId
(
String
taskId
)
{
this
.
taskId
=
taskId
;
}
public
String
getTaskName
()
{
return
taskName
;
}
public
void
setTaskName
(
String
taskName
)
{
this
.
taskName
=
taskName
;
}
public
String
getProcessKey
()
{
return
processKey
;
}
public
void
setProcessKey
(
String
processKey
)
{
this
.
processKey
=
processKey
;
}
public
String
getProcessName
()
{
return
processName
;
}
public
void
setProcessName
(
String
processName
)
{
this
.
processName
=
processName
;
}
public
String
getUrl
()
{
return
url
;
}
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
public
WfUser
getAssigner
()
{
return
assigner
;
}
public
void
setAssigner
(
WfUser
assigner
)
{
this
.
assigner
=
assigner
;
}
public
String
getLastTaskId
()
{
return
lastTaskId
;
}
public
void
setLastTaskId
(
String
lastTaskId
)
{
this
.
lastTaskId
=
lastTaskId
;
}
public
String
getLastTaskName
()
{
return
lastTaskName
;
}
public
void
setLastTaskName
(
String
lastTaskName
)
{
this
.
lastTaskName
=
lastTaskName
;
}
public
String
getButtonCode
()
{
return
buttonCode
;
}
public
void
setButtonCode
(
String
buttonCode
)
{
this
.
buttonCode
=
buttonCode
;
}
public
String
getProcessInsId
()
{
return
processInsId
;
}
public
void
setProcessInsId
(
String
processInsId
)
{
this
.
processInsId
=
processInsId
;
}
public
boolean
isProcessStart
()
{
return
processStart
;
}
public
void
setProcessStart
(
boolean
processStart
)
{
this
.
processStart
=
processStart
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
Map
getProcessVars
()
{
return
processVars
;
}
public
void
setProcessVars
(
Map
processVars
)
{
this
.
processVars
=
processVars
;
}
@Override
public
String
toString
()
{
return
"TaskStartEvent [assignee="
+
assignee
+
", taskName="
+
taskName
+
", taskId="
+
taskId
+
", assigner="
+
assigner
+
", lastTaskId="
+
lastTaskId
+
", lastTaskName="
+
lastTaskName
+
", processKey="
+
processKey
+
", processName="
+
processName
+
", processInsId="
+
processInsId
+
", buttonCode="
+
buttonCode
+
", url="
+
url
+
", title="
+
title
+
", processStart="
+
processStart
+
"]"
;
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/event/TaslClaimEvent.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow.event
;
public
class
TaslClaimEvent
{
private
String
taskInsId
;
public
String
getTaskInsId
()
{
return
taskInsId
;
}
public
void
setTaskInsId
(
String
taskInsId
)
{
this
.
taskInsId
=
taskInsId
;
}
@Override
public
String
toString
()
{
return
"TaslClaimEvent [taskInsId="
+
taskInsId
+
"]"
;
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/exception/WfException.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow.exception
;
public
class
WfException
extends
RuntimeException
{
public
WfException
(
String
msg
){
super
(
msg
);
}
public
WfException
(
String
msg
,
Throwable
cause
){
super
(
msg
,
cause
);
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/kit/Constants.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow.kit
;
public
class
Constants
{
//每个任务,都还包含如下扩展信息
public
static
final
String
VAR_TASK_ORG
=
"_orgId"
;
public
static
final
String
VAR_TASK_ROLE
=
"_roleId"
;
public
static
final
String
VAR_TASK_TITLE
=
"_title"
;
public
static
final
String
VAR_LAST_TASK_ID
=
"_lastTaskId"
;
public
static
final
String
VAR_USER_FLAG
=
"_userFlag"
;
public
static
final
String
VAR_TASK_WAIT
=
"_wait"
;
public
static
final
String
VAR_PROCESS_STATUS
=
"_processStatus"
;
public
static
final
String
TYPE_COMMENT_AGREE
=
"comment"
;
public
static
final
String
TYPE_COMMENT_DELEGATE
=
"delegate"
;
public
static
final
String
TASK_END
=
"theEnd"
;
public
static
final
String
TASK_START
=
"theStart"
;
public
static
final
String
HISTORY_PARENT_EXECUTION
=
"_parentExecutionId"
;
public
static
final
String
HISTORY_LAST_TASK
=
"_lastTaskId"
;
//环节对应的页面
public
static
final
String
EXT_TASK_PAGE
=
"page"
;
//普通按钮
public
static
final
String
BUTTON_TYPE_GENERAL
=
"general"
;
//任意跳转
public
static
final
String
BUTTON_TYPE_JUMP
=
"jump"
;
//回到上一个任务,有问题
public
static
final
String
BUTTON_TYPE_BACK
=
"back"
;
//自动
public
static
final
String
BUTTON_TYPE_AUTO
=
"auto"
;
//直接结束流程的按钮
public
static
final
String
BUTTON_TYPE_END_PROCESS
=
"complete"
;
//多实例
public
static
final
String
BUTTON_TYPE_MUTILPLE
=
"mutiple"
;
//并行
public
static
final
String
BUTTON_TYPE_PARALLEL
=
"parallel"
;
//等待
public
static
final
String
BUTTON_TYPE_WAIT
=
"wait"
;
//按照角色选取
public
static
final
String
USER_ROLE
=
"role"
;
//流程的历史执行人
public
static
final
String
USER_task_history
=
"task_history"
;
//流程的创建者
public
static
final
String
USER_PROCESS_CREATOR
=
"processe_creator"
;
//来自于某个变量,因此不必选取,暂时没有这个需求,取消
// public static final String USER_DYNAMIC_VARS = "dynamic_vars";
//业务侧按钮的渲人策略
public
static
final
String
CHOOSE_ONE
=
"one"
;
public
static
final
String
CHOOSE_RANDOM_ONE
=
"random_one"
;
public
static
final
String
CHOOSE_MUTIPLE
=
"mutiple"
;
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/model/InternalTaskStartInfo.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow.model
;
/**
* 任务启动带来一系列动作,此对象记录了出发后续动作的的信息集合
* @author xiandafu
*
*/
public
class
InternalTaskStartInfo
{
private
String
startTaskInsId
;
private
WfUser
assigner
;
private
String
buttonCode
;
private
String
comment
;
public
WfUser
getAssigner
()
{
return
assigner
;
}
public
void
setAssigner
(
WfUser
assigner
)
{
this
.
assigner
=
assigner
;
}
public
String
getButtonCode
()
{
return
buttonCode
;
}
public
void
setButtonCode
(
String
buttonCode
)
{
this
.
buttonCode
=
buttonCode
;
}
public
String
getStartTaskInsId
()
{
return
startTaskInsId
;
}
public
void
setStartTaskInsId
(
String
startTaskInsId
)
{
this
.
startTaskInsId
=
startTaskInsId
;
}
public
String
getComment
()
{
return
comment
;
}
public
void
setComment
(
String
comment
)
{
this
.
comment
=
comment
;
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/model/ProcessStatus.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow.model
;
public
enum
ProcessStatus
{
NEW
(
1
),
RUNNING
(
1
),
COMPLETED
(
2
),
CALLBACK
(
3
),
CANCEL
(
4
),
DELETE
(
5
);
private
int
status
=
0
;
private
ProcessStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/model/SimpleProcessProgress.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow.model
;
import
java.util.List
;
/**
* 流程进展,适合文本方式显示,现在还不支持并行文本显示,
* @author xiandafu
*
*/
public
class
SimpleProcessProgress
{
private
List
<
String
>
taskNames
;
private
List
<
String
>
taskIds
;
private
String
currentTaskName
;
private
int
currentIndex
=
-
1
;
private
boolean
complete
=
false
;
public
List
<
String
>
getTaskNames
()
{
return
taskNames
;
}
public
void
setTaskNames
(
List
<
String
>
taskNames
)
{
this
.
taskNames
=
taskNames
;
}
public
String
getCurrentTaskName
()
{
return
currentTaskName
;
}
public
void
setCurrentTaskName
(
String
currentTaskName
)
{
this
.
currentTaskName
=
currentTaskName
;
}
public
List
<
String
>
getTaskIds
()
{
return
taskIds
;
}
public
void
setTaskIds
(
List
<
String
>
taskIds
)
{
this
.
taskIds
=
taskIds
;
}
public
int
getCurrentIndex
()
{
return
currentIndex
;
}
public
void
setCurrentIndex
(
int
currentIndex
)
{
this
.
currentIndex
=
currentIndex
;
}
public
boolean
isComplete
()
{
return
complete
;
}
public
void
setComplete
(
boolean
complete
)
{
this
.
complete
=
complete
;
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/model/WfTaskButton.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow.model
;
import
java.util.List
;
import
java.util.Map
;
/**
* 任务按钮配置信息
*
*/
public
class
WfTaskButton
{
//按钮名称
String
name
;
//按钮显示名称
String
displayName
;
//按钮样式
String
displayCss
;
//目标任务ID
String
targetRef
;
//目标任务的期望用户类型。
List
<
WfUserSpec
>
targetUserSpecs
;
//取人规则
String
strategy
;
//取人规则补充参数
Map
<
String
,
String
>
strategyParameter
;
//general: 普通按钮 finish 结束流程按钮 jump 跳转按钮,atuo,自动处理,比如汇聚
String
type
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getDisplayName
()
{
return
displayName
;
}
public
void
setDisplayName
(
String
displayName
)
{
this
.
displayName
=
displayName
;
}
public
String
getTargetRef
()
{
return
targetRef
;
}
public
void
setTargetRef
(
String
targetRef
)
{
this
.
targetRef
=
targetRef
;
}
public
String
getStrategy
()
{
return
strategy
;
}
public
void
setStrategy
(
String
strategy
)
{
this
.
strategy
=
strategy
;
}
public
Map
<
String
,
String
>
getStrategyParameter
()
{
return
strategyParameter
;
}
public
void
setStrategyParameter
(
Map
<
String
,
String
>
strategyParameter
)
{
this
.
strategyParameter
=
strategyParameter
;
}
public
String
getDisplayCss
()
{
return
displayCss
;
}
public
void
setDisplayCss
(
String
displayCss
)
{
this
.
displayCss
=
displayCss
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
List
<
WfUserSpec
>
getTargetUserSpecs
()
{
return
targetUserSpecs
;
}
public
void
setTargetUserSpecs
(
List
<
WfUserSpec
>
targetUserSpecs
)
{
this
.
targetUserSpecs
=
targetUserSpecs
;
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/model/WfTaskSpec.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow.model
;
import
java.util.List
;
public
class
WfTaskSpec
{
List
<
WfTaskButton
>
buttons
=
null
;
WfUserSpec
userSpec
=
null
;
public
List
<
WfTaskButton
>
getButtons
()
{
return
buttons
;
}
public
void
setButtons
(
List
<
WfTaskButton
>
buttons
)
{
this
.
buttons
=
buttons
;
}
public
WfUserSpec
getUserSpec
()
{
return
userSpec
;
}
public
void
setUserSpec
(
WfUserSpec
userSpec
)
{
this
.
userSpec
=
userSpec
;
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/model/WfUser.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow.model
;
/**
* 流程参与人
*
*/
public
class
WfUser
extends
WfUserSpec
{
String
userId
;
public
String
getUserId
()
{
return
userId
;
}
public
WfUser
()
{
}
public
WfUser
(
String
userId
,
String
orgId
,
String
roleId
)
{
this
.
userId
=
userId
;
this
.
orgId
=
orgId
;
this
.
roleId
=
roleId
;
}
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
@Override
public
String
toString
()
{
return
userId
+
"("
+
this
.
orgId
+
")"
;
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/model/WfUserSpec.java
0 → 100644
View file @
82e0fcee
package
com.ibeetl.starter.workflow.model
;
/**
* 流程参与人类型定义,role或者org 标识了这个参与者的特性
*
*/
public
class
WfUserSpec
implements
java
.
io
.
Serializable
{
String
roleId
;
String
orgId
;
public
String
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
String
roleId
)
{
this
.
roleId
=
roleId
;
}
public
String
getOrgId
()
{
return
orgId
;
}
public
void
setOrgId
(
String
orgId
)
{
this
.
orgId
=
orgId
;
}
}
Prev
1
2
Next
Write
Preview
Supports
Markdown
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