From 97d1b3956309bc04afd6d93c2972745e93952882 Mon Sep 17 00:00:00 2001 From: samir-gandhi Date: Wed, 25 Oct 2023 20:56:27 +0000 Subject: [PATCH] updated bootstrapped connections --- internal/acctest/flows/p1sessionsubflow.json | 36 +++++++++---------- internal/acctest/testdata.go | 25 ++++++++++--- .../service/davinci/resource_flow_test.go | 1 + 3 files changed, 39 insertions(+), 23 deletions(-) diff --git a/internal/acctest/flows/p1sessionsubflow.json b/internal/acctest/flows/p1sessionsubflow.json index bbbf8134..567d99a9 100644 --- a/internal/acctest/flows/p1sessionsubflow.json +++ b/internal/acctest/flows/p1sessionsubflow.json @@ -49,8 +49,8 @@ "nodeType": "CONNECTION", "connectionId": "6d8f6f706c45fd459a86b3f092602544", "connectorId": "errorConnector", - "name": "Error Customize", - "label": "Error Customize", + "name": "Error Message", + "label": "Error Message", "status": "configured", "capabilityName": "customErrorMessage", "type": "action", @@ -166,8 +166,8 @@ "nodeType": "CONNECTION", "connectionId": "6d8f6f706c45fd459a86b3f092602544", "connectorId": "errorConnector", - "name": "Error Customize", - "label": "Error Customize", + "name": "Error Message", + "label": "Error Message", "status": "configured", "capabilityName": "customErrorMessage", "type": "action", @@ -1010,8 +1010,8 @@ "nodeType": "CONNECTION", "connectionId": "6d8f6f706c45fd459a86b3f092602544", "connectorId": "errorConnector", - "name": "Error Customize", - "label": "Error Customize", + "name": "Error Message", + "label": "Error Message", "status": "configured", "capabilityName": "customErrorMessage", "type": "action", @@ -2651,7 +2651,7 @@ "nodeType": "CONNECTION", "connectionId": "6d8f6f706c45fd459a86b3f092602544", "connectorId": "errorConnector", - "name": "Error Customize", + "name": "Error Message", "label": "errorConnector", "status": "configured", "capabilityName": "customErrorMessage", @@ -2887,7 +2887,7 @@ "nodeType": "CONNECTION", "connectionId": "6d8f6f706c45fd459a86b3f092602544", "connectorId": "errorConnector", - "name": "Error Customize", + "name": "Error Message", "label": "errorConnector", "status": "configured", "capabilityName": "customErrorMessage", @@ -4409,8 +4409,8 @@ "nodeType": "CONNECTION", "connectionId": "6d8f6f706c45fd459a86b3f092602544", "connectorId": "errorConnector", - "name": "Error Customize", - "label": "Error Customize", + "name": "Error Message", + "label": "Error Message", "status": "configured", "capabilityName": "customErrorMessage", "type": "action", @@ -4592,8 +4592,8 @@ "nodeType": "CONNECTION", "connectionId": "6d8f6f706c45fd459a86b3f092602544", "connectorId": "errorConnector", - "name": "Error Customize", - "label": "Error Customize", + "name": "Error Message", + "label": "Error Message", "status": "configured", "capabilityName": "customErrorMessage", "type": "action", @@ -5243,8 +5243,8 @@ "nodeType": "CONNECTION", "connectionId": "6d8f6f706c45fd459a86b3f092602544", "connectorId": "errorConnector", - "name": "Error Customize", - "label": "Error Customize", + "name": "Error Message", + "label": "Error Message", "status": "configured", "capabilityName": "customErrorMessage", "type": "action", @@ -5292,8 +5292,8 @@ "nodeType": "CONNECTION", "connectionId": "6d8f6f706c45fd459a86b3f092602544", "connectorId": "errorConnector", - "name": "Error Customize", - "label": "Error Customize", + "name": "Error Message", + "label": "Error Message", "status": "configured", "capabilityName": "customErrorMessage", "type": "action", @@ -5492,8 +5492,8 @@ "nodeType": "CONNECTION", "connectionId": "6d8f6f706c45fd459a86b3f092602544", "connectorId": "errorConnector", - "name": "Error Customize", - "label": "Error Customize", + "name": "Error Message", + "label": "Error Message", "status": "configured", "capabilityName": "customErrorMessage", "type": "action", diff --git a/internal/acctest/testdata.go b/internal/acctest/testdata.go index bb6c12f0..66960e0e 100644 --- a/internal/acctest/testdata.go +++ b/internal/acctest/testdata.go @@ -113,8 +113,13 @@ var bsConnections = map[string]flowConnection{ }, "errorcustomize": { ConnectorId: "errorConnector", - Name: "Error Customize", - Id: "6d8f6f706c45fd459a86b3f092602544", + Name: "Error Message", + Id: "53ab83a4a4ab919d9f2cb02d9e111ac8", + }, + "flow": { + ConnectorId: "flowConnector", + Name: "Flow Connector", + Id: "2581eb287bb1d9bd29ae9886d675f89f", }, "functions": { ConnectorId: "functionsConnector", @@ -126,6 +131,11 @@ var bsConnections = map[string]flowConnection{ Name: "Http", Id: "867ed4363b2bc21c860085ad2baa817d", }, + "node": { + ConnectorId: "nodeConnector", + Name: "Node", + Id: "e7eae662d2ca276e4c6f097fc36a3bb1", + }, "pingid": { ConnectorId: "pingIdConnector", Name: "PingID", @@ -136,6 +146,11 @@ var bsConnections = map[string]flowConnection{ Name: "PingOne Notifications", Id: "cacf3d2861657174d93cbf445d55797a", }, + "pingoneauthentication": { + ConnectorId: "pingOneAuthenticationConnector", + Name: "PingOne Authentication", + Id: "c3e6a164bde107954e93f5c09f0c8bce", + }, "pingonemfa": { ConnectorId: "pingOneMfaConnector", Name: "PingOne MFA", @@ -148,8 +163,8 @@ var bsConnections = map[string]flowConnection{ }, "pingonerisk": { ConnectorId: "pingOneRiskConnector", - Name: "PingOne Risk", - Id: "4c653c375e07bdf8614406113f998666", + Name: "PingOne Protect", + Id: "292873d5ceea806d81373ed0341b5c88", }, "skopenid": { ConnectorId: "skOpenIdConnector", @@ -187,7 +202,7 @@ func getFlowJsons(resourceName string) TestFlowsJson { AnotherMainflow: fmt.Sprintf(`"{\"companyId\":\"c7d4b54e-7d9d-4bec-a215-53bad73489f0\",\"authTokenExpireIds\":[],\"connectorIds\":[\"httpConnector\",\"flowConnector\"],\"createdDate\":1670454819423,\"currentVersion\":2,\"customerId\":\"ee728871d18a3b9b273c87192cee4a18\",\"deployedDate\":1670454822120,\"description\":\"\",\"flowStatus\":\"enabled\",\"name\":\"AnotherMainflow-%[1]s\",\"orx\":\"{\\\"companyId\\\":\\\"c7d4b54e-7d9d-4bec-a215-53bad73489f0\\\",\\\"flowId\\\":\\\"94e1b4a6a39ad267434d750a964f2f44\\\",\\\"flowVersionId\\\":2,\\\"version\\\":\\\"4.0.0\\\",\\\"states\\\":[\\\"initialize\\\",\\\"start_0\\\",\\\"inside_0\\\",\\\"end_0\\\"],\\\"currentState\\\":[\\\"initialize\\\"],\\\"transitions\\\":[{\\\"from\\\":[\\\"initialize\\\"],\\\"to\\\":\\\"start_0\\\",\\\"conditions\\\":{\\\"$and\\\":[{\\\"initializeFlow\\\":true}]},\\\"signals\\\":[{\\\"name\\\":\\\"Http\\\",\\\"companyId\\\":\\\"c7d4b54e-7d9d-4bec-a215-53bad73489f0\\\",\\\"flowId\\\":\\\"94e1b4a6a39ad267434d750a964f2f44\\\",\\\"flowVersionId\\\":2,\\\"id\\\":\\\"4xlw7ugv6z\\\",\\\"connectionId\\\":\\\"867ed4363b2bc21c860085ad2baa817d\\\",\\\"connectorId\\\":\\\"httpConnector\\\",\\\"capabilityName\\\":\\\"customHtmlMessage\\\",\\\"properties\\\":{\\\"message\\\":{\\\"value\\\":\\\"Hello from AnotherMainflow\\\"},\\\"showContinueButton\\\":{\\\"value\\\":true}},\\\"debugMode\\\":false,\\\"logLevel\\\":null,\\\"isDisabled\\\":false,\\\"inputs\\\":[\\\"global.error\\\"],\\\"respondToUser\\\":true,\\\"transitionId\\\":0,\\\"signalId\\\":0}],\\\"transitionId\\\":0},{\\\"from\\\":[\\\"start_0\\\"],\\\"to\\\":\\\"inside_0\\\",\\\"conditions\\\":{\\\"$and\\\":[{\\\"id\\\":\\\"4xlw7ugv6z\\\",\\\"connectionId\\\":\\\"867ed4363b2bc21c860085ad2baa817d\\\",\\\"connectorId\\\":\\\"httpConnector\\\",\\\"capabilityName\\\":\\\"customHtmlMessage\\\",\\\"success\\\":true}]},\\\"signals\\\":[{\\\"name\\\":\\\"Flow\\\",\\\"companyId\\\":\\\"c7d4b54e-7d9d-4bec-a215-53bad73489f0\\\",\\\"flowId\\\":\\\"94e1b4a6a39ad267434d750a964f2f44\\\",\\\"flowVersionId\\\":2,\\\"id\\\":\\\"lwm7tdp8wg\\\",\\\"connectionId\\\":\\\"6cfe3583c35bbf54a68eea351b55862d\\\",\\\"connectorId\\\":\\\"flowConnector\\\",\\\"capabilityName\\\":\\\"startUiSubFlow\\\",\\\"properties\\\":{\\\"subFlowId\\\":{\\\"value\\\":{\\\"label\\\":\\\"Subflow-%[1]s\\\",\\\"value\\\":\\\"429812d959aecccd1523576fad6f91e4\\\"}},\\\"subFlowVersionId\\\":{\\\"value\\\":-1}},\\\"debugMode\\\":false,\\\"logLevel\\\":null,\\\"isDisabled\\\":false,\\\"inputs\\\":[\\\"global.cookies\\\",\\\"global.ip\\\",\\\"global.userAgent\\\",\\\"global.skOpenId\\\",\\\"global.origin\\\",\\\"global.originCookies\\\"],\\\"respondToUser\\\":true,\\\"transitionId\\\":1,\\\"signalId\\\":0}],\\\"evalNodeId\\\":\\\"ygtoiozc7d\\\",\\\"transitionId\\\":1},{\\\"from\\\":[\\\"inside_0\\\"],\\\"to\\\":\\\"end_0\\\",\\\"conditions\\\":{\\\"$and\\\":[{\\\"id\\\":\\\"lwm7tdp8wg\\\",\\\"connectionId\\\":\\\"6cfe3583c35bbf54a68eea351b55862d\\\",\\\"connectorId\\\":\\\"flowConnector\\\",\\\"capabilityName\\\":\\\"startUiSubFlow\\\",\\\"success\\\":true}]},\\\"signals\\\":[{\\\"name\\\":\\\"Http\\\",\\\"companyId\\\":\\\"c7d4b54e-7d9d-4bec-a215-53bad73489f0\\\",\\\"flowId\\\":\\\"94e1b4a6a39ad267434d750a964f2f44\\\",\\\"flowVersionId\\\":2,\\\"id\\\":\\\"nfixv1aq7h\\\",\\\"connectionId\\\":\\\"867ed4363b2bc21c860085ad2baa817d\\\",\\\"connectorId\\\":\\\"httpConnector\\\",\\\"capabilityName\\\":\\\"customHtmlMessage\\\",\\\"properties\\\":{\\\"message\\\":{\\\"value\\\":\\\"Back in Mainflow\\\"}},\\\"debugMode\\\":false,\\\"logLevel\\\":null,\\\"isDisabled\\\":false,\\\"inputs\\\":[\\\"global.error\\\"],\\\"respondToUser\\\":true,\\\"transitionId\\\":2,\\\"signalId\\\":0}],\\\"evalNodeId\\\":\\\"s8rurw6ogo\\\",\\\"transitionId\\\":2}],\\\"history\\\":[],\\\"outputs\\\":{\\\"flowConnector_startUiSubFlow\\\":{\\\"localOutputs\\\":[\\\"output\\\"]}},\\\"outputParameters\\\":[],\\\"global\\\":{},\\\"local\\\":{},\\\"idMapping\\\":{},\\\"nodeMappingForTids\\\":{\\\"4xlw7ugv6z\\\":\\\"initialize\\\",\\\"4xlw7ugv6z_customHtmlMessage\\\":\\\"initialize\\\",\\\"lwm7tdp8wg\\\":\\\"4xlw7ugv6z\\\",\\\"lwm7tdp8wg_startUiSubFlow\\\":\\\"4xlw7ugv6z_customHtmlMessage\\\",\\\"nfixv1aq7h\\\":\\\"lwm7tdp8wg\\\",\\\"nfixv1aq7h_customHtmlMessage\\\":\\\"lwm7tdp8wg_startUiSubFlow\\\"},\\\"tids\\\":{},\\\"delayedConditionalStateChangeMappings\\\":{},\\\"delayedConditionalStateChangeMappingsReverse\\\":{},\\\"delayedConditionalStatesList\\\":[],\\\"lbsTransitionIdsToIgnore\\\":[],\\\"lbsTransitionIdsMapping\\\":{},\\\"outputParametersDefault\\\":{},\\\"outputParametersDefaultBlacklist\\\":[],\\\"historyThreshold\\\":70,\\\"errorRewindBlackListIds\\\":[],\\\"nodeMappingForTidsNew\\\":{\\\"4xlw7ugv6z\\\":\\\"initialize\\\",\\\"lwm7tdp8wg\\\":[\\\"4xlw7ugv6z\\\"],\\\"nfixv1aq7h\\\":[\\\"4xlw7ugv6z\\\",\\\"lwm7tdp8wg\\\"]},\\\"nodeStates\\\":{\\\"4xlw7ugv6z\\\":\\\"start_0\\\",\\\"lwm7tdp8wg\\\":\\\"inside_0\\\",\\\"nfixv1aq7h\\\":\\\"end_0\\\"}}\",\"publishedVersion\":2,\"updatedDate\":1670454822120,\"flowId\":\"94e1b4a6a39ad267434d750a964f2f44\",\"versionId\":2,\"graphData\":{\"elements\":{\"nodes\":[{\"data\":{\"id\":\"4xlw7ugv6z\",\"nodeType\":\"CONNECTION\",\"connectionId\":\"867ed4363b2bc21c860085ad2baa817d\",\"connectorId\":\"httpConnector\",\"name\":\"Http\",\"label\":\"Http\",\"status\":\"configured\",\"capabilityName\":\"customHtmlMessage\",\"type\":\"trigger\",\"properties\":{\"message\":{\"value\":\"[\\n {\\n \\\"children\\\": [\\n {\\n \\\"text\\\": \\\"Hello from AnotherMainflow\\\"\\n }\\n ]\\n }\\n]\"},\"showContinueButton\":{\"value\":true}}},\"position\":{\"x\":400,\"y\":400},\"group\":\"nodes\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":false,\"classes\":\"\"},{\"data\":{\"id\":\"ygtoiozc7d\",\"nodeType\":\"EVAL\",\"label\":\"Evaluator\"},\"position\":{\"x\":564.0012044376399,\"y\":396.26965173824817},\"group\":\"nodes\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":false,\"classes\":\"\"},{\"data\":{\"id\":\"lwm7tdp8wg\",\"nodeType\":\"CONNECTION\",\"connectionId\":\"6cfe3583c35bbf54a68eea351b55862d\",\"connectorId\":\"flowConnector\",\"name\":\"Flow\",\"label\":\"Flow\",\"status\":\"configured\",\"capabilityName\":\"startUiSubFlow\",\"type\":\"trigger\",\"properties\":{\"subFlowId\":{\"value\":{\"label\":\"Subflow-%[1]s\",\"value\":\"429812d959aecccd1523576fad6f91e4\"}},\"subFlowVersionId\":{\"value\":\"-1\"}}},\"position\":{\"x\":728.0024088752797,\"y\":392.5393034764964},\"group\":\"nodes\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":false,\"classes\":\"\"},{\"data\":{\"id\":\"s8rurw6ogo\",\"nodeType\":\"EVAL\",\"label\":\"Evaluator\"},\"position\":{\"x\":882.5029769455396,\"y\":389.0392824165202},\"group\":\"nodes\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":false,\"classes\":\"\"},{\"data\":{\"id\":\"nfixv1aq7h\",\"nodeType\":\"CONNECTION\",\"connectionId\":\"867ed4363b2bc21c860085ad2baa817d\",\"connectorId\":\"httpConnector\",\"name\":\"Http\",\"label\":\"Http\",\"status\":\"configured\",\"capabilityName\":\"customHtmlMessage\",\"type\":\"trigger\",\"properties\":{\"message\":{\"value\":\"[\\n {\\n \\\"children\\\": [\\n {\\n \\\"text\\\": \\\"Back in Mainflow\\\"\\n }\\n ]\\n }\\n]\"}}},\"position\":{\"x\":1037.0035450157993,\"y\":385.5392613565441},\"group\":\"nodes\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":false,\"classes\":\"\"}],\"edges\":[{\"data\":{\"id\":\"jpamko0uag\",\"source\":\"4xlw7ugv6z\",\"target\":\"ygtoiozc7d\"},\"position\":{\"x\":0,\"y\":0},\"group\":\"edges\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":true,\"classes\":\"\"},{\"data\":{\"id\":\"i9iji3pgoc\",\"source\":\"ygtoiozc7d\",\"target\":\"lwm7tdp8wg\"},\"position\":{\"x\":0,\"y\":0},\"group\":\"edges\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":true,\"classes\":\"\"},{\"data\":{\"id\":\"9fg3exlq6u\",\"source\":\"lwm7tdp8wg\",\"target\":\"s8rurw6ogo\"},\"position\":{\"x\":0,\"y\":0},\"group\":\"edges\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":true,\"classes\":\"\"},{\"data\":{\"id\":\"kb903zcmb3\",\"source\":\"s8rurw6ogo\",\"target\":\"nfixv1aq7h\"},\"position\":{\"x\":0,\"y\":0},\"group\":\"edges\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":true,\"classes\":\"\"}]},\"data\":{},\"zoomingEnabled\":true,\"userZoomingEnabled\":true,\"zoom\":1,\"minZoom\":1e-50,\"maxZoom\":1e+50,\"panningEnabled\":true,\"userPanningEnabled\":true,\"pan\":{\"x\":0,\"y\":0},\"boxSelectionEnabled\":true,\"renderer\":{\"name\":\"null\"}},\"flowColor\":\"#AFD5FF\",\"savedDate\":1670454819392,\"variables\":[]}"`, resourceName), AnotherSubflow: fmt.Sprintf(`"{\"companyId\":\"c7d4b54e-7d9d-4bec-a215-53bad73489f0\",\"authTokenExpireIds\":[],\"connectorIds\":[\"httpConnector\"],\"createdDate\":1670454549078,\"currentVersion\":1,\"customerId\":\"ee728871d18a3b9b273c87192cee4a18\",\"deployedDate\":1670454550290,\"description\":\"\",\"flowStatus\":\"enabled\",\"name\":\"AnotherSubflow-%[1]s\",\"orx\":\"{\\\"companyId\\\":\\\"c7d4b54e-7d9d-4bec-a215-53bad73489f0\\\",\\\"flowId\\\":\\\"64f06befdbe8170f4da623115b18e58c\\\",\\\"flowVersionId\\\":1,\\\"version\\\":\\\"4.0.0\\\",\\\"states\\\":[\\\"initialize\\\",\\\"start_0\\\",\\\"end_0\\\"],\\\"currentState\\\":[\\\"initialize\\\"],\\\"transitions\\\":[{\\\"from\\\":[\\\"initialize\\\"],\\\"to\\\":\\\"start_0\\\",\\\"conditions\\\":{\\\"$and\\\":[{\\\"initializeFlow\\\":true}]},\\\"signals\\\":[{\\\"name\\\":\\\"Http\\\",\\\"companyId\\\":\\\"c7d4b54e-7d9d-4bec-a215-53bad73489f0\\\",\\\"flowId\\\":\\\"64f06befdbe8170f4da623115b18e58c\\\",\\\"flowVersionId\\\":1,\\\"id\\\":\\\"2eor2o01yd\\\",\\\"connectionId\\\":\\\"867ed4363b2bc21c860085ad2baa817d\\\",\\\"connectorId\\\":\\\"httpConnector\\\",\\\"capabilityName\\\":\\\"customHtmlMessage\\\",\\\"properties\\\":{\\\"message\\\":{\\\"value\\\":\\\"Hello from AnotherSubflow\\\"},\\\"showContinueButton\\\":{\\\"value\\\":true}},\\\"debugMode\\\":false,\\\"logLevel\\\":null,\\\"isDisabled\\\":false,\\\"inputs\\\":[\\\"global.error\\\"],\\\"respondToUser\\\":true,\\\"transitionId\\\":0,\\\"signalId\\\":0}],\\\"transitionId\\\":0},{\\\"from\\\":[\\\"start_0\\\"],\\\"to\\\":\\\"end_0\\\",\\\"conditions\\\":{\\\"$and\\\":[{\\\"id\\\":\\\"2eor2o01yd\\\",\\\"connectionId\\\":\\\"867ed4363b2bc21c860085ad2baa817d\\\",\\\"connectorId\\\":\\\"httpConnector\\\",\\\"capabilityName\\\":\\\"customHtmlMessage\\\",\\\"success\\\":true}]},\\\"signals\\\":[{\\\"name\\\":\\\"Http\\\",\\\"companyId\\\":\\\"c7d4b54e-7d9d-4bec-a215-53bad73489f0\\\",\\\"flowId\\\":\\\"64f06befdbe8170f4da623115b18e58c\\\",\\\"flowVersionId\\\":1,\\\"id\\\":\\\"v6dd1n2nef\\\",\\\"connectionId\\\":\\\"867ed4363b2bc21c860085ad2baa817d\\\",\\\"connectorId\\\":\\\"httpConnector\\\",\\\"capabilityName\\\":\\\"createSuccessResponse\\\",\\\"properties\\\":{},\\\"debugMode\\\":false,\\\"logLevel\\\":null,\\\"isDisabled\\\":false,\\\"inputs\\\":[\\\"*\\\"],\\\"respondToUser\\\":true,\\\"transitionId\\\":1,\\\"signalId\\\":0}],\\\"evalNodeId\\\":\\\"si75sg75j4\\\",\\\"transitionId\\\":1}],\\\"history\\\":[],\\\"outputs\\\":{},\\\"outputParameters\\\":[],\\\"global\\\":{},\\\"local\\\":{},\\\"idMapping\\\":{},\\\"nodeMappingForTids\\\":{\\\"2eor2o01yd\\\":\\\"initialize\\\",\\\"2eor2o01yd_customHtmlMessage\\\":\\\"initialize\\\",\\\"v6dd1n2nef\\\":\\\"2eor2o01yd\\\",\\\"v6dd1n2nef_createSuccessResponse\\\":\\\"2eor2o01yd_customHtmlMessage\\\"},\\\"tids\\\":{},\\\"delayedConditionalStateChangeMappings\\\":{},\\\"delayedConditionalStateChangeMappingsReverse\\\":{},\\\"delayedConditionalStatesList\\\":[],\\\"lbsTransitionIdsToIgnore\\\":[],\\\"lbsTransitionIdsMapping\\\":{},\\\"outputParametersDefault\\\":{},\\\"outputParametersDefaultBlacklist\\\":[],\\\"historyThreshold\\\":70,\\\"errorRewindBlackListIds\\\":[],\\\"nodeMappingForTidsNew\\\":{\\\"2eor2o01yd\\\":\\\"initialize\\\",\\\"v6dd1n2nef\\\":[\\\"2eor2o01yd\\\"]},\\\"nodeStates\\\":{\\\"2eor2o01yd\\\":\\\"start_0\\\",\\\"v6dd1n2nef\\\":\\\"end_0\\\"}}\",\"publishedVersion\":1,\"updatedDate\":1670454550290,\"flowId\":\"64f06befdbe8170f4da623115b18e58c\",\"versionId\":1,\"graphData\":{\"elements\":{\"nodes\":[{\"data\":{\"id\":\"2eor2o01yd\",\"nodeType\":\"CONNECTION\",\"connectionId\":\"867ed4363b2bc21c860085ad2baa817d\",\"connectorId\":\"httpConnector\",\"name\":\"Http\",\"label\":\"Http\",\"status\":\"configured\",\"capabilityName\":\"customHtmlMessage\",\"type\":\"trigger\",\"properties\":{\"message\":{\"value\":\"[\\n {\\n \\\"children\\\": [\\n {\\n \\\"text\\\": \\\"Hello from AnotherSubflow\\\"\\n }\\n ]\\n }\\n]\"},\"showContinueButton\":{\"value\":true}}},\"position\":{\"x\":400,\"y\":400},\"group\":\"nodes\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":false,\"classes\":\"\"},{\"data\":{\"id\":\"si75sg75j4\",\"nodeType\":\"EVAL\",\"label\":\"Evaluator\"},\"position\":{\"x\":605.0013551876764,\"y\":402.7696908496324},\"group\":\"nodes\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":false,\"classes\":\"\"},{\"data\":{\"id\":\"v6dd1n2nef\",\"nodeType\":\"CONNECTION\",\"connectionId\":\"867ed4363b2bc21c860085ad2baa817d\",\"connectorId\":\"httpConnector\",\"name\":\"Http\",\"label\":\"Http\",\"status\":\"configured\",\"capabilityName\":\"createSuccessResponse\",\"type\":\"action\",\"properties\":{}},\"position\":{\"x\":810.0027103753529,\"y\":405.5393816992648},\"group\":\"nodes\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":false,\"classes\":\"\"}],\"edges\":[{\"data\":{\"id\":\"49g53utkgw\",\"source\":\"2eor2o01yd\",\"target\":\"si75sg75j4\"},\"position\":{\"x\":0,\"y\":0},\"group\":\"edges\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":true,\"classes\":\"\"},{\"data\":{\"id\":\"a5e8fky7ns\",\"source\":\"si75sg75j4\",\"target\":\"v6dd1n2nef\"},\"position\":{\"x\":0,\"y\":0},\"group\":\"edges\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":true,\"classes\":\"\"}]},\"data\":{},\"zoomingEnabled\":true,\"userZoomingEnabled\":true,\"zoom\":1,\"minZoom\":1e-50,\"maxZoom\":1e+50,\"panningEnabled\":true,\"userPanningEnabled\":true,\"pan\":{\"x\":0,\"y\":0},\"boxSelectionEnabled\":true,\"renderer\":{\"name\":\"null\"}},\"flowColor\":\"#AFD5FF\",\"savedDate\":1670454549054,\"variables\":[]}"`, resourceName), WithVariableConnector: fmt.Sprintf(`"{\"companyId\":\"83fc9c23-6453-4134-95b2-661fcc1eba49\",\"authTokenExpireIds\":[],\"connectorIds\":[\"variablesConnector\",\"httpConnector\"],\"createdDate\":1675442964401,\"currentVersion\":1,\"customerId\":\"3193f25769a3f1e1591a1ebc82d51b13\",\"deployedDate\":1675442966019,\"description\":\"\",\"enabledGraphData\":{\"elements\":{\"nodes\":[{\"data\":{\"id\":\"zclitlw73r\",\"nodeType\":\"CONNECTION\",\"connectionId\":\"06922a684039827499bdbdd97f49827b\",\"connectorId\":\"variablesConnector\",\"name\":\"Variables\",\"label\":\"Variables\",\"status\":\"configured\",\"capabilityName\":\"saveValue\",\"type\":\"trigger\",\"properties\":{\"saveVariables\":{\"value\":[{\"name\":null,\"value\":\"[\\n {\\n \\\"children\\\": [\\n {\\n \\\"text\\\": \\\"\\\"\\n },\\n {\\n \\\"text\\\": \\\"\\\"\\n },\\n {\\n \\\"type\\\": \\\"link\\\",\\n \\\"src\\\": \\\"variable.svg\\\",\\n \\\"url\\\": \\\"simpleCompany\\\",\\n \\\"data\\\": \\\"{{global.company.variables.simpleCompany}}\\\",\\n \\\"tooltip\\\": \\\"{{global.company.variables.simpleCompany}}\\\",\\n \\\"children\\\": [\\n {\\n \\\"text\\\": \\\"simpleCompany\\\"\\n }\\n ]\\n },\\n {\\n \\\"text\\\": \\\"\\\"\\n }\\n ]\\n }\\n]\",\"key\":0.7657645725170312,\"type\":\"string\",\"nameDefault\":\"simpleCompany\"}]}}},\"position\":{\"x\":0,\"y\":0},\"group\":\"nodes\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":false,\"classes\":\"\"},{\"data\":{\"id\":\"igeltxspjk\",\"nodeType\":\"EVAL\",\"label\":\"Evaluator\"},\"position\":{\"x\":0,\"y\":0},\"group\":\"nodes\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":false,\"classes\":\"\"},{\"data\":{\"id\":\"2fwvg7vbmf\",\"nodeType\":\"CONNECTION\",\"connectionId\":\"867ed4363b2bc21c860085ad2baa817d\",\"connectorId\":\"httpConnector\",\"name\":\"Http\",\"label\":\"Http\",\"status\":\"configured\",\"capabilityName\":\"customHtmlMessage\",\"type\":\"trigger\",\"properties\":{\"message\":{\"value\":\"[\\n {\\n \\\"children\\\": [\\n {\\n \\\"text\\\": \\\"variable is: \\\"\\n },\\n {\\n \\\"text\\\": \\\"\\\"\\n },\\n {\\n \\\"type\\\": \\\"link\\\",\\n \\\"src\\\": \\\"variables.svg\\\",\\n \\\"url\\\": \\\"output\\\",\\n \\\"data\\\": \\\"{{local.zclitlw73r.payload.output}}\\\",\\n \\\"tooltip\\\": \\\"{{local.zclitlw73r.payload.output}}\\\",\\n \\\"children\\\": [\\n {\\n \\\"text\\\": \\\"output\\\"\\n }\\n ]\\n },\\n {\\n \\\"text\\\": \\\"\\\"\\n }\\n ]\\n }\\n]\"}}},\"position\":{\"x\":0,\"y\":0},\"group\":\"nodes\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":false,\"classes\":\"\"}],\"edges\":[{\"data\":{\"id\":\"puuq38mrou\",\"source\":\"zclitlw73r\",\"target\":\"igeltxspjk\"},\"position\":{\"x\":0,\"y\":0},\"group\":\"edges\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":true,\"classes\":\"\"},{\"data\":{\"id\":\"fx0d54uitd\",\"source\":\"igeltxspjk\",\"target\":\"2fwvg7vbmf\"},\"position\":{\"x\":0,\"y\":0},\"group\":\"edges\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":true,\"classes\":\"\"}]},\"data\":{},\"zoomingEnabled\":true,\"userZoomingEnabled\":true,\"zoom\":1,\"minZoom\":1e-50,\"maxZoom\":1e+50,\"panningEnabled\":true,\"userPanningEnabled\":true,\"pan\":{\"x\":0,\"y\":0},\"boxSelectionEnabled\":true,\"renderer\":{\"name\":\"null\"}},\"flowStatus\":\"enabled\",\"name\":\"printCompanyVar-%[1]s\",\"orx\":\"{\\\"companyId\\\":\\\"83fc9c23-6453-4134-95b2-661fcc1eba49\\\",\\\"flowId\\\":\\\"d5df2d3c437145314a0d195c5283ca3a\\\",\\\"flowVersionId\\\":1,\\\"version\\\":\\\"4.0.0\\\",\\\"states\\\":[\\\"initialize\\\",\\\"start_0\\\",\\\"end_0\\\"],\\\"currentState\\\":[\\\"initialize\\\"],\\\"transitions\\\":[{\\\"from\\\":[\\\"initialize\\\"],\\\"to\\\":\\\"start_0\\\",\\\"conditions\\\":{\\\"$and\\\":[{\\\"initializeFlow\\\":true}]},\\\"signals\\\":[{\\\"name\\\":\\\"Variables\\\",\\\"companyId\\\":\\\"83fc9c23-6453-4134-95b2-661fcc1eba49\\\",\\\"flowId\\\":\\\"d5df2d3c437145314a0d195c5283ca3a\\\",\\\"flowVersionId\\\":1,\\\"id\\\":\\\"zclitlw73r\\\",\\\"connectionId\\\":\\\"06922a684039827499bdbdd97f49827b\\\",\\\"connectorId\\\":\\\"variablesConnector\\\",\\\"capabilityName\\\":\\\"saveValue\\\",\\\"properties\\\":{\\\"saveVariables\\\":{\\\"value\\\":[{\\\"name\\\":null,\\\"value\\\":\\\"{{global.company.variables.simpleCompany}}\\\",\\\"key\\\":0.7657645725170312,\\\"type\\\":\\\"string\\\",\\\"nameDefault\\\":\\\"simpleCompany\\\"}]}},\\\"debugMode\\\":false,\\\"logLevel\\\":null,\\\"isDisabled\\\":false,\\\"inputs\\\":[],\\\"transitionId\\\":0,\\\"signalId\\\":0}],\\\"transitionId\\\":0},{\\\"from\\\":[\\\"start_0\\\"],\\\"to\\\":\\\"end_0\\\",\\\"conditions\\\":{\\\"$and\\\":[{\\\"id\\\":\\\"zclitlw73r\\\",\\\"connectionId\\\":\\\"06922a684039827499bdbdd97f49827b\\\",\\\"connectorId\\\":\\\"variablesConnector\\\",\\\"capabilityName\\\":\\\"saveValue\\\",\\\"success\\\":true}]},\\\"signals\\\":[{\\\"name\\\":\\\"Http\\\",\\\"companyId\\\":\\\"83fc9c23-6453-4134-95b2-661fcc1eba49\\\",\\\"flowId\\\":\\\"d5df2d3c437145314a0d195c5283ca3a\\\",\\\"flowVersionId\\\":1,\\\"id\\\":\\\"2fwvg7vbmf\\\",\\\"connectionId\\\":\\\"867ed4363b2bc21c860085ad2baa817d\\\",\\\"connectorId\\\":\\\"httpConnector\\\",\\\"capabilityName\\\":\\\"customHtmlMessage\\\",\\\"properties\\\":{\\\"message\\\":{\\\"value\\\":\\\"variable is: {{local.zclitlw73r.payload.output}}\\\"}},\\\"debugMode\\\":false,\\\"logLevel\\\":null,\\\"isDisabled\\\":false,\\\"inputs\\\":[\\\"global.error\\\"],\\\"respondToUser\\\":true,\\\"transitionId\\\":1,\\\"signalId\\\":0}],\\\"evalNodeId\\\":\\\"igeltxspjk\\\",\\\"transitionId\\\":1}],\\\"history\\\":[],\\\"outputs\\\":{\\\"variablesConnector_saveValue\\\":{\\\"localOutputs\\\":[\\\"output\\\"]}},\\\"outputParameters\\\":[\\\"global.company.variables.simpleCompany\\\",\\\"local.zclitlw73r.payload.output\\\"],\\\"global\\\":{},\\\"local\\\":{},\\\"idMapping\\\":{},\\\"nodeMappingForTids\\\":{\\\"2fwvg7vbmf\\\":\\\"initialize\\\",\\\"2fwvg7vbmf_customHtmlMessage\\\":\\\"initialize\\\"},\\\"tids\\\":{},\\\"delayedConditionalStateChangeMappings\\\":{},\\\"delayedConditionalStateChangeMappingsReverse\\\":{},\\\"delayedConditionalStatesList\\\":[],\\\"lbsTransitionIdsToIgnore\\\":[],\\\"lbsTransitionIdsMapping\\\":{},\\\"outputParametersDefault\\\":{\\\"global.company.variables.simpleCompany\\\":\\\"\\\",\\\"local.zclitlw73r.payload.output\\\":\\\"\\\"},\\\"outputParametersDefaultBlacklist\\\":[],\\\"historyThreshold\\\":70,\\\"errorRewindBlackListIds\\\":[],\\\"nodeMappingForTidsNew\\\":{\\\"2fwvg7vbmf\\\":\\\"initialize\\\"},\\\"nodeStates\\\":{\\\"zclitlw73r\\\":\\\"start_0\\\",\\\"2fwvg7vbmf\\\":\\\"end_0\\\"}}\",\"publishedVersion\":1,\"updatedDate\":1675442966019,\"flowId\":\"d5df2d3c437145314a0d195c5283ca3a\",\"versionId\":1,\"graphData\":{\"elements\":{\"nodes\":[{\"data\":{\"id\":\"zclitlw73r\",\"nodeType\":\"CONNECTION\",\"connectionId\":\"06922a684039827499bdbdd97f49827b\",\"connectorId\":\"variablesConnector\",\"name\":\"Variables\",\"label\":\"Variables\",\"status\":\"configured\",\"capabilityName\":\"saveValue\",\"type\":\"trigger\",\"properties\":{\"saveVariables\":{\"value\":[{\"name\":null,\"value\":\"[\\n {\\n \\\"children\\\": [\\n {\\n \\\"text\\\": \\\"\\\"\\n },\\n {\\n \\\"text\\\": \\\"\\\"\\n },\\n {\\n \\\"type\\\": \\\"link\\\",\\n \\\"src\\\": \\\"variable.svg\\\",\\n \\\"url\\\": \\\"simpleCompany\\\",\\n \\\"data\\\": \\\"{{global.company.variables.simpleCompany}}\\\",\\n \\\"tooltip\\\": \\\"{{global.company.variables.simpleCompany}}\\\",\\n \\\"children\\\": [\\n {\\n \\\"text\\\": \\\"simpleCompany\\\"\\n }\\n ]\\n },\\n {\\n \\\"text\\\": \\\"\\\"\\n }\\n ]\\n }\\n]\",\"key\":0.7657645725170312,\"type\":\"string\",\"nameDefault\":\"simpleCompany\"}]}}},\"position\":{\"x\":180,\"y\":300},\"group\":\"nodes\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":false,\"classes\":\"\"},{\"data\":{\"id\":\"igeltxspjk\",\"nodeType\":\"EVAL\",\"label\":\"Evaluator\"},\"position\":{\"x\":321,\"y\":300.83333587646484},\"group\":\"nodes\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":false,\"classes\":\"\"},{\"data\":{\"id\":\"2fwvg7vbmf\",\"nodeType\":\"CONNECTION\",\"connectionId\":\"867ed4363b2bc21c860085ad2baa817d\",\"connectorId\":\"httpConnector\",\"name\":\"Http\",\"label\":\"Http\",\"status\":\"configured\",\"capabilityName\":\"customHtmlMessage\",\"type\":\"trigger\",\"properties\":{\"message\":{\"value\":\"[\\n {\\n \\\"children\\\": [\\n {\\n \\\"text\\\": \\\"variable is: \\\"\\n },\\n {\\n \\\"text\\\": \\\"\\\"\\n },\\n {\\n \\\"type\\\": \\\"link\\\",\\n \\\"src\\\": \\\"variables.svg\\\",\\n \\\"url\\\": \\\"output\\\",\\n \\\"data\\\": \\\"{{local.zclitlw73r.payload.output}}\\\",\\n \\\"tooltip\\\": \\\"{{local.zclitlw73r.payload.output}}\\\",\\n \\\"children\\\": [\\n {\\n \\\"text\\\": \\\"output\\\"\\n }\\n ]\\n },\\n {\\n \\\"text\\\": \\\"\\\"\\n }\\n ]\\n }\\n]\"}}},\"position\":{\"x\":462,\"y\":301.6666717529297},\"group\":\"nodes\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":false,\"classes\":\"\"}],\"edges\":[{\"data\":{\"id\":\"puuq38mrou\",\"source\":\"zclitlw73r\",\"target\":\"igeltxspjk\"},\"position\":{\"x\":0,\"y\":0},\"group\":\"edges\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":true,\"classes\":\"\"},{\"data\":{\"id\":\"fx0d54uitd\",\"source\":\"igeltxspjk\",\"target\":\"2fwvg7vbmf\"},\"position\":{\"x\":0,\"y\":0},\"group\":\"edges\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":true,\"classes\":\"\"}]},\"data\":{},\"zoomingEnabled\":true,\"userZoomingEnabled\":true,\"zoom\":1,\"minZoom\":1e-50,\"maxZoom\":1e+50,\"panningEnabled\":true,\"userPanningEnabled\":true,\"pan\":{\"x\":0,\"y\":0},\"boxSelectionEnabled\":true,\"renderer\":{\"name\":\"null\"}},\"flowColor\":\"#E3F0FF\",\"savedDate\":1675442964375,\"variables\":[]}"`, resourceName), - BrokenFlow: fmt.Sprintf(`"{\"companyId\":\"0a77c43b-3afd-4f08-b88c-61e811f3d0d9\",\"connectorIds\":[\"errorConnector\"],\"createdDate\":1675789456863,\"currentVersion\":0,\"customerId\":\"ee728871d18a3b9b273c87192cee4a18\",\"description\":\"\",\"flowStatus\":\"enabled\",\"name\":\"brokenFlow%[1]s\",\"updatedDate\":1675789456873,\"flowId\":\"ef5eab24ebe4f578cd73ec4acb79b78d\",\"versionId\":0,\"graphData\":{\"elements\":{\"nodes\":[{\"data\":{\"id\":\"zlgncqvws2\",\"nodeType\":\"CONNECTION\",\"connectionId\":\"6d8f6f706c45fd459a86b3f092602544\",\"connectorId\":\"errorConnector\",\"name\":\"Error Customize\",\"label\":\"Error Customize\",\"status\":\"unconfigured\"},\"position\":{\"x\":400,\"y\":409.0909090042114},\"group\":\"nodes\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":false,\"classes\":\"\"}]},\"data\":{},\"zoomingEnabled\":true,\"userZoomingEnabled\":true,\"zoom\":1,\"minZoom\":1e-50,\"maxZoom\":1e+50,\"panningEnabled\":true,\"userPanningEnabled\":true,\"pan\":{\"x\":0,\"y\":0},\"boxSelectionEnabled\":true,\"renderer\":{\"name\":\"null\"}},\"flowColor\":\"#FFC8C1\",\"savedDate\":1675789456846,\"variables\":[]}"`, resourceName), + BrokenFlow: fmt.Sprintf(`"{\"companyId\":\"0a77c43b-3afd-4f08-b88c-61e811f3d0d9\",\"connectorIds\":[\"errorConnector\"],\"createdDate\":1675789456863,\"currentVersion\":0,\"customerId\":\"ee728871d18a3b9b273c87192cee4a18\",\"description\":\"\",\"flowStatus\":\"enabled\",\"name\":\"brokenFlow%[1]s\",\"updatedDate\":1675789456873,\"flowId\":\"ef5eab24ebe4f578cd73ec4acb79b78d\",\"versionId\":0,\"graphData\":{\"elements\":{\"nodes\":[{\"data\":{\"id\":\"zlgncqvws2\",\"nodeType\":\"CONNECTION\",\"connectionId\":\"6d8f6f706c45fd459a86b3f092602544\",\"connectorId\":\"errorConnector\",\"name\":\"Error Message\",\"label\":\"Error Message\",\"status\":\"unconfigured\"},\"position\":{\"x\":400,\"y\":409.0909090042114},\"group\":\"nodes\",\"removed\":false,\"selected\":false,\"selectable\":true,\"locked\":false,\"grabbable\":true,\"pannable\":false,\"classes\":\"\"}]},\"data\":{},\"zoomingEnabled\":true,\"userZoomingEnabled\":true,\"zoom\":1,\"minZoom\":1e-50,\"maxZoom\":1e+50,\"panningEnabled\":true,\"userPanningEnabled\":true,\"pan\":{\"x\":0,\"y\":0},\"boxSelectionEnabled\":true,\"renderer\":{\"name\":\"null\"}},\"flowColor\":\"#FFC8C1\",\"savedDate\":1675789456846,\"variables\":[]}"`, resourceName), PingOneSessionMainFlow: readFlowJsonFile("flows/p1sessionmainflow.json", resourceName), PingOneSessionMainFlowUpdate: readFlowJsonFile("flows/p1sessionmainflowupdate.json", resourceName), PingOneSessionSubFlow: readFlowJsonFile("flows/p1sessionsubflow.json", resourceName), diff --git a/internal/service/davinci/resource_flow_test.go b/internal/service/davinci/resource_flow_test.go index 3f8a83c8..060e1ba0 100644 --- a/internal/service/davinci/resource_flow_test.go +++ b/internal/service/davinci/resource_flow_test.go @@ -218,6 +218,7 @@ func TestAccResourceFlow_VariableConnectorFlow(t *testing.T) { resourceFullName := fmt.Sprintf("%s.%s", resourceBase, testFlows.WithVariableConnector.Name) hcl := testAccResourceFlow_VariableConnectorFlows_Hcl(resourceName, []acctest.FlowHcl{testFlows.WithVariableConnector}) + fmt.Printf("hcl: %s\n", hcl) resource.Test(t, resource.TestCase{ PreCheck: func() { acctest.PreCheckPingOneAndTfVars(t) }, ProviderFactories: acctest.ProviderFactories,