Fix the docker build error for vfc-nfvo-wfengine 83/21583/1
authorZhaoxing <meng.zhaoxing1@zte.com.cn>
Wed, 1 Nov 2017 06:34:44 +0000 (14:34 +0800)
committerZhaoxing <meng.zhaoxing1@zte.com.cn>
Wed, 1 Nov 2017 06:34:44 +0000 (14:34 +0800)
Change-Id: I0421eff58c13aa93a2b2f533cc4b9e2d74b20c66
Issue-id: VFC-445
Signed-off-by: Zhaoxing <meng.zhaoxing1@zte.com.cn>
activiti-extension/src/main/docker/activiti-docker-build_image.sh
activiti-extension/src/main/docker/swagger.json [new file with mode: 0644]
wfenginemgrservice/src/main/java/org/onap/workflow/common/RestClient.java

index 4235c18..4dfa0de 100644 (file)
@@ -108,6 +108,8 @@ wget -O activiti-extension.jar "${NEXUS_REPOS_URL}/service/local/artifact/maven/
 rm -Rf ./temp/
 mkdir -p ./temp/WEB-INF/lib/
 cp -f activiti-extension*.jar ./temp/WEB-INF/lib/activiti-extension.jar 
+cp -f swagger.json ./temp/ 
+
 
 echo "download jackson-annotations 2.5.1"
 wget -O jackson-annotations-2.2.3.jar "${NEXUS_REPOS_URL}/service/local/artifact/maven/content?r=central&g=com.fasterxml.jackson.core&a=jackson-annotations&e=jar&v=2.5.1"
diff --git a/activiti-extension/src/main/docker/swagger.json b/activiti-extension/src/main/docker/swagger.json
new file mode 100644 (file)
index 0000000..ad4a6ad
--- /dev/null
@@ -0,0 +1,161 @@
+{
+  "swagger": "2.0",
+  "info": {
+    "version": "1.0",
+    "title": "api"
+  },
+  "basePath": "/activiti-rest/service",
+  "tags": [
+    {
+      "name": "Activiti Resource"
+    }
+  ],
+  "paths": {
+    "/repository/deployments": {
+      "post": {
+        "tags": [
+          "Activiti Resource"
+        ],
+        "summary": "deploy bpmn file",
+        "description": "",
+        "operationId": "deployBpmnFile",
+        "consumes": [
+          "multipart/form-data"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "parameters": [
+          {
+            "name": "file",
+            "in": "formData",
+            "description": "file inputstream",
+            "required": true,
+            "type": "file"
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "created"
+          },
+          "400": {
+            "description": "deploy failed"
+          }
+        }
+      }
+    },
+    "/repository/deployments/{deploymentId}": {
+      "delete": {
+        "tags": [
+          "Activiti Resource"
+        ],
+        "summary": "undeploy bpmn file",
+        "description": "",
+        "operationId": "undeployBpmnFile",
+        "consumes": [
+          "text/plain"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "parameters": [
+          {
+            "name": "deploymentId",
+            "in": "path",
+            "description": "deploymentId",
+            "required": true,
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "204": {
+            "description": "successful operation"
+          },
+          "404": {
+            "description": "not find service"
+          }
+        }
+      }
+    },
+    "/runtime/process-instances": {
+      "post": {
+        "tags": [
+          "Activiti Resource"
+        ],
+        "summary": "package process",
+        "description": "",
+        "operationId": "startProcess",
+        "consumes": [
+          "application/json"
+        ],
+        "produces": [
+          "application/json"
+        ],
+        "parameters": [
+          {
+            "in": "body",
+            "name": "body",
+            "description": "request",
+            "required": false,
+            "schema": {
+              "$ref": "#/definitions/StartProcessRequest"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "successful",
+            "schema": {
+              "$ref": "#/definitions/ResponseInstance"
+            }
+          },
+          "404": {
+            "description": "error ",
+            "schema": {
+              "type": "string"
+            }
+          }
+        }
+      }
+    }
+  },
+  "definitions": {
+    "ResponseInstance": {
+      "type": "object",
+      "properties": {
+        "id": {
+          "type": "string"
+        },
+        "url": {
+          "type": "string"
+        },
+        "businessKey": {
+          "type": "string"
+        },
+        "processDefinitionUrl": {
+          "type": "string"
+        },
+        "activityId": {
+          "type": "string"
+        }
+      }
+    },
+    "StartProcessRequest": {
+      "type": "object",
+      "properties": {
+        "processDefinitionId": {
+          "type": "string"
+        },
+        "businessKey": {
+          "type": "string"
+        },
+        "variables": {
+          "type": "object",
+          "additionalProperties": {
+            "type": "string"
+          }
+        }
+      }
+    }
+  }
+}
\ No newline at end of file
index 4d92dcb..e90da7c 100644 (file)
@@ -243,7 +243,7 @@ public class RestClient {
       httpPost.setHeader("Content-type", "application/json");\r
       httpPost.setHeader(Constants.AUTHORIZATION, ToolUtil.getHeader());\r
       httpPost.setEntity(requestEntity);\r
-      returnValue = httpClient.execute(httpPost, responseHandler); // 调接口获取返回值时,必须用此方法\r
+//      returnValue = httpClient.execute(httpPost, responseHandler); // 调接口获取返回值时,必须用此方法\r
       CloseableHttpResponse httpResonse = httpClient.execute(httpPost);\r
       if (httpResonse != null && httpResonse.getStatusLine() != null) {\r
         int statusCode = httpResonse.getStatusLine().getStatusCode();\r