Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
Flowable Engine
提交
854ef3e6
F
Flowable Engine
项目概览
开发团队
/
Flowable Engine
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Flowable Engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
854ef3e6
编写于
4月 26, 2011
作者:
J
jbarrez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI: Expanding on expense process example
上级
613d88c1
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
24 addition
and
8 deletion
+24
-8
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/demo/DemoDataGenerator.java
...in/java/org/activiti/explorer/demo/DemoDataGenerator.java
+0
-1
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/flow/listener/StartFlowClickListener.java
...iti/explorer/ui/flow/listener/StartFlowClickListener.java
+19
-2
modules/activiti-webapp-explorer2/src/main/resources/org/activiti/explorer/demo/process/expense_process.bpmn20.xml
...activiti/explorer/demo/process/expense_process.bpmn20.xml
+5
-5
未找到文件。
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/demo/DemoDataGenerator.java
浏览文件 @
854ef3e6
...
...
@@ -190,7 +190,6 @@ public class DemoDataGenerator {
.
createDeployment
()
.
name
(
"Expense process"
)
.
addClasspathResource
(
"org/activiti/explorer/demo/process/expense_process.bpmn20.xml"
)
.
addClasspathResource
(
"org/activiti/explorer/demo/process/expense_process.png"
)
.
deploy
();
}
...
...
modules/activiti-webapp-explorer2/src/main/java/org/activiti/explorer/ui/flow/listener/StartFlowClickListener.java
浏览文件 @
854ef3e6
...
...
@@ -13,11 +13,16 @@
package
org.activiti.explorer.ui.flow.listener
;
import
java.util.List
;
import
org.activiti.engine.FormService
;
import
org.activiti.engine.ProcessEngines
;
import
org.activiti.engine.RuntimeService
;
import
org.activiti.engine.TaskService
;
import
org.activiti.engine.form.StartFormData
;
import
org.activiti.engine.repository.ProcessDefinition
;
import
org.activiti.engine.runtime.ProcessInstance
;
import
org.activiti.engine.task.Task
;
import
org.activiti.explorer.ExplorerApp
;
import
org.activiti.explorer.Messages
;
import
org.activiti.explorer.NotificationManager
;
...
...
@@ -29,12 +34,14 @@ import com.vaadin.ui.Button.ClickListener;
/**
* @author Frederik Heremans
* @author Joram Barrez
*/
public
class
StartFlowClickListener
implements
ClickListener
{
private
static
final
long
serialVersionUID
=
-
1811557526259754226
L
;
private
static
final
long
serialVersionUID
=
1
L
;
protected
RuntimeService
runtimeService
;
protected
TaskService
taskService
;
protected
FormService
formService
;
protected
NotificationManager
notificationManager
;
...
...
@@ -44,6 +51,7 @@ public class StartFlowClickListener implements ClickListener {
public
StartFlowClickListener
(
ProcessDefinition
processDefinition
,
FlowPage
flowPage
)
{
this
.
runtimeService
=
ProcessEngines
.
getDefaultProcessEngine
().
getRuntimeService
();
this
.
taskService
=
ProcessEngines
.
getDefaultProcessEngine
().
getTaskService
();
this
.
formService
=
ProcessEngines
.
getDefaultProcessEngine
().
getFormService
();
this
.
notificationManager
=
ExplorerApp
.
get
().
getNotificationManager
();
...
...
@@ -60,10 +68,19 @@ public class StartFlowClickListener implements ClickListener {
}
else
{
// Just start the process-instance since it has no form.
// TODO: Error handling
runtimeService
.
startProcessInstanceById
(
processDefinition
.
getId
());
ProcessInstance
processInstance
=
runtimeService
.
startProcessInstanceById
(
processDefinition
.
getId
());
// Show notification of success
notificationManager
.
showInformationNotification
(
Messages
.
FLOW_STARTED_NOTIFICATION
,
processDefinition
.
getName
());
// Switch to inbox page in case a task of this process was created
List
<
Task
>
loggedInUsersTasks
=
taskService
.
createTaskQuery
()
.
taskAssignee
(
ExplorerApp
.
get
().
getLoggedInUser
().
getId
())
.
processInstanceId
(
processInstance
.
getId
())
.
list
();
if
(
loggedInUsersTasks
.
size
()
>
0
)
{
ExplorerApp
.
get
().
getViewManager
().
showInboxPage
(
loggedInUsersTasks
.
get
(
0
).
getId
());
}
}
...
...
modules/activiti-webapp-explorer2/src/main/resources/org/activiti/explorer/demo/process/expense_process.bpmn20.xml
浏览文件 @
854ef3e6
...
...
@@ -33,10 +33,10 @@
<omgdc:Bounds
height=
"55"
width=
"111"
x=
"330"
y=
"195"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"startevent1"
id=
"BPMNShape_startevent1"
>
<omgdc:Bounds
height=
"35"
width=
"35"
x=
"80"
y=
"
200
"
></omgdc:Bounds>
<omgdc:Bounds
height=
"35"
width=
"35"
x=
"80"
y=
"
195
"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"usertask1"
id=
"BPMNShape_usertask1"
>
<omgdc:Bounds
height=
"55"
width=
"105"
x=
"170"
y=
"19
0
"
></omgdc:Bounds>
<omgdc:Bounds
height=
"55"
width=
"105"
x=
"170"
y=
"19
5
"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"usertask2"
id=
"BPMNShape_usertask2"
>
<omgdc:Bounds
height=
"55"
width=
"105"
x=
"490"
y=
"195"
></omgdc:Bounds>
...
...
@@ -52,7 +52,7 @@
<omgdi:waypoint
x=
"170"
y=
"217"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow2"
id=
"BPMNEdge_flow2"
>
<omgdi:waypoint
x=
"275"
y=
"2
17
"
></omgdi:waypoint>
<omgdi:waypoint
x=
"275"
y=
"2
22
"
></omgdi:waypoint>
<omgdi:waypoint
x=
"330"
y=
"222"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow3"
id=
"BPMNEdge_flow3"
>
...
...
@@ -64,14 +64,14 @@
<omgdi:waypoint
x=
"640"
y=
"222"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow5"
id=
"BPMNEdge_flow5"
>
<omgdi:waypoint
x=
"6
60"
y=
"24
2"
></omgdi:waypoint>
<omgdi:waypoint
x=
"6
80"
y=
"22
2"
></omgdi:waypoint>
<omgdi:waypoint
x=
"750"
y=
"222"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow6"
id=
"BPMNEdge_flow6"
>
<omgdi:waypoint
x=
"660"
y=
"202"
></omgdi:waypoint>
<omgdi:waypoint
x=
"660"
y=
"101"
></omgdi:waypoint>
<omgdi:waypoint
x=
"222"
y=
"101"
></omgdi:waypoint>
<omgdi:waypoint
x=
"222"
y=
"1
3
5"
></omgdi:waypoint>
<omgdi:waypoint
x=
"222"
y=
"1
9
5"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录