summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLvbo163 <lv.bo163@zte.com.cn>2017-09-28 15:46:12 +0800
committerLvbo163 <lv.bo163@zte.com.cn>2017-09-28 15:46:12 +0800
commit338ffe86f4693f3d97a88f7c8f778bd5c5813d2c (patch)
treeb42cfe5f399d8a2fea87e71aed2ef26bda04a5c3
parent87653efcc84fdf9304e1321831c9d51e2bcd8711 (diff)
Add data object template
Issue-ID: SDC-417 Change-Id: Ibaa0ec9d716b656eedbe050478bd3e7572baf3e6 Signed-off-by: Lvbo163 <lv.bo163@zte.com.cn>
-rw-r--r--sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_dataObject_template.xml5
-rw-r--r--sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_template.xml6
-rw-r--r--sdc-workflow-designer-server/src/test/resources/workflow/template-test.bpmn20.xml3
3 files changed, 13 insertions, 1 deletions
diff --git a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_dataObject_template.xml b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_dataObject_template.xml
new file mode 100644
index 00000000..6e0721e5
--- /dev/null
+++ b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_dataObject_template.xml
@@ -0,0 +1,5 @@
+<dataObject id="${dataObject.id}" name="${dataObject.name}">
+ <extensionElements>
+ <activiti:value><![CDATA[${dataObject.value}]]></activiti:value>
+ </extensionElements>
+</dataObject>
diff --git a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_template.xml b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_template.xml
index c2125138..3cb11250 100644
--- a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_template.xml
+++ b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_template.xml
@@ -6,6 +6,12 @@
typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath"
targetNamespace="http://www.activiti.org/test">
<process id="${process.id}" isExecutable="true">
+ <!-- dataObjects -->
+ #foreach( $dataObject in $process.dataObjectList)
+ #parse(
+ "${templatePath}bpmn_dataObject_template.xml"
+ )
+ #end
<!-- Perform bpmn elements -->
#foreach( $element in $process.elementList)
diff --git a/sdc-workflow-designer-server/src/test/resources/workflow/template-test.bpmn20.xml b/sdc-workflow-designer-server/src/test/resources/workflow/template-test.bpmn20.xml
index 20766b8d..44a6d7b6 100644
--- a/sdc-workflow-designer-server/src/test/resources/workflow/template-test.bpmn20.xml
+++ b/sdc-workflow-designer-server/src/test/resources/workflow/template-test.bpmn20.xml
@@ -6,7 +6,8 @@
typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath"
targetNamespace="http://www.activiti.org/test">
<process id="templateTest" isExecutable="true">
-
+ <!-- dataObjects -->
+
<!-- Perform bpmn elements -->
</process>