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
adc12f7b
Commit
adc12f7b
authored
Jun 23, 2018
by
xiandafu
Browse files
删除微服务和工作流,集中精力做核心功能
parent
1d83f41b
Changes
85
Hide whitespace changes
Inline
Side-by-side
admin-workflow/src/main/java/com/ibeetl/starter/workflow/engine/cmd/CommonTaskJumpCmd.java
deleted
100644 → 0
View file @
1d83f41b
package
com.ibeetl.starter.workflow.engine.cmd
;
import
org.flowable.bpmn.model.FlowElement
;
import
org.flowable.bpmn.model.Process
;
import
org.flowable.engine.FlowableEngineAgenda
;
import
org.flowable.engine.impl.persistence.entity.ExecutionEntity
;
import
org.flowable.engine.impl.util.CommandContextUtil
;
import
org.flowable.engine.impl.util.ProcessDefinitionUtil
;
import
org.flowable.task.service.impl.persistence.entity.TaskEntity
;
import
com.ibeetl.starter.workflow.model.WfUser
;
import
com.ibeetl.starter.workflow.service.WfTaskService
;
public
class
CommonTaskJumpCmd
extends
BaseManagmentCmd
{
protected
String
taskInsId
;
protected
String
target
;
WfUser
targetUser
;
String
title
;
public
CommonTaskJumpCmd
(
WfTaskService
service
,
String
taskInsId
,
String
target
,
WfUser
targetUser
,
String
title
)
{
super
(
service
);
this
.
taskInsId
=
taskInsId
;
this
.
target
=
target
;
this
.
targetUser
=
targetUser
;
this
.
title
=
title
;
}
@Override
public
Object
complete
()
{
TaskEntity
taskEntity
=
taskEntityManager
.
findById
(
taskInsId
);
ExecutionEntity
ee
=
executionManager
.
findById
(
taskEntity
.
getExecutionId
());
Process
process
=
ProcessDefinitionUtil
.
getProcess
(
ee
.
getProcessDefinitionId
());
FlowElement
targetFlowElement
=
process
.
getFlowElement
(
target
);
ee
.
setCurrentFlowElement
(
targetFlowElement
);
FlowableEngineAgenda
agenda
=
CommandContextUtil
.
getAgenda
();
agenda
.
planContinueProcessInCompensation
(
ee
);
taskEntityManager
.
delete
(
taskInsId
);
return
null
;
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/event/ProcessEndEvent.java
deleted
100644 → 0
View file @
1d83f41b
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/ProcessPauseEvent.java
deleted
100644 → 0
View file @
1d83f41b
package
com.ibeetl.starter.workflow.event
;
public
class
ProcessPauseEvent
{
String
processInsId
;
String
processKey
;
String
processName
;
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
;
}
@Override
public
String
toString
()
{
return
"ProcessPauseEvent [processInsId="
+
processInsId
+
", processKey="
+
processKey
+
", processName="
+
processName
+
"]"
;
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/event/ProcessStartEvent.java
deleted
100644 → 0
View file @
1d83f41b
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
taskId
;
String
taskInsId
;
String
taskName
;
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
;
}
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
;
}
@Override
public
String
toString
()
{
return
"ProcessStartEvent [processInsId="
+
processInsId
+
", processKey="
+
processKey
+
", processName="
+
processName
+
", taskId="
+
taskId
+
", taskInsId="
+
taskInsId
+
", taskName="
+
taskName
+
", user="
+
user
+
", processVars="
+
processVars
+
"]"
;
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/event/TaskEndEvent.java
deleted
100644 → 0
View file @
1d83f41b
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
deleted
100644 → 0
View file @
1d83f41b
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/TaskPauseEvent.java
deleted
100644 → 0
View file @
1d83f41b
package
com.ibeetl.starter.workflow.event
;
public
class
TaskPauseEvent
{
String
taskId
;
String
taskName
;
String
taskInsId
;
String
processKey
;
String
processName
;
String
processInsId
;
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
getTaskInsId
()
{
return
taskInsId
;
}
public
void
setTaskInsId
(
String
taskInsId
)
{
this
.
taskInsId
=
taskInsId
;
}
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
getProcessInsId
()
{
return
processInsId
;
}
public
void
setProcessInsId
(
String
processInsId
)
{
this
.
processInsId
=
processInsId
;
}
@Override
public
String
toString
()
{
return
"TaskPauseEvent [taskId="
+
taskId
+
", taskName="
+
taskName
+
", taskInsId="
+
taskInsId
+
", processKey="
+
processKey
+
", processName="
+
processName
+
", processInsId="
+
processInsId
+
"]"
;
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/event/TaskStartEvent.java
deleted
100644 → 0
View file @
1d83f41b
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
deleted
100644 → 0
View file @
1d83f41b
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
deleted
100644 → 0
View file @
1d83f41b
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
deleted
100644 → 0
View file @
1d83f41b
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_TASK_WAIT
=
"_wait"
;
public
static
final
String
VAR_PROCESS_STATUS
=
"_processStatus"
;
public
static
final
String
VAR_BUTTON_CODE
=
"_buttonCode"
;
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
=
"autoJoin"
;
//直接结束流程的按钮
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_task_history
=
"task_history"
;
//流程的创建者
public
static
final
String
USER_PROCESS_CREATOR
=
"processe_creator"
;
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/model/InternalTaskStartInfo.java
deleted
100644 → 0
View file @
1d83f41b
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
deleted
100644 → 0
View file @
1d83f41b
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
deleted
100644 → 0
View file @
1d83f41b
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
deleted
100644 → 0
View file @
1d83f41b
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
deleted
100644 → 0
View file @
1d83f41b
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
deleted
100644 → 0
View file @
1d83f41b
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
deleted
100644 → 0
View file @
1d83f41b
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
;
}
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/service/WfNotifyService.java
deleted
100644 → 0
View file @
1d83f41b
package
com.ibeetl.starter.workflow.service
;
import
com.ibeetl.starter.workflow.event.ProcessEndEvent
;
import
com.ibeetl.starter.workflow.event.ProcessPauseEvent
;
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.TaskPauseEvent
;
import
com.ibeetl.starter.workflow.event.TaskStartEvent
;
import
com.ibeetl.starter.workflow.event.TaslClaimEvent
;
/**
* 业务侧接口,业务测的代办中心可以将工作流消息纳入到业务的代办中心
* @author xiandafu
*
*/
public
interface
WfNotifyService
{
public
void
processStart
(
ProcessStartEvent
startEvent
);
public
void
taskStart
(
TaskStartEvent
startEvent
);
public
void
taskPause
(
TaskPauseEvent
pauseEvent
);
public
void
processPause
(
ProcessPauseEvent
pauseEvent
);
public
void
taskEnd
(
TaskEndEvent
endEvent
);
public
void
processEnd
(
ProcessEndEvent
endEvent
);
public
void
taskOwnerChanged
(
TaskOwnerChangeEvent
changeEvent
);
public
void
taskClaim
(
TaslClaimEvent
claimEvent
);
}
admin-workflow/src/main/java/com/ibeetl/starter/workflow/service/WfTaskService.java
deleted
100644 → 0
View file @
1d83f41b
package
com.ibeetl.starter.workflow.service
;
import
java.util.Map
;
import
org.flowable.task.api.TaskInfo
;
import
com.ibeetl.starter.workflow.model.SimpleProcessProgress
;
import
com.ibeetl.starter.workflow.model.WfTaskSpec
;
import
com.ibeetl.starter.workflow.model.WfUser
;
import
com.ibeetl.starter.workflow.model.WfUserSpec
;
/**
* 业务侧常用接口
* @author xiandafu
*
*/
public
interface
WfTaskService
{
/**
* 启动工作流
* @param procKey
* @param startUser
* @param paras
* @return 第一个task的id
*/
public
String
start
(
String
procKey
,
WfUser
startUser
,
Map
paras
);
/**
* 提交任务, 并保存意见
* @param taskId 任务ID
* @param procInsId 流程实例ID,如果为空,则不保存任务提交意见
* @param comment 任务提交意见的内容
* @param title 流程标题,显示在待办任务标题
* @param vars 任务变量
*/
public
void
complete
(
String
taskInsId
,
WfUser
acUser
,
String
comment
,
String
title
,
String
buttonCode
,
WfUser
[]
targetWfUsers
,
Map
<
String
,
Object
>
processVars
,
Map
<
String
,
Object
>
parameters
);
/**
* 同上,简洁版的完成,用于单元测试,
* @param taskInsId
* @param acUser
* @param buttonCode
* @param targetAcUser
*/
public
void
complete
(
String
taskInsId
,
WfUser
wfUser
,
String
buttonCode
,
WfUser
targetWfUser
);
/**
* 签收任务,调用签收前,业务侧应该负责检测此用户是否还具备此角色以及部门
* @param taskId 任务ID
* @param userId 签收用户ID(用户登录名)
*/
public
boolean
claim
(
WfUser
user
,
String
taskInsId
);
/**
* 获取某个环节的描述信息,用于业务侧暂时和选人,processKey和processInsId二选一提供
* @param processKey
* @param processInsId
* @param taskId
* @return
*/
public
WfTaskSpec
getTaskSpec
(
String
processKey
,
String
processInsId
,
String
taskId
)
;
/**
* 获取某个环节期望的用户类型
* @param processKey
* @param taskId
* @return
*/
public
WfUserSpec
getTaskUserDefine
(
String
processKey
,
String
processInsId
,
String
taskId
);
/**
* 获取历史执行人,用于选人策略.环节会被多次执行,此获取最新的一次
* @param procInsId
* @param taskId
* @return
*/
public
WfUser
getHistoryWfUser
(
String
procInsId
,
String
taskKey
);
/**
* 获取流程发起人
* @param procInsId
* @return
*/
public
WfUser
getHistoryProcessOwnerWfUser
(
String
procInsId
);
/**
* 委派任务
* @param taskId 任务ID
* @param userId 被委派人
*/
public
void
delegateTask
(
String
taskInsId
,
WfUser
wfUsers
,
String
comment
);
/**
* 撤回流程 ,在用户还未claim情况下可以撤回
* @param taskInsId 当前任务ID
*
*/
public
boolean
callBackTask
(
String
taskInsId
);
/**
* 撤销流程,需要管理人员调用。此删除并没有备份,物理删除了
* @param taskId 任务ID
* @param deleteReason 删除原因
* @param status 结束状态,1 正常结束 2 流程删除
*/
public
void
processEnd
(
String
procInsId
,
String
deleteReason
,
Integer
status
);
/**
* 流程简单的进展
* @param procInsId
* @return
*/
public
SimpleProcessProgress
getSimpleProgress
(
String
processInsId
);
/**
* 重新指定流程执行人
* @param task
* @param assignee
* @param title
*/
public
void
setTaskAssignee
(
TaskInfo
task
,
WfUser
assignee
,
String
title
);
/**
* 判断流程是否执行完毕
* @param taskInsId
* @return
*/
public
boolean
isProcessCompleted
(
String
taskInsId
);
}
Prev
1
2
3
4
5
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