Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Commit b09e37f

Browse files
author
Chris Wiechmann
committed
Shutdown API-Builder if setup of indices fails
#124
1 parent f7eb7dd commit b09e37f

File tree

3 files changed

+48
-3
lines changed

3 files changed

+48
-3
lines changed

apibuilder4elastic/flows/SetupElasticsearchIndex.json

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@
131131
{
132132
"name": "customPropertiesSettings",
133133
"type": "jsonpath",
134-
"value": "$.indexConfig.template.customProperties"
134+
"value": "$.indexConfig.template.customProperties",
135+
"metaName": "Custom properties settings",
136+
"metaDescription": "Controls if and how custom properties should be merged into the index template. See config file: elasticsearch_config/index_config.json"
135137
}
136138
],
137139
"outputs": {
@@ -725,7 +727,9 @@
725727
"outputs": {
726728
"next": {
727729
"context": "$.response",
728-
"routes": [],
730+
"routes": [
731+
"power.1"
732+
],
729733
"metaName": "Next"
730734
}
731735
},
@@ -860,6 +864,38 @@
860864
}
861865
},
862866
"metaMethod": "Execute"
867+
},
868+
"power.1": {
869+
"type": "nodehandler://@axway-api-builder-ext/api-builder-plugin-fn-power/power",
870+
"name": "Shutdown",
871+
"method": "shutdown",
872+
"parameters": [
873+
{
874+
"name": "skipInDevelopment",
875+
"type": "boolean",
876+
"value": "true"
877+
},
878+
{
879+
"name": "errorMessage",
880+
"type": "jsonpath",
881+
"value": "$.error"
882+
},
883+
{
884+
"name": "errorCode",
885+
"type": "number",
886+
"value": "99"
887+
}
888+
],
889+
"outputs": {
890+
"next": {
891+
"context": "$.errorMessage",
892+
"routes": []
893+
},
894+
"error": {
895+
"context": "$.error",
896+
"routes": []
897+
}
898+
}
863899
}
864900
}
865901
}

apibuilder4elastic/package-lock.json

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apibuilder4elastic/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"dependencies": {
2929
"@axway-api-builder-ext/api-builder-plugin-fn-elasticsearch": "^1.0.19",
3030
"@axway-api-builder-ext/api-builder-plugin-fn-file": "^0.0.8",
31+
"@axway-api-builder-ext/api-builder-plugin-fn-power": "^1.0.0",
3132
"@axway-api-builder-ext/api-builder-plugin-utils": "^1.0.1",
3233
"@axway/api-builder-plugin-fn-base64": "^2.1.5",
3334
"@axway/api-builder-plugin-fn-javascript": "^1.2.7",

0 commit comments

Comments
 (0)