Provide sample data for WF Designer Adapter 83/32883/1
authorYuanHu <yuan.hu1@zte.com.cn>
Mon, 26 Feb 2018 11:42:07 +0000 (19:42 +0800)
committerYuanHu <yuan.hu1@zte.com.cn>
Mon, 26 Feb 2018 11:42:07 +0000 (19:42 +0800)
sample of serviceTask.
sample of scriptTask.
sample of workflow.

Issue-ID: SDC-1038

Change-Id: Iedd4391472b65aa7df444ce8427096eab1130eff
Signed-off-by: YuanHu <yuan.hu1@zte.com.cn>
distribution/src/main/assembly/ext-activities-display-info.json [new file with mode: 0644]
distribution/src/main/assembly/ext-activities.json [new file with mode: 0644]
distribution/src/main/assembly/model.json [new file with mode: 0644]

diff --git a/distribution/src/main/assembly/ext-activities-display-info.json b/distribution/src/main/assembly/ext-activities-display-info.json
new file mode 100644 (file)
index 0000000..d6817db
--- /dev/null
@@ -0,0 +1,45 @@
+{
+       "nodes": {
+               "apds_script": {},
+               "apds_service": {},
+               "apds_rest": {},
+               "apds_scriptA": {
+                       "category": "aaa"
+               },
+               "apds_scriptB": {
+                       "category": "aaa"
+               },
+               "apds_serviceA": {
+                       "category": "bbb"
+               },
+               "apds_restA": {
+                       "category": "ccc"
+               },
+               "apds_restB": {
+                       "category": "ccc"
+               }
+       },
+       "categoryData": {
+               "aaa": {
+                       "displayName": {
+                               "zh_CN": "扩展脚本任务",
+                               "en_US": "Extension Script Task"
+                       },
+                       "collapse": true
+               },
+               "bbb": {
+                       "displayName": {
+                               "zh_CN": "扩展Service任务",
+                               "en_US": "Extension Service Task"
+                       },
+                       "collapse": true
+               },
+               "ccc": {
+                       "displayName": {
+                               "zh_CN": "扩展REST任务",
+                               "en_US": "Extension REST Service Task"
+                       },
+                       "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
new file mode 100644 (file)
index 0000000..8294da6
--- /dev/null
@@ -0,0 +1,318 @@
+[
+  {
+    "id": "apds_service",
+    "displayName": {
+      "zh_CN": "Service",
+      "en_US": "Service"
+    },
+    "description": {
+      "zh_CN": "JAVA 节点",
+      "en_US": "JAVA Node"
+    },
+    "type": "serviceTask",
+    "icon": {
+      "name": "apds_service",
+      "width": 56,
+      "height": 56
+    },
+    "content": {
+      "class": "",
+      "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": {
+      "zh_CN": "默认脚本",
+      "en_US": "Script"
+    },
+    "description": {
+      "zh_CN": "脚本节点",
+      "en_US": "Script Node"
+    },
+    "type": "scriptTask",
+    "icon": {
+      "name": "apds_script",
+      "width": 56,
+      "height": 56
+    },
+    "content": {
+      "scriptFormat": "",
+      "script": ""
+    }
+  },
+  {
+    "id": "apds_scriptA",
+    "displayName": {
+      "zh_CN": "JavaScript",
+      "en_US": "JavaScript"
+    },
+    "description": {
+      "zh_CN": "脚本节点",
+      "en_US": "Script Node"
+    },
+    "type": "scriptTask",
+    "icon": {
+      "name": "apds_script",
+      "width": 56,
+      "height": 56
+    },
+    "content": {
+      "scriptFormat": "JavaScript",
+      "script": "abc"
+    }
+  },
+  {
+    "id": "apds_scriptB",
+    "displayName": {
+      "zh_CN": "Groovy",
+      "en_US": "Groovy"
+    },
+    "description": {
+      "zh_CN": "脚本节点",
+      "en_US": "Script Node"
+    },
+    "type": "scriptTask",
+    "icon": {
+      "name": "apds_script",
+      "width": 56,
+      "height": 56
+    },
+    "content": {
+      "scriptFormat": "Groovy",
+      "script": "xyz"
+    }
+  },
+  {
+    "id": "apds_serviceA",
+    "displayName": {
+      "zh_CN": "JAVA A",
+      "en_US": "JAVA A"
+    },
+    "description": {
+      "zh_CN": "JAVA 节点",
+      "en_US": "JAVA Node"
+    },
+    "type": "serviceTask",
+    "icon": {
+      "name": "apds_service",
+      "width": 56,
+      "height": 56
+    },
+    "content": {
+      "class": "com.zte.ums.workflow.activitiext.restservicetask.HttpUtil",
+      "inputs": {
+        "param1": {
+          "type": "string",
+          "default": "default",
+          "required": false,
+          "constraints": [],
+          "displayName": {
+            "zh_CN": "参数1",
+            "en_US": "Param1"
+          },
+          "show": false,
+          "editable": true
+        },
+        "param2": {
+          "type": "string",
+          "default": "",
+          "required": true,
+          "displayName": {
+            "zh_CN": "参数2",
+            "en_US": "Param2"
+          },
+          "show": true,
+          "editable": true
+        },
+        "param3": {
+          "type": "string",
+          "default": "value3",
+          "required": true,
+          "displayName": {
+            "zh_CN": "参数3",
+            "en_US": "Param3"
+          },
+          "show": true,
+          "editable": false
+        }
+      },
+      "outputs": {
+        "out1": {
+          "type": "string",
+          "default": "default",
+          "required": false,
+          "constraints": [],
+          "displayName": {
+            "zh_CN": "输出1",
+            "en_US": "Output Param 1"
+          },
+          "show": true,
+          "editable": true
+        }
+      }
+    }
+  },
+  {
+    "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",
+    "displayName": {
+      "zh_CN": "REST复杂参数",
+      "en_US": "REST Complex Parameters"
+    },
+    "description": {
+      "zh_CN": "REST复杂参数",
+      "en_US": "REST Complex Parameters"
+    },
+    "type": "restTask",
+    "icon": {
+      "name": "apds_rest",
+      "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",
+      "inputs": {
+        "param1": {
+          "type": "string",
+          "default": "default",
+          "required": false,
+          "constraints": [],
+          "show": false,
+          "editable": true
+        },
+        "param2": {
+          "type": "object",
+          "default": "",
+          "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"
+              }
+            }
+          },
+          "required": true,
+          "show": true,
+          "editable": true
+        },
+        "param3": {
+          "type": "string",
+          "default": "value3",
+          "required": true,
+          "show": true,
+          "editable": false
+        }
+      },
+      "outputs": {
+        "out1": {
+          "type": "string",
+          "default": "default",
+          "required": false,
+          "constraints": [],
+          "displayName": {
+            "zh_CN": "输出1",
+            "en_US": "Output Param 1"
+          },
+          "show": true,
+          "editable": true
+        }
+      }
+    }
+  }
+]
\ No newline at end of file
diff --git a/distribution/src/main/assembly/model.json b/distribution/src/main/assembly/model.json
new file mode 100644 (file)
index 0000000..0d314b4
--- /dev/null
@@ -0,0 +1,143 @@
+{\r
+    "id":"id12345",\r
+    "name":"test",\r
+    "scene":"abcd",\r
+    "data":{\r
+        "nodes":[\r
+            {\r
+                "id":"node0",\r
+                "type":"startEvent",\r
+                "name":"开始",\r
+                "parentId":"root",\r
+                "position":{\r
+                    "left":100,\r
+                    "top":136,\r
+                    "width":56,\r
+                    "height":56\r
+                },\r
+                "connection":[\r
+                    {\r
+                        "sourceRef":"node0",\r
+                        "targetRef":"node1"\r
+                    }\r
+                ],\r
+                "parameters":[\r
+\r
+                ]\r
+            },\r
+            {\r
+                "id":"node1",\r
+                "type":"restTask",\r
+                "name":"REST",\r
+                "parentId":"root",\r
+                "position":{\r
+                    "left":254,\r
+                    "top":136,\r
+                    "width":56,\r
+                    "height":56\r
+                },\r
+                "connection":[\r
+                    {\r
+                        "sourceRef":"node1",\r
+                        "targetRef":"node2"\r
+                    }\r
+                ],\r
+                "produces":[\r
+                    "application/json; charset=utf-8"\r
+                ],\r
+                "parameters":[\r
+                    {\r
+                        "name":"body",\r
+                        "value":{\r
+                            "value":{\r
+                                "type":{\r
+                                    "value":"jhgjhv",\r
+                                    "valueSource":"String"\r
+                                },\r
+                                "provider":{\r
+                                    "value":"",\r
+                                    "valueSource":"Variable"\r
+                                },\r
+                                "serviceType":{\r
+                                    "value":"",\r
+                                    "valueSource":"String"\r
+                                },\r
+                                "start":{\r
+                                    "value":{\r
+                                        "year":{\r
+                                            "value":"",\r
+                                            "valueSource":"String"\r
+                                        },\r
+                                        "month":{\r
+                                            "value":"",\r
+                                            "valueSource":"String"\r
+                                        },\r
+                                        "day":{\r
+                                            "value":"",\r
+                                            "valueSource":"String"\r
+                                        }\r
+                                    },\r
+                                    "valueSource":"Definition"\r
+                                },\r
+                                "end":{\r
+                                    "value":{\r
+                                        "year":{\r
+                                            "value":"",\r
+                                            "valueSource":"String"\r
+                                        },\r
+                                        "month":{\r
+                                            "value":"",\r
+                                            "valueSource":"String"\r
+                                        },\r
+                                        "day":{\r
+                                            "value":"",\r
+                                            "valueSource":"String"\r
+                                        }\r
+                                    },\r
+                                    "valueSource":"Definition"\r
+                                }\r
+                            },\r
+                            "valueSource":"Definition"\r
+                        },\r
+                        "valueSource":"String",\r
+                        "type":"String",\r
+                        "required":false,\r
+                        "position":"body",\r
+                        "schema":{\r
+                            "$ref":"#/definitions/PackageQueryParams"\r
+                        }\r
+                    },\r
+                    {\r
+                        "name":"language-option",\r
+                        "value":"",\r
+                        "valueSource":"String",\r
+                        "type":"String",\r
+                        "required":false,\r
+                        "position":"header"\r
+                    }\r
+                ],\r
+                "responses":[\r
+\r
+                ],\r
+                "restConfigId":"catalog.v1",\r
+                "path":"/csars",\r
+                "method":"post"\r
+            },\r
+            {\r
+                "id":"node2",\r
+                "type":"endEvent",\r
+                "name":"结束",\r
+                "parentId":"root",\r
+                "position":{\r
+                    "left":396,\r
+                    "top":136,\r
+                    "width":56,\r
+                    "height":56\r
+                },\r
+                "connection":[\r
+\r
+                ]\r
+            }\r
+        ]\r
+    }\r
+}
\ No newline at end of file