Fix missing status event type workflow response.
[ccsdk/cds.git] / ms / blueprintsprocessor / modules / commons / processor-core / src / main / kotlin / org / onap / ccsdk / cds / blueprintsprocessor / core / api / data / BlueprintProcessorData.kt
index 5a6ba06..dae6eea 100644 (file)
@@ -22,6 +22,8 @@ import com.fasterxml.jackson.annotation.JsonIgnore
 import com.fasterxml.jackson.databind.JsonNode
 import com.fasterxml.jackson.databind.node.ObjectNode
 import io.swagger.annotations.ApiModelProperty
+import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
 import java.util.*
 
 /**
@@ -36,9 +38,9 @@ open class ExecutionServiceInput {
     @get:ApiModelProperty(required = true, value = "Provide information about the action to execute.")
     lateinit var actionIdentifiers: ActionIdentifiers
     @get:ApiModelProperty(required = true,
-        value = "Contain the information to be passed as input to the action." +
-                "The payload is constituted of two section: the workflow input which is the higher level block (xxx-request)" +
-                " and the input for resource resolution located within the xxx-request block, contained within xxx-properties")
+            value = "Contain the information to be passed as input to the action." +
+                    "The payload is constituted of two section: the workflow input which is the higher level block (xxx-request)" +
+                    " and the input for resource resolution located within the xxx-request block, contained within xxx-properties")
     lateinit var payload: ObjectNode
     @get:ApiModelProperty(hidden = true)
     @get:JsonIgnore
@@ -53,9 +55,9 @@ open class ExecutionServiceOutput {
     @get:ApiModelProperty(required = true, value = "Status of the request.")
     lateinit var status: Status
     @get:ApiModelProperty(required = true,
-        value = "Contain the information to be passed as input to the action." +
-                "The payload is constituted of two section: the workflow input which is the higher level block (xxx-request)" +
-                " and the input for resource resolution located within the xxx-request block, contained within xxx-properties")
+            value = "Contain the information to be passed as input to the action." +
+                    "The payload is constituted of two section: the workflow input which is the higher level block (xxx-request)" +
+                    " and the input for resource resolution located within the xxx-request block, contained within xxx-properties")
     lateinit var payload: ObjectNode
     @get:ApiModelProperty(hidden = true)
     @get:JsonIgnore
@@ -73,8 +75,8 @@ open class ActionIdentifiers {
     @get:ApiModelProperty(required = true, value = "Name of the workflow to execute.")
     lateinit var actionName: String
     @get:ApiModelProperty(required = true,
-        value = "Async processing is only supported for gRPC client.",
-        allowableValues = "sync, async")
+            value = "Async processing is only supported for gRPC client.",
+            allowableValues = "sync, async")
     lateinit var mode: String
 }
 
@@ -103,16 +105,16 @@ open class Status {
     @get:ApiModelProperty(required = true, value = "HTTP status code equivalent.")
     var code: Int = 200
     @get:ApiModelProperty(required = true, value = "Type of the event being emitted by CDS.")
-    var eventType: String = ""
+    var eventType: String = EventType.EVENT_COMPONENT_EXECUTED.name
     @get:ApiModelProperty(required = true,
-        value = "Time when the execution ended.",
-        example = "2012-04-23T18:25:43.511Z")
+            value = "Time when the execution ended.",
+            example = "2012-04-23T18:25:43.511Z")
     @get:JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
     var timestamp: Date = Date()
     @get:ApiModelProperty(required = false, value = "Error message when system failed")
     var errorMessage: String? = null
     @get:ApiModelProperty(required = true, value = "Message providing request status")
-    var message: String = "success"
+    var message: String = BluePrintConstants.STATUS_SUCCESS
 }
 
 open class StepData {