From b2bac7b347106c9dd86ba23b0133f5984779f382 Mon Sep 17 00:00:00 2001 From: YuanHu Date: Tue, 17 Apr 2018 14:52:18 +0800 Subject: Modify the examples Add example for Stop traffic, Drain traffic, Stop VNF, Create VNF, etc. Issue-ID: SDC-1210 Change-Id: I4f1859a35ebd2c37a24e50549aae3e5c4713ace4 Signed-off-by: YuanHu --- .../main/assembly/ext-activities-display-info.json | 9 +- distribution/src/main/assembly/ext-activities.json | 236 ++++----------------- distribution/src/main/assembly/temp_workflow.json | 152 ++++++++----- 3 files changed, 147 insertions(+), 250 deletions(-) diff --git a/distribution/src/main/assembly/ext-activities-display-info.json b/distribution/src/main/assembly/ext-activities-display-info.json index 8a5e10af..72056a5d 100644 --- a/distribution/src/main/assembly/ext-activities-display-info.json +++ b/distribution/src/main/assembly/ext-activities-display-info.json @@ -4,8 +4,6 @@ }, "apds_service": { }, - "apds_rest": { - }, "apds_scriptA": { "category": "aaa" }, @@ -15,10 +13,7 @@ "apds_serviceA": { "category": "aaa" }, - "apds_restA": { - "category": "aaa" - }, - "apds_restB": { + "apds_serviceB": { "category": "aaa" } }, @@ -31,4 +26,4 @@ "collapse": true } } -} \ No newline at end of file +} diff --git a/distribution/src/main/assembly/ext-activities.json b/distribution/src/main/assembly/ext-activities.json index 0eb1f0e1..6defc343 100644 --- a/distribution/src/main/assembly/ext-activities.json +++ b/distribution/src/main/assembly/ext-activities.json @@ -20,32 +20,6 @@ "inputs": {} } }, - { - "id": "apds_rest", - "displayName": { - "zh_CN": "REST", - "en_US": "REST" - }, - "description": { - "zh_CN": "REST 节点", - "en_US": "REST Node" - }, - "type": "restTask", - "icon": { - "name": "apds_rest", - "width": 56, - "height": 56 - }, - "content": { - "url": "", - "name": "", - "version": "", - "path": "", - "method": "", - "accept": "", - "inputs": {} - } - }, { "id": "apds_script", "displayName": { @@ -70,12 +44,12 @@ { "id": "apds_scriptA", "displayName": { - "zh_CN": "JavaScript", - "en_US": "JavaScript" + "zh_CN": "Stop traffic", + "en_US": "Stop traffic" }, "description": { - "zh_CN": "脚本节点", - "en_US": "Script Node" + "zh_CN": "Stop traffic", + "en_US": "Stop traffic" }, "type": "scriptTask", "icon": { @@ -91,12 +65,12 @@ { "id": "apds_scriptB", "displayName": { - "zh_CN": "Groovy Task", - "en_US": "Groovy Task" + "zh_CN": "Drain traffic", + "en_US": "Drain traffic" }, "description": { - "zh_CN": "Groovy Task", - "en_US": "Groovy Task" + "zh_CN": "Drain traffic", + "en_US": "Drain traffic" }, "type": "scriptTask", "icon": { @@ -112,12 +86,12 @@ { "id": "apds_serviceA", "displayName": { - "zh_CN": "Java Task", - "en_US": "Java Task" + "zh_CN": "Stop VNF", + "en_US": "Stop VNF" }, "description": { - "zh_CN": "Java Task", - "en_US": "Java Task" + "zh_CN": "Stop VNF", + "en_US": "Stop VNF" }, "type": "serviceTask", "icon": { @@ -126,7 +100,7 @@ "height": 56 }, "content": { - "class": "com.zte.ums.workflow.activitiext.restservicetask.HttpUtil", + "class": "org.onap.sdc.workflow.task.StopVNFDelegate", "inputs": { "param1": { "type": "string", @@ -176,187 +150,69 @@ } }, { - "id": "apds_restA", - "displayName": { - "zh_CN": "REST无参数", - "en_US": "REST No Parameters" - }, - "description": { - "zh_CN": "REST无参数", - "en_US": "REST No Parameters" - }, - "type": "restTask", - "icon": { - "name": "apds_rest", - "width": 56, - "height": 56 - }, - "content": { - "serviceName": "name", - "serviceVersion": "v1", - "baseUrl": "url", - "path": "/test/", - "method": "put", - "consumes": "application/json, text/plain", - "produces": "application/json, text/plain", - "inputs": {} - } - }, - { - "id": "apds_restB", + "id": "apds_serviceB", "displayName": { - "zh_CN": "REST复杂参数", - "en_US": "REST Complex Parameters" + "zh_CN": "Create VNF", + "en_US": "Create VNF" }, "description": { - "zh_CN": "REST复杂参数", - "en_US": "REST Complex Parameters" + "zh_CN": "Create VNF", + "en_US": "Create VNF" }, - "type": "restTask", + "type": "serviceTask", "icon": { - "name": "apds_rest", + "name": "apds_service", "width": 56, "height": 56 }, "content": { - "serviceName": "ServiceName", - "serviceVersion": "v1", - "baseUrl": "url", - "path": "/test/", - "method": "put", - "consumes": "application/json, text/plain", - "produces": "application/json, text/plain", + "class": "org.onap.sdc.workflow.task.CreateVNFDelegate", "inputs": { - "param1": { - "in": "query", + "id": { "type": "string", "default": "default", "required": false, - "show": false, + "displayName": { + "zh_CN": "id", + "en_US": "id" + }, + "show": true, "editable": true }, - "param2": { - "in": "body", - "schema": { - "type": "object", - "properties": { - "a": { - "type": "number", - "default": 123 - }, - "b": { - "type": "string", - "default": "xyz" - }, - "c": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "a", - "b", - "c" - ] - } - }, - "d": { - "type": "array", - "items": { - "type": "object", - "properties": { - "p1": { - "type": "number" - }, - "p2": { - "type": "boolean" - } - } - } - }, - "y": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "z": { - "type": "object", - "additionalProperties": { - "type": "integer" - } - } - } - }, + "name": { + "type": "string", "required": true, + "displayName": { + "zh_CN": "name", + "en_US": "name" + }, "show": true, "editable": true }, - "param3": { - "in": "path", + "type": { "type": "string", "default": "value3", "required": true, + "displayName": { + "zh_CN": "type", + "en_US": "type" + }, "show": true, "editable": false } }, "outputs": { - "body": { + "status": { + "type": "string", + "required": false, "displayName": { - "zh_CN": "消息体", - "en_US": "Message Body" - }, - "schema": { - "type": "object", - "properties": { - "a": { - "type": "number" - }, - "b": { - "type": "string" - }, - "c": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "a", - "b", - "c" - ] - } - }, - "d": { - "type": "array", - "items": { - "type": "object", - "properties": { - "p1": { - "type": "number" - }, - "p2": { - "type": "boolean" - } - } - } - }, - "y": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "z": { - "type": "object", - "additionalProperties": { - "type": "integer" - } - } - } + "zh_CN": "status", + "en_US": "status of vnf" }, - "editable": false + "show": true, + "editable": true } } } } -] \ No newline at end of file +] diff --git a/distribution/src/main/assembly/temp_workflow.json b/distribution/src/main/assembly/temp_workflow.json index f12f892e..3b3fa1c1 100644 --- a/distribution/src/main/assembly/temp_workflow.json +++ b/distribution/src/main/assembly/temp_workflow.json @@ -5,109 +5,121 @@ "data": { "nodes": [ { - "id": "node0", + "id": "startEvent", "type": "startEvent", "name": "Start", "parentId": "root", "position": { - "left": 99, - "top": 131, + "left": 73, + "top": 160, "width": 56, "height": 56 }, "connection": [ { - "sourceRef": "node0", - "targetRef": "serviceTask" + "sourceRef": "startEvent", + "targetRef": "scriptTask" } ], - "parameters": [ - { - "name": "aaa", - "value": "a111", - "valueSource": "string", - "type": "string", - "required": false, - "show": true, - "errorMsg": "" - }, + "parameters": [] + }, + { + "id": "scriptTask", + "type": "scriptTask", + "typeId": "apds_scriptA", + "icon": "apds_script", + "name": "Stop traffic", + "parentId": "root", + "position": { + "left": 175, + "top": 160, + "width": 56, + "height": 56 + }, + "connection": [ { - "name": "bbb", - "value": "b111", - "valueSource": "string", - "type": "string", - "required": false, - "show": true, - "errorMsg": "" + "sourceRef": "scriptTask", + "targetRef": "scriptTask_2" } - ] + ], + "scriptFormat": "JavaScript", + "script": "abc" }, { - "id": "node2", - "type": "endEvent", - "name": "End", + "id": "scriptTask_2", + "type": "scriptTask", + "typeId": "apds_scriptB", + "icon": "apds_script", + "name": "Drain traffic", "parentId": "root", "position": { - "left": 459, - "top": 131, + "left": 289, + "top": 160, "width": 56, "height": 56 }, - "connection": [] + "connection": [ + { + "sourceRef": "scriptTask_2", + "targetRef": "serviceTask" + } + ], + "scriptFormat": "Groovy", + "script": "xyz" }, { "id": "serviceTask", "type": "serviceTask", "typeId": "apds_serviceA", "icon": "apds_service", - "name": "Java Task", + "name": "Stop VNF", "parentId": "root", "position": { - "left": 232, - "top": 131, + "left": 392, + "top": 160, "width": 56, "height": 56 }, "connection": [ { "sourceRef": "serviceTask", - "targetRef": "scriptTask" + "targetRef": "serviceTask_2" } ], - "className": "org.onap.sdc.workflowdesigner.JavaTask", + "className": "", "inputs": [ { "name": "param1", + "value": "default", "valueSource": "string", "type": "string", "required": false, "show": true, - "errorMsg": "", - "value": "a111" + "errorMsg": "" }, { "name": "param2", + "value": null, "valueSource": "string", "type": "string", "required": true, "show": true, - "errorMsg": "", - "value": "b111" + "errorMsg": "" }, { "name": "param3", + "value": "value3", "valueSource": "string", "type": "string", "required": true, "show": true, - "errorMsg": "", - "value": "c111" + "errorMsg": "" } ], "outputs": [ { "name": "out1", - "value": "", + "value": null, "valueSource": "string", "type": "string", "required": false, @@ -117,27 +129,61 @@ ] }, { - "id": "scriptTask", - "type": "scriptTask", - "typeId": "apds_scriptB", - "icon": "apds_script", - "name": "Groovy Task", + "id": "serviceTask_2", + "type": "serviceTask", + "typeId": "apds_serviceB", + "icon": "apds_service", + "name": "Create VNF", "parentId": "root", "position": { - "left": 335, - "top": 131, + "left": 500, + "top": 160, "width": 56, "height": 56 }, "connection": [ { - "sourceRef": "scriptTask", - "targetRef": "node2" + "sourceRef": "serviceTask_2", + "targetRef": "serviceTask_3" + } + ] + }, + { + "id": "serviceTask_3", + "type": "serviceTask", + "typeId": "apds_service", + "icon": "apds_service", + "name": "Start VNF", + "parentId": "root", + "position": { + "left": 620, + "top": 160, + "width": 56, + "height": 56 + }, + "connection": [ + { + "sourceRef": "serviceTask_3", + "targetRef": "endEvent" } ], - "scriptFormat": "Groovy", - "script": "xyz" + "className": "", + "inputs": [], + "outputs": [] + }, + { + "id": "endEvent", + "type": "endEvent", + "name": "End", + "parentId": "root", + "position": { + "left": 744, + "top": 160, + "width": 56, + "height": 56 + }, + "connection": [] } ] } -} \ No newline at end of file +} -- cgit 1.2.3-korg