aboutsummaryrefslogtreecommitdiffstats
path: root/components/model-catalog/blueprint-model/uat-blueprints
diff options
context:
space:
mode:
authorJozsef Csongvai <jozsef.csongvai@bell.ca>2022-04-12 19:24:37 -0400
committerJozsef Csongvai <jozsef.csongvai@bell.ca>2022-04-12 19:31:23 -0400
commit577316e6c8fbf21bb25f41174cd80f7bd8df327a (patch)
tree8977e5e1877bf8bac713a35e6926a5e66e2deb0c /components/model-catalog/blueprint-model/uat-blueprints
parent795c2d4349e04c4f7c0d4d5fb467727b8118b44a (diff)
Return errormessages in failing imperative workflows
Instead of discarding error messages after each node has executed, they are now kept until the workflow completes. If the workflow completes without exceptions, it means that all errors were handled and the error messages can be cleared. If the workflow does complete with exceptions, all error messages will be propagated in the response. Also update UatExecutor to enable expected status codes other than 200. Issue-ID: CCSDK-3630 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: I94fd81c342ad2a798e64051c603beb62bf1aaacd
Diffstat (limited to 'components/model-catalog/blueprint-model/uat-blueprints')
-rw-r--r--components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/uat-imperative-workflow.json24
-rw-r--r--components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Tests/uat.yaml27
2 files changed, 50 insertions, 1 deletions
diff --git a/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/uat-imperative-workflow.json b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/uat-imperative-workflow.json
index 508d8b2e2..16466df85 100644
--- a/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/uat-imperative-workflow.json
+++ b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Definitions/uat-imperative-workflow.json
@@ -112,6 +112,30 @@
}
}
}
+ },
+ "uat-unhandled-error" : {
+ "steps" : {
+ "execute-A" : {
+ "target" : "execute-script-1",
+ "on_success" : [ "finalize" ],
+ "on_failure" : [ "clean-up" ]
+ },
+ "finalize" : {
+ "target" : "execute-script-3"
+ },
+ "clean-up" : {
+ "target" : "execute-script-4"
+ }
+ },
+ "inputs" : {
+ "service-instance-id" : {
+ "type" : "string"
+ },
+ "failing-steps" : {
+ "type" : "json"
+ }
+ },
+ "outputs" : {}
}
},
"node_templates" : {
diff --git a/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Tests/uat.yaml b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Tests/uat.yaml
index 3aab65e8a..693cad696 100644
--- a/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Tests/uat.yaml
+++ b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Tests/uat.yaml
@@ -305,4 +305,29 @@ processes:
execute-script-1: FAILED
execute-script-2: FAILED
execute-script-3: null
- execute-script-4: SUCCEEDED \ No newline at end of file
+ execute-script-4: SUCCEEDED
+
+ - name: uat-unhandled-error
+ request:
+ commonHeader: &ch
+ originatorId: sdnc
+ requestId: "1234"
+ subRequestId: "1234-12234"
+ actionIdentifiers: &ai
+ blueprintName: uat-imperative-workflow
+ blueprintVersion: "1.0.0"
+ actionName: uat-unhandled-error
+ mode: sync
+ payload:
+ uat-unhandled-error-request:
+ failing-steps:
+ execute-A: true
+ clean-up: true
+ expectedResponse:
+ commonHeader: *ch
+ actionIdentifiers: *ai
+ status:
+ code: 500
+ eventType: EVENT_COMPONENT_FAILURE
+ errorMessage: "Step failed: execute-A, Step failed: clean-up, node(clean-up) outgoing edge(FAILURE) is missing."
+ message: failure \ No newline at end of file