Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
Flowable Engine
提交
cfa5aa21
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,发现更多精彩内容 >>
提交
cfa5aa21
编写于
4月 19, 2013
作者:
F
Frederik Heremans
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ACT-1657: added test
上级
db63b665
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
80 addition
and
0 deletion
+80
-0
modules/activiti-bpmn-converter/src/test/java/org/activiti/editor/language/xml/EventBasedGatewayConverterTest.java
...i/editor/language/xml/EventBasedGatewayConverterTest.java
+45
-0
modules/activiti-bpmn-converter/src/test/resources/eventgatewaymodel.bpmn
...-bpmn-converter/src/test/resources/eventgatewaymodel.bpmn
+35
-0
未找到文件。
modules/activiti-bpmn-converter/src/test/java/org/activiti/editor/language/xml/EventBasedGatewayConverterTest.java
0 → 100644
浏览文件 @
cfa5aa21
package
org.activiti.editor.language.xml
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
java.util.List
;
import
org.activiti.bpmn.model.ActivitiListener
;
import
org.activiti.bpmn.model.BpmnModel
;
import
org.activiti.bpmn.model.EventGateway
;
import
org.activiti.bpmn.model.FlowElement
;
import
org.activiti.bpmn.model.ImplementationType
;
import
org.junit.Test
;
/**
* Test for ACT-1657
* @author Frederik Heremans
*/
public
class
EventBasedGatewayConverterTest
extends
AbstractConverterTest
{
@Test
public
void
connvertXMLToModel
()
throws
Exception
{
BpmnModel
bpmnModel
=
readXMLFile
();
validateModel
(
bpmnModel
);
}
protected
String
getResource
()
{
return
"eventgatewaymodel.bpmn"
;
}
private
void
validateModel
(
BpmnModel
model
)
{
FlowElement
flowElement
=
model
.
getMainProcess
().
getFlowElement
(
"eventBasedGateway"
);
assertNotNull
(
flowElement
);
assertTrue
(
flowElement
instanceof
EventGateway
);
EventGateway
gateway
=
(
EventGateway
)
flowElement
;
List
<
ActivitiListener
>
listeners
=
gateway
.
getExecutionListeners
();
assertEquals
(
1
,
listeners
.
size
());
ActivitiListener
listener
=
(
ActivitiListener
)
listeners
.
get
(
0
);
assertTrue
(
ImplementationType
.
IMPLEMENTATION_TYPE_CLASS
.
equals
(
listener
.
getImplementationType
()));
assertEquals
(
"org.test.TestClass"
,
listener
.
getImplementation
());
assertEquals
(
"start"
,
listener
.
getEvent
());
}
}
modules/activiti-bpmn-converter/src/test/resources/eventgatewaymodel.bpmn
0 → 100644
浏览文件 @
cfa5aa21
<?xml version="1.0" encoding="UTF-8"?>
<definitions
xmlns=
"http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
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"
typeLanguage=
"http://www.w3.org/2001/XMLSchema"
expressionLanguage=
"http://www.w3.org/1999/XPath"
targetNamespace=
"http://www.activiti.org/test"
>
<process
id=
"process"
name=
"process1"
isExecutable=
"true"
>
<endEvent
id=
"sid-F7795B38-72CD-41A4-9549-6CFB7D3E5FB5"
></endEvent>
<sequenceFlow
id=
"sid-C6C56AC3-9561-49E0-A58A-624F6CB8BB82"
sourceRef=
"sid-F62B554B-FF4F-475E-94FF-A3F44EDA6A6A"
targetRef=
"eventBasedGateway"
></sequenceFlow>
<eventBasedGateway
id=
"eventBasedGateway"
name=
"Service task"
>
<extensionElements>
<activiti:executionListener
event=
"start"
class=
"org.test.TestClass"
></activiti:executionListener>
</extensionElements>
</eventBasedGateway>
<startEvent
id=
"sid-F62B554B-FF4F-475E-94FF-A3F44EDA6A6A"
></startEvent>
<sequenceFlow
id=
"sid-91C0F3A0-649F-462E-A1C1-1CE499FEDE3E"
sourceRef=
"eventBasedGateway"
targetRef=
"sid-F7795B38-72CD-41A4-9549-6CFB7D3E5FB5"
></sequenceFlow>
</process>
<bpmndi:BPMNDiagram
id=
"BPMNDiagram_process"
>
<bpmndi:BPMNPlane
bpmnElement=
"process"
id=
"BPMNPlane_process"
>
<bpmndi:BPMNShape
bpmnElement=
"sid-F7795B38-72CD-41A4-9549-6CFB7D3E5FB5"
id=
"BPMNShape_sid-F7795B38-72CD-41A4-9549-6CFB7D3E5FB5"
>
<omgdc:Bounds
height=
"28.0"
width=
"28.0"
x=
"324.5"
y=
"137.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"eventBasedGateway"
id=
"BPMNShape_eventBasedGateway"
>
<omgdc:Bounds
height=
"80.0"
width=
"100.0"
x=
"179.5"
y=
"111.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"sid-F62B554B-FF4F-475E-94FF-A3F44EDA6A6A"
id=
"BPMNShape_sid-F62B554B-FF4F-475E-94FF-A3F44EDA6A6A"
>
<omgdc:Bounds
height=
"30.0"
width=
"30.0"
x=
"104.5"
y=
"136.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge
bpmnElement=
"sid-C6C56AC3-9561-49E0-A58A-624F6CB8BB82"
id=
"BPMNEdge_sid-C6C56AC3-9561-49E0-A58A-624F6CB8BB82"
>
<omgdi:waypoint
x=
"134.5"
y=
"151.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"179.5"
y=
"151.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"sid-91C0F3A0-649F-462E-A1C1-1CE499FEDE3E"
id=
"BPMNEdge_sid-91C0F3A0-649F-462E-A1C1-1CE499FEDE3E"
>
<omgdi:waypoint
x=
"279.5"
y=
"151.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"324.5"
y=
"151.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录