add start and end event template

Add bpmn element start and end event template-test.bpmn20.xml

Issue-ID: SDC-414

Change-Id: I9fd2d610f7a4f21a0f88c3842a4c44f0e7762c7f
Signed-off-by: Lvbo163 <lv.bo163@zte.com.cn>
diff --git a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_endEvent_template.xml b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_endEvent_template.xml
new file mode 100644
index 0000000..3735709
--- /dev/null
+++ b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_endEvent_template.xml
@@ -0,0 +1,2 @@
+<endEvent id="${element.id}" name="${element.name}">

+</endEvent>

diff --git a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_startEvent_template.xml b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_startEvent_template.xml
new file mode 100644
index 0000000..38489b0
--- /dev/null
+++ b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_startEvent_template.xml
@@ -0,0 +1,8 @@
+<startEvent id="${element.id}" name="${element.name}">

+    <extensionElements>

+        #foreach( $param in ${element.parameters} )

+        <activiti:formProperty id="${param.name}"

+            name="${param.name}" default="${param.value}" type="string"></activiti:formProperty>

+        #end

+    </extensionElements>

+</startEvent>

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 7783ece..c212513 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
@@ -7,6 +7,13 @@
     targetNamespace="http://www.activiti.org/test">

     <process id="${process.id}" isExecutable="true">

 

+        <!-- Perform bpmn elements -->

+        #foreach( $element in $process.elementList)

+        #parse(

+        "${templatePath}bpmn_element_${element.type}_template.xml"

+        )

+        #end

+

     </process>

 </definitions>

 

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 e7084c6..20766b8 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
@@ -7,6 +7,8 @@
     targetNamespace="http://www.activiti.org/test">

     <process id="templateTest" isExecutable="true">

 

+        <!-- Perform bpmn elements -->

+        

     </process>

 </definitions>