Workflow converter support service task element of BPMN.
Issue-ID: SDC-745
Change-Id: Ic4e4e839a97e35c8c9300862419153d389dba34d
Signed-off-by: Lvbo163 <lv.bo163@zte.com.cn>
--- /dev/null
+/**\r
+ * Copyright (c) 2017 ZTE Corporation.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the Apache License, Version 2.0\r
+ * and the Eclipse Public License v1.0 which both accompany this distribution,\r
+ * and are available at http://www.eclipse.org/legal/epl-v10.html\r
+ * and http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Contributors:\r
+ * ZTE - initial API and implementation and/or initial documentation\r
+ */\r
+package org.onap.sdc.workflowdesigner.model;\r
+\r
+public class ServiceTask extends Element {\r
+\r
+}\r
import org.onap.sdc.workflowdesigner.model.Process;\r
import org.onap.sdc.workflowdesigner.model.ScriptTask;\r
import org.onap.sdc.workflowdesigner.model.SequenceFlow;\r
+import org.onap.sdc.workflowdesigner.model.ServiceTask;\r
import org.onap.sdc.workflowdesigner.model.StartEvent;\r
import org.slf4j.Logger;\r
import org.slf4j.LoggerFactory;\r
case "intermediateCatchEvent":\r
element = MAPPER.readValue(jsonObject, IntermediateCatchEvent.class);\r
break;\r
+ case "serviceTask":\r
+ element = MAPPER.readValue(jsonObject, ServiceTask.class);\r
+ break;\r
case "scriptTask":\r
element = MAPPER.readValue(jsonObject, ScriptTask.class);\r
break;\r
--- /dev/null
+\r
+<serviceTask id="${element.id}" name="${element.name}" activiti:class="${element.handler}">\r
+ <extensionElements>\r
+ <activiti:field name="uri">\r
+ <activiti:string><![CDATA[${element.url}]]></activiti:string>\r
+ </activiti:field>\r
+ <activiti:field name="method">\r
+ <activiti:string><![CDATA[${element.method}]]></activiti:string>\r
+ </activiti:field>\r
+ #if (${element.produces})\r
+ <activiti:field name="accept">\r
+ <activiti:string><![CDATA[${element.produces}]]></activiti:string>\r
+ </activiti:field>\r
+ #end\r
+ #if (${element.consumes})\r
+ <activiti:field name="contentType">\r
+ <activiti:string><![CDATA[${element.consumes}]]></activiti:string>\r
+ </activiti:field>\r
+ #end\r
+ <activiti:field name="parameters">\r
+ <activiti:string><![CDATA[${element.parameters}]]></activiti:string>\r
+ </activiti:field>\r
+ </extensionElements>\r
+</serviceTask>\r