aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-server/src/main/resources
diff options
context:
space:
mode:
authorYuanHu <yuan.hu1@zte.com.cn>2018-03-15 16:17:00 +0800
committerYuanHu <yuan.hu1@zte.com.cn>2018-03-16 09:07:21 +0800
commit0246959aeb2bd4cb04e00649a0378a846116fbf9 (patch)
tree9d5a26ff5e3203a81b72f231197ee0d63f41c87a /sdc-workflow-designer-server/src/main/resources
parent9d5b872a75cdfcad2a97a702e56a46730a653734 (diff)
Generate bpmn for extend activities
Modify BPMN Convertor to support conversion of extend activities. Change copyright year from 2017 to 2017-2018 Issue-ID: SDC-679 Change-Id: I835fee3901302d53a948e50d2c2a03736f524e4b Signed-off-by: YuanHu <yuan.hu1@zte.com.cn>
Diffstat (limited to 'sdc-workflow-designer-server/src/main/resources')
-rw-r--r--sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_dataObject_template.xml10
-rw-r--r--sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_endEvent_template.xml5
-rw-r--r--sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_errorEndEvent_template.xml7
-rw-r--r--sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_errorStartEvent_template.xml7
-rw-r--r--sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_exclusiveGateway_template.xml3
-rw-r--r--sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_intermediateCatchEvent_template.xml27
-rw-r--r--sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_parallelGateway_template.xml1
-rw-r--r--sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_restTask_template.xml66
-rw-r--r--sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_scriptTask_template.xml6
-rw-r--r--sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_serviceTask_template.xml38
-rw-r--r--sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_startEvent_template.xml16
-rw-r--r--sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_sequenceFlow_template.xml6
-rw-r--r--sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_template.xml47
13 files changed, 109 insertions, 130 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
index 6e0721e5..255e77ef 100644
--- 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
@@ -1,5 +1,5 @@
-<dataObject id="${dataObject.id}" name="${dataObject.name}">
- <extensionElements>
- <activiti:value><![CDATA[${dataObject.value}]]></activiti:value>
- </extensionElements>
-</dataObject>
+ <dataObject id="${dataObject.id}" name="${dataObject.name}">
+ <extensionElements>
+ <activiti:value><![CDATA[${dataObject.value}]]></activiti:value>
+ </extensionElements>
+ </dataObject> \ No newline at end of file
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
index 223542c4..8eb62f6f 100644
--- 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
@@ -1,3 +1,2 @@
-
-<endEvent id="${element.id}" name="${element.name}">
-</endEvent>
+ <endEvent id="${element.id}" name="${element.name}">
+ </endEvent> \ No newline at end of file
diff --git a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_errorEndEvent_template.xml b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_errorEndEvent_template.xml
index aef14d92..aecfbdfd 100644
--- a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_errorEndEvent_template.xml
+++ b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_errorEndEvent_template.xml
@@ -1,4 +1,3 @@
-
-<endEvent id="${element.id}" name="${element.name}">
- <errorEventDefinition errorRef="${element.parameter.value}" />
-</endEvent>
+ <endEvent id="${element.id}" name="${element.name}">
+ <errorEventDefinition errorRef="${element.parameter.value}" />
+ </endEvent> \ No newline at end of file
diff --git a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_errorStartEvent_template.xml b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_errorStartEvent_template.xml
index 56b08479..d73ee333 100644
--- a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_errorStartEvent_template.xml
+++ b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_errorStartEvent_template.xml
@@ -1,4 +1,3 @@
-
-<startEvent id="${element.id}" name="${element.name}">
- <errorEventDefinition errorRef="${element.parameter.value}" />
-</startEvent>
+ <startEvent id="${element.id}" name="${element.name}">
+ <errorEventDefinition errorRef="${element.parameter.value}" />
+ </startEvent> \ No newline at end of file
diff --git a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_exclusiveGateway_template.xml b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_exclusiveGateway_template.xml
index d9ab4613..68fc388e 100644
--- a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_exclusiveGateway_template.xml
+++ b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_exclusiveGateway_template.xml
@@ -1,2 +1 @@
-
-<exclusiveGateway id="${element.id}" name="${element.name}"></exclusiveGateway> \ No newline at end of file
+ <exclusiveGateway id="${element.id}" name="${element.name}"></exclusiveGateway> \ No newline at end of file
diff --git a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_intermediateCatchEvent_template.xml b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_intermediateCatchEvent_template.xml
index cb952098..ee591857 100644
--- a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_intermediateCatchEvent_template.xml
+++ b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_intermediateCatchEvent_template.xml
@@ -1,14 +1,13 @@
-
-<intermediateCatchEvent id="${element.id}" name="${element.name}">
- <timerEventDefinition>
- #if (${element.timerEventDefinition.timeDuration})
- <timeDuration><![CDATA[${element.timerEventDefinition.timeDuration}]]></timeDuration>
- #end
- #if (${element.timerEventDefinition.timeDate})
- <timeDate><![CDATA[${element.timerEventDefinition.timeDate}]]></timeDate>
- #end
- #if (${element.timerEventDefinition.timeCycle})
- <timeCycle><![CDATA[${element.timerEventDefinition.timeCycle}]]></timeCycle>
- #end
- </timerEventDefinition>
-</intermediateCatchEvent>
+ <intermediateCatchEvent id="${element.id}" name="${element.name}">
+ <timerEventDefinition>
+#if (${element.timerEventDefinition.timeDuration})
+ <timeDuration><![CDATA[${element.timerEventDefinition.timeDuration}]]></timeDuration>
+#end
+#if (${element.timerEventDefinition.timeDate})
+ <timeDate><![CDATA[${element.timerEventDefinition.timeDate}]]></timeDate>
+#end
+#if (${element.timerEventDefinition.timeCycle})
+ <timeCycle><![CDATA[${element.timerEventDefinition.timeCycle}]]></timeCycle>
+#end
+ </timerEventDefinition>
+ </intermediateCatchEvent> \ No newline at end of file
diff --git a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_parallelGateway_template.xml b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_parallelGateway_template.xml
index 2766601b..b3e5164b 100644
--- a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_parallelGateway_template.xml
+++ b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_parallelGateway_template.xml
@@ -1,2 +1 @@
-
<parallelGateway id="${element.id}" name="${element.name}"></parallelGateway> \ No newline at end of file
diff --git a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_restTask_template.xml b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_restTask_template.xml
index 7f26177a..051c0edb 100644
--- a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_restTask_template.xml
+++ b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_restTask_template.xml
@@ -1,33 +1,33 @@
-
-<serviceTask id="${element.id}" name="${element.name}" activiti:class="${element.handler}">
- <extensionElements>
- <activiti:field name="url">
- <activiti:string><![CDATA[$!{element.url}]]></activiti:string>
- </activiti:field>
- <activiti:field name="name">
- <activiti:string><![CDATA[$!{element.serviceName}]]></activiti:string>
- </activiti:field>
- <activiti:field name="version">
- <activiti:string><![CDATA[$!{element.serviceVersion}]]></activiti:string>
- </activiti:field>
- <activiti:field name="path">
- <activiti:string><![CDATA[$!{element.path}]]></activiti:string>
- </activiti:field>
- <activiti:field name="method">
- <activiti:string><![CDATA[$!{element.method}]]></activiti:string>
- </activiti:field>
- #if (${element.produces})
- <activiti:field name="accept">
- <activiti:string><![CDATA[${element.produces}]]></activiti:string>
- </activiti:field>
- #end
- #if (${element.consumes})
- <activiti:field name="contentType">
- <activiti:string><![CDATA[${element.consumes}]]></activiti:string>
- </activiti:field>
- #end
- <activiti:field name="parameters">
- <activiti:string><![CDATA[${element.parameters}]]></activiti:string>
- </activiti:field>
- </extensionElements>
-</serviceTask>
+ <serviceTask id="${element.id}" name="${element.name}"
+ activiti:class="${element.handler}">
+ <extensionElements>
+ <activiti:field name="url">
+ <activiti:string><![CDATA[$!{element.baseUrl}]]></activiti:string>
+ </activiti:field>
+ <activiti:field name="name">
+ <activiti:string><![CDATA[$!{element.serviceName}]]></activiti:string>
+ </activiti:field>
+ <activiti:field name="version">
+ <activiti:string><![CDATA[$!{element.serviceVersion}]]></activiti:string>
+ </activiti:field>
+ <activiti:field name="path">
+ <activiti:string><![CDATA[$!{element.path}]]></activiti:string>
+ </activiti:field>
+ <activiti:field name="method">
+ <activiti:string><![CDATA[$!{element.method}]]></activiti:string>
+ </activiti:field>
+#if (${element.produces})
+ <activiti:field name="accept">
+ <activiti:string><![CDATA[${element.produces}]]></activiti:string>
+ </activiti:field>
+#end
+#if (${element.consumes})
+ <activiti:field name="contentType">
+ <activiti:string><![CDATA[${element.consumes}]]></activiti:string>
+ </activiti:field>
+#end
+ <activiti:field name="parameters">
+ <activiti:string><![CDATA[${element.parameters}]]></activiti:string>
+ </activiti:field>
+ </extensionElements>
+ </serviceTask> \ No newline at end of file
diff --git a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_scriptTask_template.xml b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_scriptTask_template.xml
index d50e4c4b..2d9f6915 100644
--- a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_scriptTask_template.xml
+++ b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_scriptTask_template.xml
@@ -1,3 +1,3 @@
-<scriptTask id="${element.id}" name="${element.name}" scriptFormat="${element.scriptFormat}" activiti:autoStoreVariables="false">
- <script><![CDATA[${element.script}]]></script>
-</scriptTask>
+ <scriptTask id="${element.id}" name="${element.name}" scriptFormat="${element.scriptFormat}" activiti:autoStoreVariables="false">
+ <script><![CDATA[${element.script}]]></script>
+ </scriptTask> \ No newline at end of file
diff --git a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_serviceTask_template.xml b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_serviceTask_template.xml
index f5d63a23..29933108 100644
--- a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_serviceTask_template.xml
+++ b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_element_serviceTask_template.xml
@@ -1,24 +1,14 @@
-
-<serviceTask id="${element.id}" name="${element.name}" activiti:class="${element.handler}">
- <extensionElements>
- <activiti:field name="uri">
- <activiti:string><![CDATA[${element.url}]]></activiti:string>
- </activiti:field>
- <activiti:field name="method">
- <activiti:string><![CDATA[${element.method}]]></activiti:string>
- </activiti:field>
- #if (${element.produces})
- <activiti:field name="accept">
- <activiti:string><![CDATA[${element.produces}]]></activiti:string>
- </activiti:field>
- #end
- #if (${element.consumes})
- <activiti:field name="contentType">
- <activiti:string><![CDATA[${element.consumes}]]></activiti:string>
- </activiti:field>
- #end
- <activiti:field name="parameters">
- <activiti:string><![CDATA[${element.parameters}]]></activiti:string>
- </activiti:field>
- </extensionElements>
-</serviceTask>
+ <serviceTask id="${element.id}" name="${element.name}" activiti:class="${element.className}">
+ <extensionElements>
+#foreach( $input in ${element.inputs} )
+ <activiti:field name="${input.name}">
+ <activiti:string><![CDATA[${input.value}]]></activiti:string>
+ </activiti:field>
+#end
+#foreach( $output in ${element.outputs} )
+ <activiti:field name="${output.name}">
+ <activiti:string><![CDATA[${output.value}]]></activiti:string>
+ </activiti:field>
+#end
+ </extensionElements>
+ </serviceTask> \ No newline at end of file
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
index 18053155..150e26b3 100644
--- 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
@@ -1,9 +1,7 @@
-
-<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>
+ <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> \ No newline at end of file
diff --git a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_sequenceFlow_template.xml b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_sequenceFlow_template.xml
index e95721fc..d659eab0 100644
--- a/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_sequenceFlow_template.xml
+++ b/sdc-workflow-designer-server/src/main/resources/bpmn-templates/bpmn_sequenceFlow_template.xml
@@ -1,5 +1,5 @@
-<sequenceFlow id="${sequenceFlow.id}" sourceRef="${sequenceFlow.sourceRef}" targetRef="${sequenceFlow.targetRef}">
+ <sequenceFlow id="${sequenceFlow.id}" sourceRef="${sequenceFlow.sourceRef}" targetRef="${sequenceFlow.targetRef}">
#if(${sequenceFlow.condition} && ${sequenceFlow.condition} != '')
- <conditionExpression xsi:type="tFormalExpression"><![CDATA[${sequenceFlow.condition}]]></conditionExpression>
+ <conditionExpression xsi:type="tFormalExpression"><![CDATA[${sequenceFlow.condition}]]></conditionExpression>
#end
-</sequenceFlow> \ No newline at end of file
+ </sequenceFlow> \ No newline at end of file
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 66a5f1a7..d336740f 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
@@ -1,31 +1,28 @@
+#set( $bpelvar = "$bpelvar" )
<?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.id}" isExecutable="true">
- <!-- dataObjects -->
- #foreach( $dataObject in $process.dataObjectList)
- #parse(
- "${templatePath}bpmn_dataObject_template.xml"
- )
- #end
+ 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.id}" isExecutable="true">
+ <!-- dataObjects -->
+#foreach( $dataObject in $process.dataObjectList)
+#parse("${templatePath}bpmn_dataObject_template.xml")
- <!-- Perform bpmn elements -->
- #foreach( $element in $process.elementList)
- #parse(
- "${templatePath}bpmn_element_${element.type}_template.xml"
- )
- #end
+#end
+
+ <!-- Perform bpmn elements -->
+#foreach( $element in $process.elementList)
+#parse("${templatePath}bpmn_element_${element.type}_template.xml")
+
+#end
<!-- Perform bpmn sequence flow -->
- #foreach( $sequenceFlow in $process.sequenceFlowList)
- #parse(
- "${templatePath}bpmn_sequenceFlow_template.xml"
- )
- #end
- </process>
-</definitions>
+#foreach( $sequenceFlow in $process.sequenceFlowList)
+#parse("${templatePath}bpmn_sequenceFlow_template.xml")
+#end
+
+ </process>
+</definitions>