diff --git a/src/ops/JourneyOps.ts b/src/ops/JourneyOps.ts index 9586f4dce..b0cb85c8a 100644 --- a/src/ops/JourneyOps.ts +++ b/src/ops/JourneyOps.ts @@ -189,7 +189,17 @@ export async function exportJourneysToFile( ): Promise { let fileName = file; if (!fileName) { - fileName = getTypedFilename(`all${getRealmString()}Journeys`, 'journeys'); + fileName = getTypedFilename(`all${getRealmString()}Journeys`, 'journey'); + } + if (state.getDirectory()) { + const dir = state.getDirectory().replace(/\/$/, ''); + debugMessage(`exportJourneysToFile: directory='${dir}'`); + fileName = `${dir}/${fileName}`; + // create directory if it doesn't exist + if (!fs.existsSync(dir)) { + debugMessage(`exportJourneysToFile: creating directory '${dir}'`); + fs.mkdirSync(dir, { recursive: true }); + } } const trees = await readJourneys(); const fileData: MultiTreeExportInterface = createMultiTreeExportTemplate(); @@ -215,11 +225,23 @@ export async function exportJourneysToFile( export async function exportJourneysToFiles( options: TreeExportOptions ): Promise { + const dir = state.getDirectory() + ? state.getDirectory().replace(/\/$/, '') + : undefined; + debugMessage(`exportJourneysToFiles: directory='${dir}'`); + // create directory if it doesn't exist + if (dir && !fs.existsSync(dir)) { + debugMessage(`exportJourneysToFiles: creating directory '${dir}'`); + fs.mkdirSync(dir, { recursive: true }); + } const trees = await readJourneys(); createProgressBar(trees.length, 'Exporting journeys...'); for (const tree of trees) { updateProgressBar(`${tree._id}`); - const fileName = getTypedFilename(`${tree._id}`, 'journey'); + let fileName = getTypedFilename(`${tree._id}`, 'journey'); + if (dir) { + fileName = `${dir}/${fileName}`; + } try { const exportData: SingleTreeExportInterface = await exportJourney( tree._id, diff --git a/test/e2e/__snapshots__/journey-export.e2e.test.js.snap b/test/e2e/__snapshots__/journey-export.e2e.test.js.snap new file mode 100644 index 000000000..c8ff5b816 --- /dev/null +++ b/test/e2e/__snapshots__/journey-export.e2e.test.js.snap @@ -0,0 +1,16291 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`frodo journey export "frodo journey export --all --file my-allAlphaJourneys.journey.json": should export all journeys to a single file named my-allAlphaJourneys.journey.json 1`] = `""`; + +exports[`frodo journey export "frodo journey export --all --file my-allAlphaJourneys.journey.json": should export all journeys to a single file named my-allAlphaJourneys.journey.json: ./my-allAlphaJourneys.journey.json 1`] = ` +{ + "meta": Any, + "trees": { + "j00": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "1e0789eb-3394-4f7d-9db4-f06cb4d71eab": { + "_id": "1e0789eb-3394-4f7d-9db4-f06cb4d71eab", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "240d83a3-2268-4ae1-9c20-30b65be6adab": { + "_id": "240d83a3-2268-4ae1-9c20-30b65be6adab", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "2a9c577f-402a-4fba-94f7-ccf7c479553b": { + "_id": "2a9c577f-402a-4fba-94f7-ccf7c479553b", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "b787efaf-f1a6-433a-8194-85b7c3df9c07": { + "_id": "b787efaf-f1a6-433a-8194-85b7c3df9c07", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "d1c184a0-5fbb-45a0-b0aa-36932833814c": { + "_id": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "3cb43516-ae69-433a-8787-501d45db14e9", + }, + "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a": { + "_id": "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "3cb43516-ae69-433a-8787-501d45db14e9": { + "_id": "3cb43516-ae69-433a-8787-501d45db14e9", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Display sharedState, transientState, and headers.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "debug", + "script": ""/* debug\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Display sharedState, transientState, and headers.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - true\\n */\\nvar anchor = \\"anchor-\\".concat(generateNumericToken('xxx'));\\nvar halign = \\"left\\";\\nvar message = \\"

Shared State:
\\".concat(\\n sharedState.toString()).concat(\\"

\\").concat(\\n \\"

Transient State:
\\").concat(\\n transientState.toString()).concat(\\"

\\").concat(\\n \\"

Request Headers:
\\").concat(\\n requestHeaders.toString()).concat(\\"

\\")\\nvar script = \\"Array.prototype.slice.call(\\\\n\\".concat(\\n \\"document.getElementsByClassName('callback-component')).forEach(\\\\n\\").concat(\\n \\"function (e) {\\\\n\\").concat(\\n \\" var message = e.firstElementChild;\\\\n\\").concat(\\n \\" if (message.firstChild && message.firstChild.nodeName == '#text' && message.firstChild.nodeValue.trim() == '\\").concat(anchor).concat(\\"') {\\\\n\\").concat(\\n \\" message.className = \\\\\\"text-left\\\\\\";\\\\n\\").concat(\\n \\" message.align = \\\\\\"\\").concat(halign).concat(\\"\\\\\\";\\\\n\\").concat(\\n \\" message.innerHTML = '\\").concat(message).concat(\\"';\\\\n\\").concat(\\n \\" }\\\\n\\").concat(\\n \\"})\\")\\nvar fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.TextOutputCallback,\\n com.sun.identity.authentication.callbacks.ScriptTextOutputCallback\\n)\\nif (message.length && callbacks.isEmpty()) {\\n action = fr.Action.send(\\n new fr.TextOutputCallback(\\n fr.TextOutputCallback.INFORMATION,\\n anchor\\n ),\\n new fr.ScriptTextOutputCallback(script)\\n ).build()\\n}\\nelse {\\n action = fr.Action.goTo(\\"true\\").build();\\n}\\n\\n /*\\n * Generate a token in the desired format. All 'x' characters will be replaced with a random number 0-9.\\n * \\n * Example:\\n * 'xxxxx' produces '28535'\\n * 'xxx-xxx' produces '432-521'\\n */\\nfunction generateNumericToken(format) {\\n return format.replace(/[x]/g, function(c) {\\n var r = Math.random()*10|0;\\n var v = r;\\n return v.toString(10);\\n });\\n}"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j00", + "enabled": true, + "entryNodeId": "240d83a3-2268-4ae1-9c20-30b65be6adab", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1e0789eb-3394-4f7d-9db4-f06cb4d71eab": { + "connections": { + "true": "b787efaf-f1a6-433a-8194-85b7c3df9c07", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "240d83a3-2268-4ae1-9c20-30b65be6adab": { + "connections": { + "level only": "2a9c577f-402a-4fba-94f7-ccf7c479553b", + "none": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + "shared and level": "1e0789eb-3394-4f7d-9db4-f06cb4d71eab", + "shared only": "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "2a9c577f-402a-4fba-94f7-ccf7c479553b": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "b787efaf-f1a6-433a-8194-85b7c3df9c07": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "d1c184a0-5fbb-45a0-b0aa-36932833814c": { + "connections": { + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "debug", + "nodeType": "ScriptedDecisionNode", + "x": 1033, + "y": 261.015625, + }, + "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j01": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "7e975947-efba-4a50-97ea-7cbe3fbf7416": { + "_id": "7e975947-efba-4a50-97ea-7cbe3fbf7416", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "aa97f870-d95e-4861-b756-64b6423dd7da": { + "_id": "aa97f870-d95e-4861-b756-64b6423dd7da", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j00", + }, + "b9c26251-9d4d-4499-b8e9-518f35111dbf": { + "_id": "b9c26251-9d4d-4499-b8e9-518f35111dbf", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "ba0ed11d-850f-4b4a-81bc-0d4ad07736df": { + "_id": "ba0ed11d-850f-4b4a-81bc-0d4ad07736df", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787": { + "_id": "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "fa62ae77-1e86-4939-a773-e428259fac97": { + "_id": "fa62ae77-1e86-4939-a773-e428259fac97", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j01", + "enabled": true, + "entryNodeId": "b9c26251-9d4d-4499-b8e9-518f35111dbf", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "7e975947-efba-4a50-97ea-7cbe3fbf7416": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "aa97f870-d95e-4861-b756-64b6423dd7da": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "b9c26251-9d4d-4499-b8e9-518f35111dbf": { + "connections": { + "level only": "7e975947-efba-4a50-97ea-7cbe3fbf7416", + "none": "aa97f870-d95e-4861-b756-64b6423dd7da", + "shared and level": "fa62ae77-1e86-4939-a773-e428259fac97", + "shared only": "ba0ed11d-850f-4b4a-81bc-0d4ad07736df", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "ba0ed11d-850f-4b4a-81bc-0d4ad07736df": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "fa62ae77-1e86-4939-a773-e428259fac97": { + "connections": { + "true": "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j02": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "1fafe9cd-4a2e-42b9-b326-ea1a94325a40": { + "_id": "1fafe9cd-4a2e-42b9-b326-ea1a94325a40", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "33791a7d-d14a-460f-806b-5fc3113a1e13": { + "_id": "33791a7d-d14a-460f-806b-5fc3113a1e13", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "4ee0bb06-5335-403e-810b-72d574247dfe": { + "_id": "4ee0bb06-5335-403e-810b-72d574247dfe", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "5e6d7b3b-e381-4395-ba18-ca807b6adb48": { + "_id": "5e6d7b3b-e381-4395-ba18-ca807b6adb48", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "a679285d-8718-4db3-ba08-e743ab7eb086": { + "_id": "a679285d-8718-4db3-ba08-e743ab7eb086", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "f192e72d-aa85-447b-af66-592a60f0c6c0": { + "_id": "f192e72d-aa85-447b-af66-592a60f0c6c0", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j01", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j02", + "enabled": true, + "entryNodeId": "33791a7d-d14a-460f-806b-5fc3113a1e13", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1fafe9cd-4a2e-42b9-b326-ea1a94325a40": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "33791a7d-d14a-460f-806b-5fc3113a1e13": { + "connections": { + "level only": "4ee0bb06-5335-403e-810b-72d574247dfe", + "none": "f192e72d-aa85-447b-af66-592a60f0c6c0", + "shared and level": "a679285d-8718-4db3-ba08-e743ab7eb086", + "shared only": "1fafe9cd-4a2e-42b9-b326-ea1a94325a40", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "4ee0bb06-5335-403e-810b-72d574247dfe": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "5e6d7b3b-e381-4395-ba18-ca807b6adb48": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "a679285d-8718-4db3-ba08-e743ab7eb086": { + "connections": { + "true": "5e6d7b3b-e381-4395-ba18-ca807b6adb48", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "f192e72d-aa85-447b-af66-592a60f0c6c0": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j03": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "40b880dd-fae5-4618-8a5a-15f096a1bd31": { + "_id": "40b880dd-fae5-4618-8a5a-15f096a1bd31", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad": { + "_id": "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "8fb91c4d-de64-49d8-83dc-7c03b7899613": { + "_id": "8fb91c4d-de64-49d8-83dc-7c03b7899613", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1": { + "_id": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j02", + }, + "da4c931c-ed4e-4451-9e7a-239a66f5bdf6": { + "_id": "da4c931c-ed4e-4451-9e7a-239a66f5bdf6", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "ffc4902e-5d39-4006-85d4-263792cbf12b": { + "_id": "ffc4902e-5d39-4006-85d4-263792cbf12b", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j03", + "enabled": true, + "entryNodeId": "ffc4902e-5d39-4006-85d4-263792cbf12b", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "40b880dd-fae5-4618-8a5a-15f096a1bd31": { + "connections": { + "true": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad": { + "connections": { + "true": "8fb91c4d-de64-49d8-83dc-7c03b7899613", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "8fb91c4d-de64-49d8-83dc-7c03b7899613": { + "connections": { + "true": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "da4c931c-ed4e-4451-9e7a-239a66f5bdf6": { + "connections": { + "true": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "ffc4902e-5d39-4006-85d4-263792cbf12b": { + "connections": { + "level only": "da4c931c-ed4e-4451-9e7a-239a66f5bdf6", + "none": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + "shared and level": "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad", + "shared only": "40b880dd-fae5-4618-8a5a-15f096a1bd31", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j04": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7": { + "_id": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j03", + }, + "31b2f947-d118-4593-9037-47631e4c6362": { + "_id": "31b2f947-d118-4593-9037-47631e4c6362", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "a3a5259d-07be-4ff3-a62d-82da3be53383": { + "_id": "a3a5259d-07be-4ff3-a62d-82da3be53383", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c": { + "_id": "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2": { + "_id": "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b": { + "_id": "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j04", + "enabled": true, + "entryNodeId": "a3a5259d-07be-4ff3-a62d-82da3be53383", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "31b2f947-d118-4593-9037-47631e4c6362": { + "connections": { + "true": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "a3a5259d-07be-4ff3-a62d-82da3be53383": { + "connections": { + "level only": "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c", + "none": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + "shared and level": "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b", + "shared only": "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c": { + "connections": { + "true": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2": { + "connections": { + "true": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b": { + "connections": { + "true": "31b2f947-d118-4593-9037-47631e4c6362", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j05": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "327eb877-019d-4ef6-9b17-a024fea0c71e": { + "_id": "327eb877-019d-4ef6-9b17-a024fea0c71e", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "84d09172-2001-4e49-aad7-d8913fa27ff7": { + "_id": "84d09172-2001-4e49-aad7-d8913fa27ff7", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "95af6abc-623d-4580-bda5-152c19949c96": { + "_id": "95af6abc-623d-4580-bda5-152c19949c96", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "a8f93777-948d-4efd-a76b-c44bc925d84e": { + "_id": "a8f93777-948d-4efd-a76b-c44bc925d84e", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "cb490a79-245e-4876-a1a0-f507ac9c1553": { + "_id": "cb490a79-245e-4876-a1a0-f507ac9c1553", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "cf10428f-0bb6-48c4-9926-96604c43da05": { + "_id": "cf10428f-0bb6-48c4-9926-96604c43da05", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j04", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j05", + "enabled": true, + "entryNodeId": "327eb877-019d-4ef6-9b17-a024fea0c71e", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "327eb877-019d-4ef6-9b17-a024fea0c71e": { + "connections": { + "level only": "cb490a79-245e-4876-a1a0-f507ac9c1553", + "none": "cf10428f-0bb6-48c4-9926-96604c43da05", + "shared and level": "95af6abc-623d-4580-bda5-152c19949c96", + "shared only": "84d09172-2001-4e49-aad7-d8913fa27ff7", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "84d09172-2001-4e49-aad7-d8913fa27ff7": { + "connections": { + "true": "cf10428f-0bb6-48c4-9926-96604c43da05", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "95af6abc-623d-4580-bda5-152c19949c96": { + "connections": { + "true": "a8f93777-948d-4efd-a76b-c44bc925d84e", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "a8f93777-948d-4efd-a76b-c44bc925d84e": { + "connections": { + "true": "cf10428f-0bb6-48c4-9926-96604c43da05", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "cb490a79-245e-4876-a1a0-f507ac9c1553": { + "connections": { + "true": "cf10428f-0bb6-48c4-9926-96604c43da05", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "cf10428f-0bb6-48c4-9926-96604c43da05": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j06": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0": { + "_id": "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "53169a16-1d53-4188-8342-83200849303f": { + "_id": "53169a16-1d53-4188-8342-83200849303f", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "708467b1-f201-40f6-a0ba-33148defec5d": { + "_id": "708467b1-f201-40f6-a0ba-33148defec5d", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j05", + }, + "a70d6f30-ffa8-4c77-851e-2d71fd601fa2": { + "_id": "a70d6f30-ffa8-4c77-851e-2d71fd601fa2", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1": { + "_id": "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "ccabe192-8f7a-4cf2-8a9d-dec9076d910a": { + "_id": "ccabe192-8f7a-4cf2-8a9d-dec9076d910a", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j06", + "enabled": true, + "entryNodeId": "a70d6f30-ffa8-4c77-851e-2d71fd601fa2", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0": { + "connections": { + "true": "708467b1-f201-40f6-a0ba-33148defec5d", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "53169a16-1d53-4188-8342-83200849303f": { + "connections": { + "true": "708467b1-f201-40f6-a0ba-33148defec5d", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "708467b1-f201-40f6-a0ba-33148defec5d": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + "a70d6f30-ffa8-4c77-851e-2d71fd601fa2": { + "connections": { + "level only": "53169a16-1d53-4188-8342-83200849303f", + "none": "708467b1-f201-40f6-a0ba-33148defec5d", + "shared and level": "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1", + "shared only": "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1": { + "connections": { + "true": "ccabe192-8f7a-4cf2-8a9d-dec9076d910a", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "ccabe192-8f7a-4cf2-8a9d-dec9076d910a": { + "connections": { + "true": "708467b1-f201-40f6-a0ba-33148defec5d", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j07": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "0242464d-58bb-46d3-bf41-ec0157ba8720": { + "_id": "0242464d-58bb-46d3-bf41-ec0157ba8720", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "57182fc1-789a-49d0-ba08-3d3f39202daf": { + "_id": "57182fc1-789a-49d0-ba08-3d3f39202daf", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j06", + }, + "85bf5f29-709e-42bb-939e-6c7bc8e710ac": { + "_id": "85bf5f29-709e-42bb-939e-6c7bc8e710ac", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280": { + "_id": "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "af0f2180-6077-42d5-bad6-a238d351e6db": { + "_id": "af0f2180-6077-42d5-bad6-a238d351e6db", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "dad45c04-3d86-4e3a-b5c3-34e89719f705": { + "_id": "dad45c04-3d86-4e3a-b5c3-34e89719f705", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j07", + "enabled": true, + "entryNodeId": "85bf5f29-709e-42bb-939e-6c7bc8e710ac", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "0242464d-58bb-46d3-bf41-ec0157ba8720": { + "connections": { + "true": "57182fc1-789a-49d0-ba08-3d3f39202daf", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "57182fc1-789a-49d0-ba08-3d3f39202daf": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + "85bf5f29-709e-42bb-939e-6c7bc8e710ac": { + "connections": { + "level only": "af0f2180-6077-42d5-bad6-a238d351e6db", + "none": "57182fc1-789a-49d0-ba08-3d3f39202daf", + "shared and level": "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280", + "shared only": "0242464d-58bb-46d3-bf41-ec0157ba8720", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280": { + "connections": { + "true": "dad45c04-3d86-4e3a-b5c3-34e89719f705", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "af0f2180-6077-42d5-bad6-a238d351e6db": { + "connections": { + "true": "57182fc1-789a-49d0-ba08-3d3f39202daf", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "dad45c04-3d86-4e3a-b5c3-34e89719f705": { + "connections": { + "true": "57182fc1-789a-49d0-ba08-3d3f39202daf", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j08": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "1ac726e7-e46d-4521-a65e-00c71951dd5b": { + "_id": "1ac726e7-e46d-4521-a65e-00c71951dd5b", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "875be2ae-0926-43ee-b742-ef75e4235015": { + "_id": "875be2ae-0926-43ee-b742-ef75e4235015", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "b524e828-573e-40c1-aef6-84abfec262c2": { + "_id": "b524e828-573e-40c1-aef6-84abfec262c2", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "b5a9be22-512b-402c-960d-c4c8b1f32cfa": { + "_id": "b5a9be22-512b-402c-960d-c4c8b1f32cfa", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "c9e13651-7c3f-4cd8-8245-c9dd09672069": { + "_id": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j07", + }, + "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2": { + "_id": "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j08", + "enabled": true, + "entryNodeId": "1ac726e7-e46d-4521-a65e-00c71951dd5b", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1ac726e7-e46d-4521-a65e-00c71951dd5b": { + "connections": { + "level only": "875be2ae-0926-43ee-b742-ef75e4235015", + "none": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + "shared and level": "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2", + "shared only": "b524e828-573e-40c1-aef6-84abfec262c2", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "875be2ae-0926-43ee-b742-ef75e4235015": { + "connections": { + "true": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "b524e828-573e-40c1-aef6-84abfec262c2": { + "connections": { + "true": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "b5a9be22-512b-402c-960d-c4c8b1f32cfa": { + "connections": { + "true": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "c9e13651-7c3f-4cd8-8245-c9dd09672069": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2": { + "connections": { + "true": "b5a9be22-512b-402c-960d-c4c8b1f32cfa", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j09": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "06794f50-9356-492c-bd46-2662d68dfc53": { + "_id": "06794f50-9356-492c-bd46-2662d68dfc53", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "4d9ceac3-0de2-48e6-9547-562de6a0b180": { + "_id": "4d9ceac3-0de2-48e6-9547-562de6a0b180", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "553fd963-ba44-409c-a9fb-36f8cc5ca6b8": { + "_id": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j08", + }, + "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde": { + "_id": "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058": { + "_id": "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "e3303783-9734-42ec-88c5-a7a627427059": { + "_id": "e3303783-9734-42ec-88c5-a7a627427059", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j09", + "enabled": true, + "entryNodeId": "06794f50-9356-492c-bd46-2662d68dfc53", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "06794f50-9356-492c-bd46-2662d68dfc53": { + "connections": { + "level only": "e3303783-9734-42ec-88c5-a7a627427059", + "none": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + "shared and level": "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde", + "shared only": "4d9ceac3-0de2-48e6-9547-562de6a0b180", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "4d9ceac3-0de2-48e6-9547-562de6a0b180": { + "connections": { + "true": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "553fd963-ba44-409c-a9fb-36f8cc5ca6b8": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde": { + "connections": { + "true": "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058": { + "connections": { + "true": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "e3303783-9734-42ec-88c5-a7a627427059": { + "connections": { + "true": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j10": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "09e1d1e6-b388-448c-b5a6-00db52f826e7": { + "_id": "09e1d1e6-b388-448c-b5a6-00db52f826e7", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "36cb348f-3b91-443b-a2ba-2e23c6446f49": { + "_id": "36cb348f-3b91-443b-a2ba-2e23c6446f49", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2": { + "_id": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j09", + }, + "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead": { + "_id": "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "aa5aebcf-131b-44f9-b596-f0805e1f4305": { + "_id": "aa5aebcf-131b-44f9-b596-f0805e1f4305", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "ccc8e0e1-86fc-4515-bc02-a3e11b07b933": { + "_id": "ccc8e0e1-86fc-4515-bc02-a3e11b07b933", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j10", + "enabled": true, + "entryNodeId": "ccc8e0e1-86fc-4515-bc02-a3e11b07b933", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "09e1d1e6-b388-448c-b5a6-00db52f826e7": { + "connections": { + "true": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "36cb348f-3b91-443b-a2ba-2e23c6446f49": { + "connections": { + "true": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead": { + "connections": { + "true": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "aa5aebcf-131b-44f9-b596-f0805e1f4305": { + "connections": { + "true": "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "ccc8e0e1-86fc-4515-bc02-a3e11b07b933": { + "connections": { + "level only": "09e1d1e6-b388-448c-b5a6-00db52f826e7", + "none": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + "shared and level": "aa5aebcf-131b-44f9-b596-f0805e1f4305", + "shared only": "36cb348f-3b91-443b-a2ba-2e23c6446f49", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export --all-separate --no-deps --use-string-arrays": should export all journeys to separate files with no dependencies and using string arrays 1`] = `""`; + +exports[`frodo journey export "frodo journey export --all-separate --no-deps --use-string-arrays": should export all journeys to separate files with no dependencies and using string arrays: ./j00.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "1e0789eb-3394-4f7d-9db4-f06cb4d71eab": { + "_id": "1e0789eb-3394-4f7d-9db4-f06cb4d71eab", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "240d83a3-2268-4ae1-9c20-30b65be6adab": { + "_id": "240d83a3-2268-4ae1-9c20-30b65be6adab", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "2a9c577f-402a-4fba-94f7-ccf7c479553b": { + "_id": "2a9c577f-402a-4fba-94f7-ccf7c479553b", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "b787efaf-f1a6-433a-8194-85b7c3df9c07": { + "_id": "b787efaf-f1a6-433a-8194-85b7c3df9c07", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "d1c184a0-5fbb-45a0-b0aa-36932833814c": { + "_id": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "3cb43516-ae69-433a-8787-501d45db14e9", + }, + "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a": { + "_id": "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j00", + "enabled": true, + "entryNodeId": "240d83a3-2268-4ae1-9c20-30b65be6adab", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1e0789eb-3394-4f7d-9db4-f06cb4d71eab": { + "connections": { + "true": "b787efaf-f1a6-433a-8194-85b7c3df9c07", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "240d83a3-2268-4ae1-9c20-30b65be6adab": { + "connections": { + "level only": "2a9c577f-402a-4fba-94f7-ccf7c479553b", + "none": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + "shared and level": "1e0789eb-3394-4f7d-9db4-f06cb4d71eab", + "shared only": "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "2a9c577f-402a-4fba-94f7-ccf7c479553b": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "b787efaf-f1a6-433a-8194-85b7c3df9c07": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "d1c184a0-5fbb-45a0-b0aa-36932833814c": { + "connections": { + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "debug", + "nodeType": "ScriptedDecisionNode", + "x": 1033, + "y": 261.015625, + }, + "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export --all-separate --no-deps --use-string-arrays": should export all journeys to separate files with no dependencies and using string arrays: ./j01.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "7e975947-efba-4a50-97ea-7cbe3fbf7416": { + "_id": "7e975947-efba-4a50-97ea-7cbe3fbf7416", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "aa97f870-d95e-4861-b756-64b6423dd7da": { + "_id": "aa97f870-d95e-4861-b756-64b6423dd7da", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j00", + }, + "b9c26251-9d4d-4499-b8e9-518f35111dbf": { + "_id": "b9c26251-9d4d-4499-b8e9-518f35111dbf", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "ba0ed11d-850f-4b4a-81bc-0d4ad07736df": { + "_id": "ba0ed11d-850f-4b4a-81bc-0d4ad07736df", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787": { + "_id": "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "fa62ae77-1e86-4939-a773-e428259fac97": { + "_id": "fa62ae77-1e86-4939-a773-e428259fac97", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j01", + "enabled": true, + "entryNodeId": "b9c26251-9d4d-4499-b8e9-518f35111dbf", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "7e975947-efba-4a50-97ea-7cbe3fbf7416": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "aa97f870-d95e-4861-b756-64b6423dd7da": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "b9c26251-9d4d-4499-b8e9-518f35111dbf": { + "connections": { + "level only": "7e975947-efba-4a50-97ea-7cbe3fbf7416", + "none": "aa97f870-d95e-4861-b756-64b6423dd7da", + "shared and level": "fa62ae77-1e86-4939-a773-e428259fac97", + "shared only": "ba0ed11d-850f-4b4a-81bc-0d4ad07736df", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "ba0ed11d-850f-4b4a-81bc-0d4ad07736df": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "fa62ae77-1e86-4939-a773-e428259fac97": { + "connections": { + "true": "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export --all-separate --no-deps --use-string-arrays": should export all journeys to separate files with no dependencies and using string arrays: ./j02.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "1fafe9cd-4a2e-42b9-b326-ea1a94325a40": { + "_id": "1fafe9cd-4a2e-42b9-b326-ea1a94325a40", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "33791a7d-d14a-460f-806b-5fc3113a1e13": { + "_id": "33791a7d-d14a-460f-806b-5fc3113a1e13", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "4ee0bb06-5335-403e-810b-72d574247dfe": { + "_id": "4ee0bb06-5335-403e-810b-72d574247dfe", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "5e6d7b3b-e381-4395-ba18-ca807b6adb48": { + "_id": "5e6d7b3b-e381-4395-ba18-ca807b6adb48", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "a679285d-8718-4db3-ba08-e743ab7eb086": { + "_id": "a679285d-8718-4db3-ba08-e743ab7eb086", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "f192e72d-aa85-447b-af66-592a60f0c6c0": { + "_id": "f192e72d-aa85-447b-af66-592a60f0c6c0", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j01", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j02", + "enabled": true, + "entryNodeId": "33791a7d-d14a-460f-806b-5fc3113a1e13", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1fafe9cd-4a2e-42b9-b326-ea1a94325a40": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "33791a7d-d14a-460f-806b-5fc3113a1e13": { + "connections": { + "level only": "4ee0bb06-5335-403e-810b-72d574247dfe", + "none": "f192e72d-aa85-447b-af66-592a60f0c6c0", + "shared and level": "a679285d-8718-4db3-ba08-e743ab7eb086", + "shared only": "1fafe9cd-4a2e-42b9-b326-ea1a94325a40", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "4ee0bb06-5335-403e-810b-72d574247dfe": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "5e6d7b3b-e381-4395-ba18-ca807b6adb48": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "a679285d-8718-4db3-ba08-e743ab7eb086": { + "connections": { + "true": "5e6d7b3b-e381-4395-ba18-ca807b6adb48", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "f192e72d-aa85-447b-af66-592a60f0c6c0": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export --all-separate --no-deps --use-string-arrays": should export all journeys to separate files with no dependencies and using string arrays: ./j03.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "40b880dd-fae5-4618-8a5a-15f096a1bd31": { + "_id": "40b880dd-fae5-4618-8a5a-15f096a1bd31", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad": { + "_id": "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "8fb91c4d-de64-49d8-83dc-7c03b7899613": { + "_id": "8fb91c4d-de64-49d8-83dc-7c03b7899613", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1": { + "_id": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j02", + }, + "da4c931c-ed4e-4451-9e7a-239a66f5bdf6": { + "_id": "da4c931c-ed4e-4451-9e7a-239a66f5bdf6", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "ffc4902e-5d39-4006-85d4-263792cbf12b": { + "_id": "ffc4902e-5d39-4006-85d4-263792cbf12b", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j03", + "enabled": true, + "entryNodeId": "ffc4902e-5d39-4006-85d4-263792cbf12b", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "40b880dd-fae5-4618-8a5a-15f096a1bd31": { + "connections": { + "true": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad": { + "connections": { + "true": "8fb91c4d-de64-49d8-83dc-7c03b7899613", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "8fb91c4d-de64-49d8-83dc-7c03b7899613": { + "connections": { + "true": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "da4c931c-ed4e-4451-9e7a-239a66f5bdf6": { + "connections": { + "true": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "ffc4902e-5d39-4006-85d4-263792cbf12b": { + "connections": { + "level only": "da4c931c-ed4e-4451-9e7a-239a66f5bdf6", + "none": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + "shared and level": "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad", + "shared only": "40b880dd-fae5-4618-8a5a-15f096a1bd31", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export --all-separate --no-deps --use-string-arrays": should export all journeys to separate files with no dependencies and using string arrays: ./j04.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7": { + "_id": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j03", + }, + "31b2f947-d118-4593-9037-47631e4c6362": { + "_id": "31b2f947-d118-4593-9037-47631e4c6362", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "a3a5259d-07be-4ff3-a62d-82da3be53383": { + "_id": "a3a5259d-07be-4ff3-a62d-82da3be53383", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c": { + "_id": "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2": { + "_id": "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b": { + "_id": "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j04", + "enabled": true, + "entryNodeId": "a3a5259d-07be-4ff3-a62d-82da3be53383", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "31b2f947-d118-4593-9037-47631e4c6362": { + "connections": { + "true": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "a3a5259d-07be-4ff3-a62d-82da3be53383": { + "connections": { + "level only": "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c", + "none": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + "shared and level": "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b", + "shared only": "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c": { + "connections": { + "true": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2": { + "connections": { + "true": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b": { + "connections": { + "true": "31b2f947-d118-4593-9037-47631e4c6362", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export --all-separate --no-deps --use-string-arrays": should export all journeys to separate files with no dependencies and using string arrays: ./j05.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "327eb877-019d-4ef6-9b17-a024fea0c71e": { + "_id": "327eb877-019d-4ef6-9b17-a024fea0c71e", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "84d09172-2001-4e49-aad7-d8913fa27ff7": { + "_id": "84d09172-2001-4e49-aad7-d8913fa27ff7", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "95af6abc-623d-4580-bda5-152c19949c96": { + "_id": "95af6abc-623d-4580-bda5-152c19949c96", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "a8f93777-948d-4efd-a76b-c44bc925d84e": { + "_id": "a8f93777-948d-4efd-a76b-c44bc925d84e", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "cb490a79-245e-4876-a1a0-f507ac9c1553": { + "_id": "cb490a79-245e-4876-a1a0-f507ac9c1553", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "cf10428f-0bb6-48c4-9926-96604c43da05": { + "_id": "cf10428f-0bb6-48c4-9926-96604c43da05", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j04", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j05", + "enabled": true, + "entryNodeId": "327eb877-019d-4ef6-9b17-a024fea0c71e", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "327eb877-019d-4ef6-9b17-a024fea0c71e": { + "connections": { + "level only": "cb490a79-245e-4876-a1a0-f507ac9c1553", + "none": "cf10428f-0bb6-48c4-9926-96604c43da05", + "shared and level": "95af6abc-623d-4580-bda5-152c19949c96", + "shared only": "84d09172-2001-4e49-aad7-d8913fa27ff7", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "84d09172-2001-4e49-aad7-d8913fa27ff7": { + "connections": { + "true": "cf10428f-0bb6-48c4-9926-96604c43da05", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "95af6abc-623d-4580-bda5-152c19949c96": { + "connections": { + "true": "a8f93777-948d-4efd-a76b-c44bc925d84e", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "a8f93777-948d-4efd-a76b-c44bc925d84e": { + "connections": { + "true": "cf10428f-0bb6-48c4-9926-96604c43da05", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "cb490a79-245e-4876-a1a0-f507ac9c1553": { + "connections": { + "true": "cf10428f-0bb6-48c4-9926-96604c43da05", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "cf10428f-0bb6-48c4-9926-96604c43da05": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export --all-separate --no-deps --use-string-arrays": should export all journeys to separate files with no dependencies and using string arrays: ./j06.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0": { + "_id": "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "53169a16-1d53-4188-8342-83200849303f": { + "_id": "53169a16-1d53-4188-8342-83200849303f", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "708467b1-f201-40f6-a0ba-33148defec5d": { + "_id": "708467b1-f201-40f6-a0ba-33148defec5d", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j05", + }, + "a70d6f30-ffa8-4c77-851e-2d71fd601fa2": { + "_id": "a70d6f30-ffa8-4c77-851e-2d71fd601fa2", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1": { + "_id": "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "ccabe192-8f7a-4cf2-8a9d-dec9076d910a": { + "_id": "ccabe192-8f7a-4cf2-8a9d-dec9076d910a", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j06", + "enabled": true, + "entryNodeId": "a70d6f30-ffa8-4c77-851e-2d71fd601fa2", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0": { + "connections": { + "true": "708467b1-f201-40f6-a0ba-33148defec5d", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "53169a16-1d53-4188-8342-83200849303f": { + "connections": { + "true": "708467b1-f201-40f6-a0ba-33148defec5d", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "708467b1-f201-40f6-a0ba-33148defec5d": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + "a70d6f30-ffa8-4c77-851e-2d71fd601fa2": { + "connections": { + "level only": "53169a16-1d53-4188-8342-83200849303f", + "none": "708467b1-f201-40f6-a0ba-33148defec5d", + "shared and level": "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1", + "shared only": "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1": { + "connections": { + "true": "ccabe192-8f7a-4cf2-8a9d-dec9076d910a", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "ccabe192-8f7a-4cf2-8a9d-dec9076d910a": { + "connections": { + "true": "708467b1-f201-40f6-a0ba-33148defec5d", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export --all-separate --no-deps --use-string-arrays": should export all journeys to separate files with no dependencies and using string arrays: ./j07.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "0242464d-58bb-46d3-bf41-ec0157ba8720": { + "_id": "0242464d-58bb-46d3-bf41-ec0157ba8720", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "57182fc1-789a-49d0-ba08-3d3f39202daf": { + "_id": "57182fc1-789a-49d0-ba08-3d3f39202daf", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j06", + }, + "85bf5f29-709e-42bb-939e-6c7bc8e710ac": { + "_id": "85bf5f29-709e-42bb-939e-6c7bc8e710ac", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280": { + "_id": "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "af0f2180-6077-42d5-bad6-a238d351e6db": { + "_id": "af0f2180-6077-42d5-bad6-a238d351e6db", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "dad45c04-3d86-4e3a-b5c3-34e89719f705": { + "_id": "dad45c04-3d86-4e3a-b5c3-34e89719f705", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j07", + "enabled": true, + "entryNodeId": "85bf5f29-709e-42bb-939e-6c7bc8e710ac", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "0242464d-58bb-46d3-bf41-ec0157ba8720": { + "connections": { + "true": "57182fc1-789a-49d0-ba08-3d3f39202daf", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "57182fc1-789a-49d0-ba08-3d3f39202daf": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + "85bf5f29-709e-42bb-939e-6c7bc8e710ac": { + "connections": { + "level only": "af0f2180-6077-42d5-bad6-a238d351e6db", + "none": "57182fc1-789a-49d0-ba08-3d3f39202daf", + "shared and level": "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280", + "shared only": "0242464d-58bb-46d3-bf41-ec0157ba8720", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280": { + "connections": { + "true": "dad45c04-3d86-4e3a-b5c3-34e89719f705", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "af0f2180-6077-42d5-bad6-a238d351e6db": { + "connections": { + "true": "57182fc1-789a-49d0-ba08-3d3f39202daf", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "dad45c04-3d86-4e3a-b5c3-34e89719f705": { + "connections": { + "true": "57182fc1-789a-49d0-ba08-3d3f39202daf", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export --all-separate --no-deps --use-string-arrays": should export all journeys to separate files with no dependencies and using string arrays: ./j08.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "1ac726e7-e46d-4521-a65e-00c71951dd5b": { + "_id": "1ac726e7-e46d-4521-a65e-00c71951dd5b", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "875be2ae-0926-43ee-b742-ef75e4235015": { + "_id": "875be2ae-0926-43ee-b742-ef75e4235015", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "b524e828-573e-40c1-aef6-84abfec262c2": { + "_id": "b524e828-573e-40c1-aef6-84abfec262c2", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "b5a9be22-512b-402c-960d-c4c8b1f32cfa": { + "_id": "b5a9be22-512b-402c-960d-c4c8b1f32cfa", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "c9e13651-7c3f-4cd8-8245-c9dd09672069": { + "_id": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j07", + }, + "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2": { + "_id": "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j08", + "enabled": true, + "entryNodeId": "1ac726e7-e46d-4521-a65e-00c71951dd5b", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1ac726e7-e46d-4521-a65e-00c71951dd5b": { + "connections": { + "level only": "875be2ae-0926-43ee-b742-ef75e4235015", + "none": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + "shared and level": "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2", + "shared only": "b524e828-573e-40c1-aef6-84abfec262c2", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "875be2ae-0926-43ee-b742-ef75e4235015": { + "connections": { + "true": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "b524e828-573e-40c1-aef6-84abfec262c2": { + "connections": { + "true": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "b5a9be22-512b-402c-960d-c4c8b1f32cfa": { + "connections": { + "true": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "c9e13651-7c3f-4cd8-8245-c9dd09672069": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2": { + "connections": { + "true": "b5a9be22-512b-402c-960d-c4c8b1f32cfa", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export --all-separate --no-deps --use-string-arrays": should export all journeys to separate files with no dependencies and using string arrays: ./j09.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "06794f50-9356-492c-bd46-2662d68dfc53": { + "_id": "06794f50-9356-492c-bd46-2662d68dfc53", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "4d9ceac3-0de2-48e6-9547-562de6a0b180": { + "_id": "4d9ceac3-0de2-48e6-9547-562de6a0b180", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "553fd963-ba44-409c-a9fb-36f8cc5ca6b8": { + "_id": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j08", + }, + "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde": { + "_id": "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058": { + "_id": "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "e3303783-9734-42ec-88c5-a7a627427059": { + "_id": "e3303783-9734-42ec-88c5-a7a627427059", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j09", + "enabled": true, + "entryNodeId": "06794f50-9356-492c-bd46-2662d68dfc53", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "06794f50-9356-492c-bd46-2662d68dfc53": { + "connections": { + "level only": "e3303783-9734-42ec-88c5-a7a627427059", + "none": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + "shared and level": "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde", + "shared only": "4d9ceac3-0de2-48e6-9547-562de6a0b180", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "4d9ceac3-0de2-48e6-9547-562de6a0b180": { + "connections": { + "true": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "553fd963-ba44-409c-a9fb-36f8cc5ca6b8": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde": { + "connections": { + "true": "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058": { + "connections": { + "true": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "e3303783-9734-42ec-88c5-a7a627427059": { + "connections": { + "true": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export --all-separate --no-deps --use-string-arrays": should export all journeys to separate files with no dependencies and using string arrays: ./j10.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "09e1d1e6-b388-448c-b5a6-00db52f826e7": { + "_id": "09e1d1e6-b388-448c-b5a6-00db52f826e7", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "36cb348f-3b91-443b-a2ba-2e23c6446f49": { + "_id": "36cb348f-3b91-443b-a2ba-2e23c6446f49", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2": { + "_id": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j09", + }, + "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead": { + "_id": "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "aa5aebcf-131b-44f9-b596-f0805e1f4305": { + "_id": "aa5aebcf-131b-44f9-b596-f0805e1f4305", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "ccc8e0e1-86fc-4515-bc02-a3e11b07b933": { + "_id": "ccc8e0e1-86fc-4515-bc02-a3e11b07b933", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j10", + "enabled": true, + "entryNodeId": "ccc8e0e1-86fc-4515-bc02-a3e11b07b933", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "09e1d1e6-b388-448c-b5a6-00db52f826e7": { + "connections": { + "true": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "36cb348f-3b91-443b-a2ba-2e23c6446f49": { + "connections": { + "true": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead": { + "connections": { + "true": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "aa5aebcf-131b-44f9-b596-f0805e1f4305": { + "connections": { + "true": "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "ccc8e0e1-86fc-4515-bc02-a3e11b07b933": { + "connections": { + "level only": "09e1d1e6-b388-448c-b5a6-00db52f826e7", + "none": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + "shared and level": "aa5aebcf-131b-44f9-b596-f0805e1f4305", + "shared only": "36cb348f-3b91-443b-a2ba-2e23c6446f49", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export --journey-id j02 --no-deps --use-string-arrays -D journeyTestDirectory1": should export the journey with journey id "j02" to the folder named "journeyTestDirectory1", and the export should not contain dependencies and should use string arrays. 1`] = `""`; + +exports[`frodo journey export "frodo journey export --journey-id j02 --no-deps --use-string-arrays -D journeyTestDirectory1": should export the journey with journey id "j02" to the folder named "journeyTestDirectory1", and the export should not contain dependencies and should use string arrays.: journeyTestDirectory1/j02.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "1fafe9cd-4a2e-42b9-b326-ea1a94325a40": { + "_id": "1fafe9cd-4a2e-42b9-b326-ea1a94325a40", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "33791a7d-d14a-460f-806b-5fc3113a1e13": { + "_id": "33791a7d-d14a-460f-806b-5fc3113a1e13", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "4ee0bb06-5335-403e-810b-72d574247dfe": { + "_id": "4ee0bb06-5335-403e-810b-72d574247dfe", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "5e6d7b3b-e381-4395-ba18-ca807b6adb48": { + "_id": "5e6d7b3b-e381-4395-ba18-ca807b6adb48", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "a679285d-8718-4db3-ba08-e743ab7eb086": { + "_id": "a679285d-8718-4db3-ba08-e743ab7eb086", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "f192e72d-aa85-447b-af66-592a60f0c6c0": { + "_id": "f192e72d-aa85-447b-af66-592a60f0c6c0", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j01", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j02", + "enabled": true, + "entryNodeId": "33791a7d-d14a-460f-806b-5fc3113a1e13", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1fafe9cd-4a2e-42b9-b326-ea1a94325a40": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "33791a7d-d14a-460f-806b-5fc3113a1e13": { + "connections": { + "level only": "4ee0bb06-5335-403e-810b-72d574247dfe", + "none": "f192e72d-aa85-447b-af66-592a60f0c6c0", + "shared and level": "a679285d-8718-4db3-ba08-e743ab7eb086", + "shared only": "1fafe9cd-4a2e-42b9-b326-ea1a94325a40", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "4ee0bb06-5335-403e-810b-72d574247dfe": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "5e6d7b3b-e381-4395-ba18-ca807b6adb48": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "a679285d-8718-4db3-ba08-e743ab7eb086": { + "connections": { + "true": "5e6d7b3b-e381-4395-ba18-ca807b6adb48", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "f192e72d-aa85-447b-af66-592a60f0c6c0": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export -AD journeyTestDirectory3": should export all journeys to separate files in the folder named "journeyTestDirectory3" 1`] = `""`; + +exports[`frodo journey export "frodo journey export -AD journeyTestDirectory3": should export all journeys to separate files in the folder named "journeyTestDirectory3": journeyTestDirectory3/j00.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "1e0789eb-3394-4f7d-9db4-f06cb4d71eab": { + "_id": "1e0789eb-3394-4f7d-9db4-f06cb4d71eab", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "240d83a3-2268-4ae1-9c20-30b65be6adab": { + "_id": "240d83a3-2268-4ae1-9c20-30b65be6adab", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "2a9c577f-402a-4fba-94f7-ccf7c479553b": { + "_id": "2a9c577f-402a-4fba-94f7-ccf7c479553b", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "b787efaf-f1a6-433a-8194-85b7c3df9c07": { + "_id": "b787efaf-f1a6-433a-8194-85b7c3df9c07", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "d1c184a0-5fbb-45a0-b0aa-36932833814c": { + "_id": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "3cb43516-ae69-433a-8787-501d45db14e9", + }, + "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a": { + "_id": "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "3cb43516-ae69-433a-8787-501d45db14e9": { + "_id": "3cb43516-ae69-433a-8787-501d45db14e9", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Display sharedState, transientState, and headers.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "debug", + "script": ""/* debug\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Display sharedState, transientState, and headers.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - true\\n */\\nvar anchor = \\"anchor-\\".concat(generateNumericToken('xxx'));\\nvar halign = \\"left\\";\\nvar message = \\"

Shared State:
\\".concat(\\n sharedState.toString()).concat(\\"

\\").concat(\\n \\"

Transient State:
\\").concat(\\n transientState.toString()).concat(\\"

\\").concat(\\n \\"

Request Headers:
\\").concat(\\n requestHeaders.toString()).concat(\\"

\\")\\nvar script = \\"Array.prototype.slice.call(\\\\n\\".concat(\\n \\"document.getElementsByClassName('callback-component')).forEach(\\\\n\\").concat(\\n \\"function (e) {\\\\n\\").concat(\\n \\" var message = e.firstElementChild;\\\\n\\").concat(\\n \\" if (message.firstChild && message.firstChild.nodeName == '#text' && message.firstChild.nodeValue.trim() == '\\").concat(anchor).concat(\\"') {\\\\n\\").concat(\\n \\" message.className = \\\\\\"text-left\\\\\\";\\\\n\\").concat(\\n \\" message.align = \\\\\\"\\").concat(halign).concat(\\"\\\\\\";\\\\n\\").concat(\\n \\" message.innerHTML = '\\").concat(message).concat(\\"';\\\\n\\").concat(\\n \\" }\\\\n\\").concat(\\n \\"})\\")\\nvar fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.TextOutputCallback,\\n com.sun.identity.authentication.callbacks.ScriptTextOutputCallback\\n)\\nif (message.length && callbacks.isEmpty()) {\\n action = fr.Action.send(\\n new fr.TextOutputCallback(\\n fr.TextOutputCallback.INFORMATION,\\n anchor\\n ),\\n new fr.ScriptTextOutputCallback(script)\\n ).build()\\n}\\nelse {\\n action = fr.Action.goTo(\\"true\\").build();\\n}\\n\\n /*\\n * Generate a token in the desired format. All 'x' characters will be replaced with a random number 0-9.\\n * \\n * Example:\\n * 'xxxxx' produces '28535'\\n * 'xxx-xxx' produces '432-521'\\n */\\nfunction generateNumericToken(format) {\\n return format.replace(/[x]/g, function(c) {\\n var r = Math.random()*10|0;\\n var v = r;\\n return v.toString(10);\\n });\\n}"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j00", + "enabled": true, + "entryNodeId": "240d83a3-2268-4ae1-9c20-30b65be6adab", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1e0789eb-3394-4f7d-9db4-f06cb4d71eab": { + "connections": { + "true": "b787efaf-f1a6-433a-8194-85b7c3df9c07", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "240d83a3-2268-4ae1-9c20-30b65be6adab": { + "connections": { + "level only": "2a9c577f-402a-4fba-94f7-ccf7c479553b", + "none": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + "shared and level": "1e0789eb-3394-4f7d-9db4-f06cb4d71eab", + "shared only": "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "2a9c577f-402a-4fba-94f7-ccf7c479553b": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "b787efaf-f1a6-433a-8194-85b7c3df9c07": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "d1c184a0-5fbb-45a0-b0aa-36932833814c": { + "connections": { + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "debug", + "nodeType": "ScriptedDecisionNode", + "x": 1033, + "y": 261.015625, + }, + "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export -AD journeyTestDirectory3": should export all journeys to separate files in the folder named "journeyTestDirectory3": journeyTestDirectory3/j01.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "7e975947-efba-4a50-97ea-7cbe3fbf7416": { + "_id": "7e975947-efba-4a50-97ea-7cbe3fbf7416", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "aa97f870-d95e-4861-b756-64b6423dd7da": { + "_id": "aa97f870-d95e-4861-b756-64b6423dd7da", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j00", + }, + "b9c26251-9d4d-4499-b8e9-518f35111dbf": { + "_id": "b9c26251-9d4d-4499-b8e9-518f35111dbf", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "ba0ed11d-850f-4b4a-81bc-0d4ad07736df": { + "_id": "ba0ed11d-850f-4b4a-81bc-0d4ad07736df", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787": { + "_id": "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "fa62ae77-1e86-4939-a773-e428259fac97": { + "_id": "fa62ae77-1e86-4939-a773-e428259fac97", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j01", + "enabled": true, + "entryNodeId": "b9c26251-9d4d-4499-b8e9-518f35111dbf", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "7e975947-efba-4a50-97ea-7cbe3fbf7416": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "aa97f870-d95e-4861-b756-64b6423dd7da": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "b9c26251-9d4d-4499-b8e9-518f35111dbf": { + "connections": { + "level only": "7e975947-efba-4a50-97ea-7cbe3fbf7416", + "none": "aa97f870-d95e-4861-b756-64b6423dd7da", + "shared and level": "fa62ae77-1e86-4939-a773-e428259fac97", + "shared only": "ba0ed11d-850f-4b4a-81bc-0d4ad07736df", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "ba0ed11d-850f-4b4a-81bc-0d4ad07736df": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "fa62ae77-1e86-4939-a773-e428259fac97": { + "connections": { + "true": "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export -AD journeyTestDirectory3": should export all journeys to separate files in the folder named "journeyTestDirectory3": journeyTestDirectory3/j02.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "1fafe9cd-4a2e-42b9-b326-ea1a94325a40": { + "_id": "1fafe9cd-4a2e-42b9-b326-ea1a94325a40", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "33791a7d-d14a-460f-806b-5fc3113a1e13": { + "_id": "33791a7d-d14a-460f-806b-5fc3113a1e13", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "4ee0bb06-5335-403e-810b-72d574247dfe": { + "_id": "4ee0bb06-5335-403e-810b-72d574247dfe", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "5e6d7b3b-e381-4395-ba18-ca807b6adb48": { + "_id": "5e6d7b3b-e381-4395-ba18-ca807b6adb48", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "a679285d-8718-4db3-ba08-e743ab7eb086": { + "_id": "a679285d-8718-4db3-ba08-e743ab7eb086", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "f192e72d-aa85-447b-af66-592a60f0c6c0": { + "_id": "f192e72d-aa85-447b-af66-592a60f0c6c0", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j01", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j02", + "enabled": true, + "entryNodeId": "33791a7d-d14a-460f-806b-5fc3113a1e13", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1fafe9cd-4a2e-42b9-b326-ea1a94325a40": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "33791a7d-d14a-460f-806b-5fc3113a1e13": { + "connections": { + "level only": "4ee0bb06-5335-403e-810b-72d574247dfe", + "none": "f192e72d-aa85-447b-af66-592a60f0c6c0", + "shared and level": "a679285d-8718-4db3-ba08-e743ab7eb086", + "shared only": "1fafe9cd-4a2e-42b9-b326-ea1a94325a40", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "4ee0bb06-5335-403e-810b-72d574247dfe": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "5e6d7b3b-e381-4395-ba18-ca807b6adb48": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "a679285d-8718-4db3-ba08-e743ab7eb086": { + "connections": { + "true": "5e6d7b3b-e381-4395-ba18-ca807b6adb48", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "f192e72d-aa85-447b-af66-592a60f0c6c0": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export -AD journeyTestDirectory3": should export all journeys to separate files in the folder named "journeyTestDirectory3": journeyTestDirectory3/j03.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "40b880dd-fae5-4618-8a5a-15f096a1bd31": { + "_id": "40b880dd-fae5-4618-8a5a-15f096a1bd31", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad": { + "_id": "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "8fb91c4d-de64-49d8-83dc-7c03b7899613": { + "_id": "8fb91c4d-de64-49d8-83dc-7c03b7899613", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1": { + "_id": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j02", + }, + "da4c931c-ed4e-4451-9e7a-239a66f5bdf6": { + "_id": "da4c931c-ed4e-4451-9e7a-239a66f5bdf6", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "ffc4902e-5d39-4006-85d4-263792cbf12b": { + "_id": "ffc4902e-5d39-4006-85d4-263792cbf12b", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j03", + "enabled": true, + "entryNodeId": "ffc4902e-5d39-4006-85d4-263792cbf12b", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "40b880dd-fae5-4618-8a5a-15f096a1bd31": { + "connections": { + "true": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad": { + "connections": { + "true": "8fb91c4d-de64-49d8-83dc-7c03b7899613", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "8fb91c4d-de64-49d8-83dc-7c03b7899613": { + "connections": { + "true": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "da4c931c-ed4e-4451-9e7a-239a66f5bdf6": { + "connections": { + "true": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "ffc4902e-5d39-4006-85d4-263792cbf12b": { + "connections": { + "level only": "da4c931c-ed4e-4451-9e7a-239a66f5bdf6", + "none": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + "shared and level": "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad", + "shared only": "40b880dd-fae5-4618-8a5a-15f096a1bd31", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export -AD journeyTestDirectory3": should export all journeys to separate files in the folder named "journeyTestDirectory3": journeyTestDirectory3/j04.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7": { + "_id": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j03", + }, + "31b2f947-d118-4593-9037-47631e4c6362": { + "_id": "31b2f947-d118-4593-9037-47631e4c6362", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "a3a5259d-07be-4ff3-a62d-82da3be53383": { + "_id": "a3a5259d-07be-4ff3-a62d-82da3be53383", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c": { + "_id": "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2": { + "_id": "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b": { + "_id": "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j04", + "enabled": true, + "entryNodeId": "a3a5259d-07be-4ff3-a62d-82da3be53383", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "31b2f947-d118-4593-9037-47631e4c6362": { + "connections": { + "true": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "a3a5259d-07be-4ff3-a62d-82da3be53383": { + "connections": { + "level only": "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c", + "none": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + "shared and level": "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b", + "shared only": "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c": { + "connections": { + "true": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2": { + "connections": { + "true": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b": { + "connections": { + "true": "31b2f947-d118-4593-9037-47631e4c6362", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export -AD journeyTestDirectory3": should export all journeys to separate files in the folder named "journeyTestDirectory3": journeyTestDirectory3/j05.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "327eb877-019d-4ef6-9b17-a024fea0c71e": { + "_id": "327eb877-019d-4ef6-9b17-a024fea0c71e", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "84d09172-2001-4e49-aad7-d8913fa27ff7": { + "_id": "84d09172-2001-4e49-aad7-d8913fa27ff7", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "95af6abc-623d-4580-bda5-152c19949c96": { + "_id": "95af6abc-623d-4580-bda5-152c19949c96", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "a8f93777-948d-4efd-a76b-c44bc925d84e": { + "_id": "a8f93777-948d-4efd-a76b-c44bc925d84e", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "cb490a79-245e-4876-a1a0-f507ac9c1553": { + "_id": "cb490a79-245e-4876-a1a0-f507ac9c1553", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "cf10428f-0bb6-48c4-9926-96604c43da05": { + "_id": "cf10428f-0bb6-48c4-9926-96604c43da05", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j04", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j05", + "enabled": true, + "entryNodeId": "327eb877-019d-4ef6-9b17-a024fea0c71e", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "327eb877-019d-4ef6-9b17-a024fea0c71e": { + "connections": { + "level only": "cb490a79-245e-4876-a1a0-f507ac9c1553", + "none": "cf10428f-0bb6-48c4-9926-96604c43da05", + "shared and level": "95af6abc-623d-4580-bda5-152c19949c96", + "shared only": "84d09172-2001-4e49-aad7-d8913fa27ff7", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "84d09172-2001-4e49-aad7-d8913fa27ff7": { + "connections": { + "true": "cf10428f-0bb6-48c4-9926-96604c43da05", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "95af6abc-623d-4580-bda5-152c19949c96": { + "connections": { + "true": "a8f93777-948d-4efd-a76b-c44bc925d84e", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "a8f93777-948d-4efd-a76b-c44bc925d84e": { + "connections": { + "true": "cf10428f-0bb6-48c4-9926-96604c43da05", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "cb490a79-245e-4876-a1a0-f507ac9c1553": { + "connections": { + "true": "cf10428f-0bb6-48c4-9926-96604c43da05", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "cf10428f-0bb6-48c4-9926-96604c43da05": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export -AD journeyTestDirectory3": should export all journeys to separate files in the folder named "journeyTestDirectory3": journeyTestDirectory3/j06.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0": { + "_id": "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "53169a16-1d53-4188-8342-83200849303f": { + "_id": "53169a16-1d53-4188-8342-83200849303f", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "708467b1-f201-40f6-a0ba-33148defec5d": { + "_id": "708467b1-f201-40f6-a0ba-33148defec5d", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j05", + }, + "a70d6f30-ffa8-4c77-851e-2d71fd601fa2": { + "_id": "a70d6f30-ffa8-4c77-851e-2d71fd601fa2", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1": { + "_id": "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "ccabe192-8f7a-4cf2-8a9d-dec9076d910a": { + "_id": "ccabe192-8f7a-4cf2-8a9d-dec9076d910a", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j06", + "enabled": true, + "entryNodeId": "a70d6f30-ffa8-4c77-851e-2d71fd601fa2", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0": { + "connections": { + "true": "708467b1-f201-40f6-a0ba-33148defec5d", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "53169a16-1d53-4188-8342-83200849303f": { + "connections": { + "true": "708467b1-f201-40f6-a0ba-33148defec5d", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "708467b1-f201-40f6-a0ba-33148defec5d": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + "a70d6f30-ffa8-4c77-851e-2d71fd601fa2": { + "connections": { + "level only": "53169a16-1d53-4188-8342-83200849303f", + "none": "708467b1-f201-40f6-a0ba-33148defec5d", + "shared and level": "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1", + "shared only": "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1": { + "connections": { + "true": "ccabe192-8f7a-4cf2-8a9d-dec9076d910a", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "ccabe192-8f7a-4cf2-8a9d-dec9076d910a": { + "connections": { + "true": "708467b1-f201-40f6-a0ba-33148defec5d", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export -AD journeyTestDirectory3": should export all journeys to separate files in the folder named "journeyTestDirectory3": journeyTestDirectory3/j07.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "0242464d-58bb-46d3-bf41-ec0157ba8720": { + "_id": "0242464d-58bb-46d3-bf41-ec0157ba8720", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "57182fc1-789a-49d0-ba08-3d3f39202daf": { + "_id": "57182fc1-789a-49d0-ba08-3d3f39202daf", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j06", + }, + "85bf5f29-709e-42bb-939e-6c7bc8e710ac": { + "_id": "85bf5f29-709e-42bb-939e-6c7bc8e710ac", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280": { + "_id": "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "af0f2180-6077-42d5-bad6-a238d351e6db": { + "_id": "af0f2180-6077-42d5-bad6-a238d351e6db", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "dad45c04-3d86-4e3a-b5c3-34e89719f705": { + "_id": "dad45c04-3d86-4e3a-b5c3-34e89719f705", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j07", + "enabled": true, + "entryNodeId": "85bf5f29-709e-42bb-939e-6c7bc8e710ac", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "0242464d-58bb-46d3-bf41-ec0157ba8720": { + "connections": { + "true": "57182fc1-789a-49d0-ba08-3d3f39202daf", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "57182fc1-789a-49d0-ba08-3d3f39202daf": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + "85bf5f29-709e-42bb-939e-6c7bc8e710ac": { + "connections": { + "level only": "af0f2180-6077-42d5-bad6-a238d351e6db", + "none": "57182fc1-789a-49d0-ba08-3d3f39202daf", + "shared and level": "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280", + "shared only": "0242464d-58bb-46d3-bf41-ec0157ba8720", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280": { + "connections": { + "true": "dad45c04-3d86-4e3a-b5c3-34e89719f705", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "af0f2180-6077-42d5-bad6-a238d351e6db": { + "connections": { + "true": "57182fc1-789a-49d0-ba08-3d3f39202daf", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "dad45c04-3d86-4e3a-b5c3-34e89719f705": { + "connections": { + "true": "57182fc1-789a-49d0-ba08-3d3f39202daf", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export -AD journeyTestDirectory3": should export all journeys to separate files in the folder named "journeyTestDirectory3": journeyTestDirectory3/j08.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "1ac726e7-e46d-4521-a65e-00c71951dd5b": { + "_id": "1ac726e7-e46d-4521-a65e-00c71951dd5b", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "875be2ae-0926-43ee-b742-ef75e4235015": { + "_id": "875be2ae-0926-43ee-b742-ef75e4235015", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "b524e828-573e-40c1-aef6-84abfec262c2": { + "_id": "b524e828-573e-40c1-aef6-84abfec262c2", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "b5a9be22-512b-402c-960d-c4c8b1f32cfa": { + "_id": "b5a9be22-512b-402c-960d-c4c8b1f32cfa", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "c9e13651-7c3f-4cd8-8245-c9dd09672069": { + "_id": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j07", + }, + "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2": { + "_id": "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j08", + "enabled": true, + "entryNodeId": "1ac726e7-e46d-4521-a65e-00c71951dd5b", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1ac726e7-e46d-4521-a65e-00c71951dd5b": { + "connections": { + "level only": "875be2ae-0926-43ee-b742-ef75e4235015", + "none": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + "shared and level": "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2", + "shared only": "b524e828-573e-40c1-aef6-84abfec262c2", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "875be2ae-0926-43ee-b742-ef75e4235015": { + "connections": { + "true": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "b524e828-573e-40c1-aef6-84abfec262c2": { + "connections": { + "true": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "b5a9be22-512b-402c-960d-c4c8b1f32cfa": { + "connections": { + "true": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "c9e13651-7c3f-4cd8-8245-c9dd09672069": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2": { + "connections": { + "true": "b5a9be22-512b-402c-960d-c4c8b1f32cfa", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export -AD journeyTestDirectory3": should export all journeys to separate files in the folder named "journeyTestDirectory3": journeyTestDirectory3/j09.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "06794f50-9356-492c-bd46-2662d68dfc53": { + "_id": "06794f50-9356-492c-bd46-2662d68dfc53", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "4d9ceac3-0de2-48e6-9547-562de6a0b180": { + "_id": "4d9ceac3-0de2-48e6-9547-562de6a0b180", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "553fd963-ba44-409c-a9fb-36f8cc5ca6b8": { + "_id": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j08", + }, + "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde": { + "_id": "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058": { + "_id": "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "e3303783-9734-42ec-88c5-a7a627427059": { + "_id": "e3303783-9734-42ec-88c5-a7a627427059", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j09", + "enabled": true, + "entryNodeId": "06794f50-9356-492c-bd46-2662d68dfc53", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "06794f50-9356-492c-bd46-2662d68dfc53": { + "connections": { + "level only": "e3303783-9734-42ec-88c5-a7a627427059", + "none": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + "shared and level": "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde", + "shared only": "4d9ceac3-0de2-48e6-9547-562de6a0b180", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "4d9ceac3-0de2-48e6-9547-562de6a0b180": { + "connections": { + "true": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "553fd963-ba44-409c-a9fb-36f8cc5ca6b8": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde": { + "connections": { + "true": "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058": { + "connections": { + "true": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "e3303783-9734-42ec-88c5-a7a627427059": { + "connections": { + "true": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export -AD journeyTestDirectory3": should export all journeys to separate files in the folder named "journeyTestDirectory3": journeyTestDirectory3/j10.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "09e1d1e6-b388-448c-b5a6-00db52f826e7": { + "_id": "09e1d1e6-b388-448c-b5a6-00db52f826e7", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "36cb348f-3b91-443b-a2ba-2e23c6446f49": { + "_id": "36cb348f-3b91-443b-a2ba-2e23c6446f49", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2": { + "_id": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j09", + }, + "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead": { + "_id": "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "aa5aebcf-131b-44f9-b596-f0805e1f4305": { + "_id": "aa5aebcf-131b-44f9-b596-f0805e1f4305", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "ccc8e0e1-86fc-4515-bc02-a3e11b07b933": { + "_id": "ccc8e0e1-86fc-4515-bc02-a3e11b07b933", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j10", + "enabled": true, + "entryNodeId": "ccc8e0e1-86fc-4515-bc02-a3e11b07b933", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "09e1d1e6-b388-448c-b5a6-00db52f826e7": { + "connections": { + "true": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "36cb348f-3b91-443b-a2ba-2e23c6446f49": { + "connections": { + "true": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead": { + "connections": { + "true": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "aa5aebcf-131b-44f9-b596-f0805e1f4305": { + "connections": { + "true": "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "ccc8e0e1-86fc-4515-bc02-a3e11b07b933": { + "connections": { + "level only": "09e1d1e6-b388-448c-b5a6-00db52f826e7", + "none": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + "shared and level": "aa5aebcf-131b-44f9-b596-f0805e1f4305", + "shared only": "36cb348f-3b91-443b-a2ba-2e23c6446f49", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export -a --no-deps --use-string-arrays --directory journeyTestDirectory2": should export all journeys to a single file in the folder named "journeyTestDirectory2" with no dependencies and only string arrays in the export. 1`] = `""`; + +exports[`frodo journey export "frodo journey export -a --no-deps --use-string-arrays --directory journeyTestDirectory2": should export all journeys to a single file in the folder named "journeyTestDirectory2" with no dependencies and only string arrays in the export.: journeyTestDirectory2/allAlphaJourneys.journey.json 1`] = ` +{ + "meta": Any, + "trees": { + "j00": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "1e0789eb-3394-4f7d-9db4-f06cb4d71eab": { + "_id": "1e0789eb-3394-4f7d-9db4-f06cb4d71eab", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "240d83a3-2268-4ae1-9c20-30b65be6adab": { + "_id": "240d83a3-2268-4ae1-9c20-30b65be6adab", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "2a9c577f-402a-4fba-94f7-ccf7c479553b": { + "_id": "2a9c577f-402a-4fba-94f7-ccf7c479553b", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "b787efaf-f1a6-433a-8194-85b7c3df9c07": { + "_id": "b787efaf-f1a6-433a-8194-85b7c3df9c07", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "d1c184a0-5fbb-45a0-b0aa-36932833814c": { + "_id": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "3cb43516-ae69-433a-8787-501d45db14e9", + }, + "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a": { + "_id": "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j00", + "enabled": true, + "entryNodeId": "240d83a3-2268-4ae1-9c20-30b65be6adab", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1e0789eb-3394-4f7d-9db4-f06cb4d71eab": { + "connections": { + "true": "b787efaf-f1a6-433a-8194-85b7c3df9c07", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "240d83a3-2268-4ae1-9c20-30b65be6adab": { + "connections": { + "level only": "2a9c577f-402a-4fba-94f7-ccf7c479553b", + "none": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + "shared and level": "1e0789eb-3394-4f7d-9db4-f06cb4d71eab", + "shared only": "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "2a9c577f-402a-4fba-94f7-ccf7c479553b": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "b787efaf-f1a6-433a-8194-85b7c3df9c07": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "d1c184a0-5fbb-45a0-b0aa-36932833814c": { + "connections": { + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "debug", + "nodeType": "ScriptedDecisionNode", + "x": 1033, + "y": 261.015625, + }, + "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j01": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "7e975947-efba-4a50-97ea-7cbe3fbf7416": { + "_id": "7e975947-efba-4a50-97ea-7cbe3fbf7416", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "aa97f870-d95e-4861-b756-64b6423dd7da": { + "_id": "aa97f870-d95e-4861-b756-64b6423dd7da", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j00", + }, + "b9c26251-9d4d-4499-b8e9-518f35111dbf": { + "_id": "b9c26251-9d4d-4499-b8e9-518f35111dbf", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "ba0ed11d-850f-4b4a-81bc-0d4ad07736df": { + "_id": "ba0ed11d-850f-4b4a-81bc-0d4ad07736df", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787": { + "_id": "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "fa62ae77-1e86-4939-a773-e428259fac97": { + "_id": "fa62ae77-1e86-4939-a773-e428259fac97", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j01", + "enabled": true, + "entryNodeId": "b9c26251-9d4d-4499-b8e9-518f35111dbf", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "7e975947-efba-4a50-97ea-7cbe3fbf7416": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "aa97f870-d95e-4861-b756-64b6423dd7da": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "b9c26251-9d4d-4499-b8e9-518f35111dbf": { + "connections": { + "level only": "7e975947-efba-4a50-97ea-7cbe3fbf7416", + "none": "aa97f870-d95e-4861-b756-64b6423dd7da", + "shared and level": "fa62ae77-1e86-4939-a773-e428259fac97", + "shared only": "ba0ed11d-850f-4b4a-81bc-0d4ad07736df", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "ba0ed11d-850f-4b4a-81bc-0d4ad07736df": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "fa62ae77-1e86-4939-a773-e428259fac97": { + "connections": { + "true": "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j02": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "1fafe9cd-4a2e-42b9-b326-ea1a94325a40": { + "_id": "1fafe9cd-4a2e-42b9-b326-ea1a94325a40", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "33791a7d-d14a-460f-806b-5fc3113a1e13": { + "_id": "33791a7d-d14a-460f-806b-5fc3113a1e13", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "4ee0bb06-5335-403e-810b-72d574247dfe": { + "_id": "4ee0bb06-5335-403e-810b-72d574247dfe", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "5e6d7b3b-e381-4395-ba18-ca807b6adb48": { + "_id": "5e6d7b3b-e381-4395-ba18-ca807b6adb48", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "a679285d-8718-4db3-ba08-e743ab7eb086": { + "_id": "a679285d-8718-4db3-ba08-e743ab7eb086", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "f192e72d-aa85-447b-af66-592a60f0c6c0": { + "_id": "f192e72d-aa85-447b-af66-592a60f0c6c0", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j01", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j02", + "enabled": true, + "entryNodeId": "33791a7d-d14a-460f-806b-5fc3113a1e13", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1fafe9cd-4a2e-42b9-b326-ea1a94325a40": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "33791a7d-d14a-460f-806b-5fc3113a1e13": { + "connections": { + "level only": "4ee0bb06-5335-403e-810b-72d574247dfe", + "none": "f192e72d-aa85-447b-af66-592a60f0c6c0", + "shared and level": "a679285d-8718-4db3-ba08-e743ab7eb086", + "shared only": "1fafe9cd-4a2e-42b9-b326-ea1a94325a40", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "4ee0bb06-5335-403e-810b-72d574247dfe": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "5e6d7b3b-e381-4395-ba18-ca807b6adb48": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "a679285d-8718-4db3-ba08-e743ab7eb086": { + "connections": { + "true": "5e6d7b3b-e381-4395-ba18-ca807b6adb48", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "f192e72d-aa85-447b-af66-592a60f0c6c0": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j03": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "40b880dd-fae5-4618-8a5a-15f096a1bd31": { + "_id": "40b880dd-fae5-4618-8a5a-15f096a1bd31", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad": { + "_id": "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "8fb91c4d-de64-49d8-83dc-7c03b7899613": { + "_id": "8fb91c4d-de64-49d8-83dc-7c03b7899613", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1": { + "_id": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j02", + }, + "da4c931c-ed4e-4451-9e7a-239a66f5bdf6": { + "_id": "da4c931c-ed4e-4451-9e7a-239a66f5bdf6", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "ffc4902e-5d39-4006-85d4-263792cbf12b": { + "_id": "ffc4902e-5d39-4006-85d4-263792cbf12b", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j03", + "enabled": true, + "entryNodeId": "ffc4902e-5d39-4006-85d4-263792cbf12b", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "40b880dd-fae5-4618-8a5a-15f096a1bd31": { + "connections": { + "true": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad": { + "connections": { + "true": "8fb91c4d-de64-49d8-83dc-7c03b7899613", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "8fb91c4d-de64-49d8-83dc-7c03b7899613": { + "connections": { + "true": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "da4c931c-ed4e-4451-9e7a-239a66f5bdf6": { + "connections": { + "true": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "ffc4902e-5d39-4006-85d4-263792cbf12b": { + "connections": { + "level only": "da4c931c-ed4e-4451-9e7a-239a66f5bdf6", + "none": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + "shared and level": "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad", + "shared only": "40b880dd-fae5-4618-8a5a-15f096a1bd31", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j04": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7": { + "_id": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j03", + }, + "31b2f947-d118-4593-9037-47631e4c6362": { + "_id": "31b2f947-d118-4593-9037-47631e4c6362", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "a3a5259d-07be-4ff3-a62d-82da3be53383": { + "_id": "a3a5259d-07be-4ff3-a62d-82da3be53383", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c": { + "_id": "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2": { + "_id": "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b": { + "_id": "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j04", + "enabled": true, + "entryNodeId": "a3a5259d-07be-4ff3-a62d-82da3be53383", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "31b2f947-d118-4593-9037-47631e4c6362": { + "connections": { + "true": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "a3a5259d-07be-4ff3-a62d-82da3be53383": { + "connections": { + "level only": "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c", + "none": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + "shared and level": "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b", + "shared only": "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c": { + "connections": { + "true": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2": { + "connections": { + "true": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b": { + "connections": { + "true": "31b2f947-d118-4593-9037-47631e4c6362", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j05": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "327eb877-019d-4ef6-9b17-a024fea0c71e": { + "_id": "327eb877-019d-4ef6-9b17-a024fea0c71e", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "84d09172-2001-4e49-aad7-d8913fa27ff7": { + "_id": "84d09172-2001-4e49-aad7-d8913fa27ff7", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "95af6abc-623d-4580-bda5-152c19949c96": { + "_id": "95af6abc-623d-4580-bda5-152c19949c96", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "a8f93777-948d-4efd-a76b-c44bc925d84e": { + "_id": "a8f93777-948d-4efd-a76b-c44bc925d84e", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "cb490a79-245e-4876-a1a0-f507ac9c1553": { + "_id": "cb490a79-245e-4876-a1a0-f507ac9c1553", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "cf10428f-0bb6-48c4-9926-96604c43da05": { + "_id": "cf10428f-0bb6-48c4-9926-96604c43da05", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j04", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j05", + "enabled": true, + "entryNodeId": "327eb877-019d-4ef6-9b17-a024fea0c71e", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "327eb877-019d-4ef6-9b17-a024fea0c71e": { + "connections": { + "level only": "cb490a79-245e-4876-a1a0-f507ac9c1553", + "none": "cf10428f-0bb6-48c4-9926-96604c43da05", + "shared and level": "95af6abc-623d-4580-bda5-152c19949c96", + "shared only": "84d09172-2001-4e49-aad7-d8913fa27ff7", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "84d09172-2001-4e49-aad7-d8913fa27ff7": { + "connections": { + "true": "cf10428f-0bb6-48c4-9926-96604c43da05", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "95af6abc-623d-4580-bda5-152c19949c96": { + "connections": { + "true": "a8f93777-948d-4efd-a76b-c44bc925d84e", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "a8f93777-948d-4efd-a76b-c44bc925d84e": { + "connections": { + "true": "cf10428f-0bb6-48c4-9926-96604c43da05", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "cb490a79-245e-4876-a1a0-f507ac9c1553": { + "connections": { + "true": "cf10428f-0bb6-48c4-9926-96604c43da05", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "cf10428f-0bb6-48c4-9926-96604c43da05": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j06": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0": { + "_id": "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "53169a16-1d53-4188-8342-83200849303f": { + "_id": "53169a16-1d53-4188-8342-83200849303f", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "708467b1-f201-40f6-a0ba-33148defec5d": { + "_id": "708467b1-f201-40f6-a0ba-33148defec5d", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j05", + }, + "a70d6f30-ffa8-4c77-851e-2d71fd601fa2": { + "_id": "a70d6f30-ffa8-4c77-851e-2d71fd601fa2", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1": { + "_id": "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "ccabe192-8f7a-4cf2-8a9d-dec9076d910a": { + "_id": "ccabe192-8f7a-4cf2-8a9d-dec9076d910a", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j06", + "enabled": true, + "entryNodeId": "a70d6f30-ffa8-4c77-851e-2d71fd601fa2", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0": { + "connections": { + "true": "708467b1-f201-40f6-a0ba-33148defec5d", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "53169a16-1d53-4188-8342-83200849303f": { + "connections": { + "true": "708467b1-f201-40f6-a0ba-33148defec5d", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "708467b1-f201-40f6-a0ba-33148defec5d": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + "a70d6f30-ffa8-4c77-851e-2d71fd601fa2": { + "connections": { + "level only": "53169a16-1d53-4188-8342-83200849303f", + "none": "708467b1-f201-40f6-a0ba-33148defec5d", + "shared and level": "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1", + "shared only": "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1": { + "connections": { + "true": "ccabe192-8f7a-4cf2-8a9d-dec9076d910a", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "ccabe192-8f7a-4cf2-8a9d-dec9076d910a": { + "connections": { + "true": "708467b1-f201-40f6-a0ba-33148defec5d", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j07": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "0242464d-58bb-46d3-bf41-ec0157ba8720": { + "_id": "0242464d-58bb-46d3-bf41-ec0157ba8720", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "57182fc1-789a-49d0-ba08-3d3f39202daf": { + "_id": "57182fc1-789a-49d0-ba08-3d3f39202daf", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j06", + }, + "85bf5f29-709e-42bb-939e-6c7bc8e710ac": { + "_id": "85bf5f29-709e-42bb-939e-6c7bc8e710ac", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280": { + "_id": "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "af0f2180-6077-42d5-bad6-a238d351e6db": { + "_id": "af0f2180-6077-42d5-bad6-a238d351e6db", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "dad45c04-3d86-4e3a-b5c3-34e89719f705": { + "_id": "dad45c04-3d86-4e3a-b5c3-34e89719f705", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j07", + "enabled": true, + "entryNodeId": "85bf5f29-709e-42bb-939e-6c7bc8e710ac", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "0242464d-58bb-46d3-bf41-ec0157ba8720": { + "connections": { + "true": "57182fc1-789a-49d0-ba08-3d3f39202daf", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "57182fc1-789a-49d0-ba08-3d3f39202daf": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + "85bf5f29-709e-42bb-939e-6c7bc8e710ac": { + "connections": { + "level only": "af0f2180-6077-42d5-bad6-a238d351e6db", + "none": "57182fc1-789a-49d0-ba08-3d3f39202daf", + "shared and level": "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280", + "shared only": "0242464d-58bb-46d3-bf41-ec0157ba8720", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280": { + "connections": { + "true": "dad45c04-3d86-4e3a-b5c3-34e89719f705", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "af0f2180-6077-42d5-bad6-a238d351e6db": { + "connections": { + "true": "57182fc1-789a-49d0-ba08-3d3f39202daf", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "dad45c04-3d86-4e3a-b5c3-34e89719f705": { + "connections": { + "true": "57182fc1-789a-49d0-ba08-3d3f39202daf", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j08": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "1ac726e7-e46d-4521-a65e-00c71951dd5b": { + "_id": "1ac726e7-e46d-4521-a65e-00c71951dd5b", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "875be2ae-0926-43ee-b742-ef75e4235015": { + "_id": "875be2ae-0926-43ee-b742-ef75e4235015", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "b524e828-573e-40c1-aef6-84abfec262c2": { + "_id": "b524e828-573e-40c1-aef6-84abfec262c2", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "b5a9be22-512b-402c-960d-c4c8b1f32cfa": { + "_id": "b5a9be22-512b-402c-960d-c4c8b1f32cfa", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "c9e13651-7c3f-4cd8-8245-c9dd09672069": { + "_id": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j07", + }, + "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2": { + "_id": "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j08", + "enabled": true, + "entryNodeId": "1ac726e7-e46d-4521-a65e-00c71951dd5b", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1ac726e7-e46d-4521-a65e-00c71951dd5b": { + "connections": { + "level only": "875be2ae-0926-43ee-b742-ef75e4235015", + "none": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + "shared and level": "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2", + "shared only": "b524e828-573e-40c1-aef6-84abfec262c2", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "875be2ae-0926-43ee-b742-ef75e4235015": { + "connections": { + "true": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "b524e828-573e-40c1-aef6-84abfec262c2": { + "connections": { + "true": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "b5a9be22-512b-402c-960d-c4c8b1f32cfa": { + "connections": { + "true": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "c9e13651-7c3f-4cd8-8245-c9dd09672069": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2": { + "connections": { + "true": "b5a9be22-512b-402c-960d-c4c8b1f32cfa", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j09": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "06794f50-9356-492c-bd46-2662d68dfc53": { + "_id": "06794f50-9356-492c-bd46-2662d68dfc53", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "4d9ceac3-0de2-48e6-9547-562de6a0b180": { + "_id": "4d9ceac3-0de2-48e6-9547-562de6a0b180", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "553fd963-ba44-409c-a9fb-36f8cc5ca6b8": { + "_id": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j08", + }, + "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde": { + "_id": "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058": { + "_id": "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "e3303783-9734-42ec-88c5-a7a627427059": { + "_id": "e3303783-9734-42ec-88c5-a7a627427059", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j09", + "enabled": true, + "entryNodeId": "06794f50-9356-492c-bd46-2662d68dfc53", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "06794f50-9356-492c-bd46-2662d68dfc53": { + "connections": { + "level only": "e3303783-9734-42ec-88c5-a7a627427059", + "none": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + "shared and level": "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde", + "shared only": "4d9ceac3-0de2-48e6-9547-562de6a0b180", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "4d9ceac3-0de2-48e6-9547-562de6a0b180": { + "connections": { + "true": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "553fd963-ba44-409c-a9fb-36f8cc5ca6b8": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde": { + "connections": { + "true": "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058": { + "connections": { + "true": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "e3303783-9734-42ec-88c5-a7a627427059": { + "connections": { + "true": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j10": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "09e1d1e6-b388-448c-b5a6-00db52f826e7": { + "_id": "09e1d1e6-b388-448c-b5a6-00db52f826e7", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "36cb348f-3b91-443b-a2ba-2e23c6446f49": { + "_id": "36cb348f-3b91-443b-a2ba-2e23c6446f49", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2": { + "_id": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j09", + }, + "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead": { + "_id": "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "aa5aebcf-131b-44f9-b596-f0805e1f4305": { + "_id": "aa5aebcf-131b-44f9-b596-f0805e1f4305", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "ccc8e0e1-86fc-4515-bc02-a3e11b07b933": { + "_id": "ccc8e0e1-86fc-4515-bc02-a3e11b07b933", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j10", + "enabled": true, + "entryNodeId": "ccc8e0e1-86fc-4515-bc02-a3e11b07b933", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "09e1d1e6-b388-448c-b5a6-00db52f826e7": { + "connections": { + "true": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "36cb348f-3b91-443b-a2ba-2e23c6446f49": { + "connections": { + "true": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead": { + "connections": { + "true": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "aa5aebcf-131b-44f9-b596-f0805e1f4305": { + "connections": { + "true": "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "ccc8e0e1-86fc-4515-bc02-a3e11b07b933": { + "connections": { + "level only": "09e1d1e6-b388-448c-b5a6-00db52f826e7", + "none": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + "shared and level": "aa5aebcf-131b-44f9-b596-f0805e1f4305", + "shared only": "36cb348f-3b91-443b-a2ba-2e23c6446f49", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export -a": should export all journeys to a single file 1`] = `""`; + +exports[`frodo journey export "frodo journey export -a": should export all journeys to a single file: ./allAlphaJourneys.journey.json 1`] = ` +{ + "meta": Any, + "trees": { + "j00": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "1e0789eb-3394-4f7d-9db4-f06cb4d71eab": { + "_id": "1e0789eb-3394-4f7d-9db4-f06cb4d71eab", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "240d83a3-2268-4ae1-9c20-30b65be6adab": { + "_id": "240d83a3-2268-4ae1-9c20-30b65be6adab", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "2a9c577f-402a-4fba-94f7-ccf7c479553b": { + "_id": "2a9c577f-402a-4fba-94f7-ccf7c479553b", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "b787efaf-f1a6-433a-8194-85b7c3df9c07": { + "_id": "b787efaf-f1a6-433a-8194-85b7c3df9c07", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "d1c184a0-5fbb-45a0-b0aa-36932833814c": { + "_id": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "3cb43516-ae69-433a-8787-501d45db14e9", + }, + "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a": { + "_id": "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "3cb43516-ae69-433a-8787-501d45db14e9": { + "_id": "3cb43516-ae69-433a-8787-501d45db14e9", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Display sharedState, transientState, and headers.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "debug", + "script": ""/* debug\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Display sharedState, transientState, and headers.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - true\\n */\\nvar anchor = \\"anchor-\\".concat(generateNumericToken('xxx'));\\nvar halign = \\"left\\";\\nvar message = \\"

Shared State:
\\".concat(\\n sharedState.toString()).concat(\\"

\\").concat(\\n \\"

Transient State:
\\").concat(\\n transientState.toString()).concat(\\"

\\").concat(\\n \\"

Request Headers:
\\").concat(\\n requestHeaders.toString()).concat(\\"

\\")\\nvar script = \\"Array.prototype.slice.call(\\\\n\\".concat(\\n \\"document.getElementsByClassName('callback-component')).forEach(\\\\n\\").concat(\\n \\"function (e) {\\\\n\\").concat(\\n \\" var message = e.firstElementChild;\\\\n\\").concat(\\n \\" if (message.firstChild && message.firstChild.nodeName == '#text' && message.firstChild.nodeValue.trim() == '\\").concat(anchor).concat(\\"') {\\\\n\\").concat(\\n \\" message.className = \\\\\\"text-left\\\\\\";\\\\n\\").concat(\\n \\" message.align = \\\\\\"\\").concat(halign).concat(\\"\\\\\\";\\\\n\\").concat(\\n \\" message.innerHTML = '\\").concat(message).concat(\\"';\\\\n\\").concat(\\n \\" }\\\\n\\").concat(\\n \\"})\\")\\nvar fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.TextOutputCallback,\\n com.sun.identity.authentication.callbacks.ScriptTextOutputCallback\\n)\\nif (message.length && callbacks.isEmpty()) {\\n action = fr.Action.send(\\n new fr.TextOutputCallback(\\n fr.TextOutputCallback.INFORMATION,\\n anchor\\n ),\\n new fr.ScriptTextOutputCallback(script)\\n ).build()\\n}\\nelse {\\n action = fr.Action.goTo(\\"true\\").build();\\n}\\n\\n /*\\n * Generate a token in the desired format. All 'x' characters will be replaced with a random number 0-9.\\n * \\n * Example:\\n * 'xxxxx' produces '28535'\\n * 'xxx-xxx' produces '432-521'\\n */\\nfunction generateNumericToken(format) {\\n return format.replace(/[x]/g, function(c) {\\n var r = Math.random()*10|0;\\n var v = r;\\n return v.toString(10);\\n });\\n}"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j00", + "enabled": true, + "entryNodeId": "240d83a3-2268-4ae1-9c20-30b65be6adab", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1e0789eb-3394-4f7d-9db4-f06cb4d71eab": { + "connections": { + "true": "b787efaf-f1a6-433a-8194-85b7c3df9c07", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "240d83a3-2268-4ae1-9c20-30b65be6adab": { + "connections": { + "level only": "2a9c577f-402a-4fba-94f7-ccf7c479553b", + "none": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + "shared and level": "1e0789eb-3394-4f7d-9db4-f06cb4d71eab", + "shared only": "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "2a9c577f-402a-4fba-94f7-ccf7c479553b": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "b787efaf-f1a6-433a-8194-85b7c3df9c07": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "d1c184a0-5fbb-45a0-b0aa-36932833814c": { + "connections": { + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "debug", + "nodeType": "ScriptedDecisionNode", + "x": 1033, + "y": 261.015625, + }, + "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j01": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "7e975947-efba-4a50-97ea-7cbe3fbf7416": { + "_id": "7e975947-efba-4a50-97ea-7cbe3fbf7416", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "aa97f870-d95e-4861-b756-64b6423dd7da": { + "_id": "aa97f870-d95e-4861-b756-64b6423dd7da", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j00", + }, + "b9c26251-9d4d-4499-b8e9-518f35111dbf": { + "_id": "b9c26251-9d4d-4499-b8e9-518f35111dbf", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "ba0ed11d-850f-4b4a-81bc-0d4ad07736df": { + "_id": "ba0ed11d-850f-4b4a-81bc-0d4ad07736df", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787": { + "_id": "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "fa62ae77-1e86-4939-a773-e428259fac97": { + "_id": "fa62ae77-1e86-4939-a773-e428259fac97", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j01", + "enabled": true, + "entryNodeId": "b9c26251-9d4d-4499-b8e9-518f35111dbf", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "7e975947-efba-4a50-97ea-7cbe3fbf7416": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "aa97f870-d95e-4861-b756-64b6423dd7da": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "b9c26251-9d4d-4499-b8e9-518f35111dbf": { + "connections": { + "level only": "7e975947-efba-4a50-97ea-7cbe3fbf7416", + "none": "aa97f870-d95e-4861-b756-64b6423dd7da", + "shared and level": "fa62ae77-1e86-4939-a773-e428259fac97", + "shared only": "ba0ed11d-850f-4b4a-81bc-0d4ad07736df", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "ba0ed11d-850f-4b4a-81bc-0d4ad07736df": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "fa62ae77-1e86-4939-a773-e428259fac97": { + "connections": { + "true": "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j02": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "1fafe9cd-4a2e-42b9-b326-ea1a94325a40": { + "_id": "1fafe9cd-4a2e-42b9-b326-ea1a94325a40", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "33791a7d-d14a-460f-806b-5fc3113a1e13": { + "_id": "33791a7d-d14a-460f-806b-5fc3113a1e13", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "4ee0bb06-5335-403e-810b-72d574247dfe": { + "_id": "4ee0bb06-5335-403e-810b-72d574247dfe", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "5e6d7b3b-e381-4395-ba18-ca807b6adb48": { + "_id": "5e6d7b3b-e381-4395-ba18-ca807b6adb48", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "a679285d-8718-4db3-ba08-e743ab7eb086": { + "_id": "a679285d-8718-4db3-ba08-e743ab7eb086", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "f192e72d-aa85-447b-af66-592a60f0c6c0": { + "_id": "f192e72d-aa85-447b-af66-592a60f0c6c0", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j01", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j02", + "enabled": true, + "entryNodeId": "33791a7d-d14a-460f-806b-5fc3113a1e13", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1fafe9cd-4a2e-42b9-b326-ea1a94325a40": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "33791a7d-d14a-460f-806b-5fc3113a1e13": { + "connections": { + "level only": "4ee0bb06-5335-403e-810b-72d574247dfe", + "none": "f192e72d-aa85-447b-af66-592a60f0c6c0", + "shared and level": "a679285d-8718-4db3-ba08-e743ab7eb086", + "shared only": "1fafe9cd-4a2e-42b9-b326-ea1a94325a40", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "4ee0bb06-5335-403e-810b-72d574247dfe": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "5e6d7b3b-e381-4395-ba18-ca807b6adb48": { + "connections": { + "true": "f192e72d-aa85-447b-af66-592a60f0c6c0", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "a679285d-8718-4db3-ba08-e743ab7eb086": { + "connections": { + "true": "5e6d7b3b-e381-4395-ba18-ca807b6adb48", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "f192e72d-aa85-447b-af66-592a60f0c6c0": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j03": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "40b880dd-fae5-4618-8a5a-15f096a1bd31": { + "_id": "40b880dd-fae5-4618-8a5a-15f096a1bd31", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad": { + "_id": "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "8fb91c4d-de64-49d8-83dc-7c03b7899613": { + "_id": "8fb91c4d-de64-49d8-83dc-7c03b7899613", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1": { + "_id": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j02", + }, + "da4c931c-ed4e-4451-9e7a-239a66f5bdf6": { + "_id": "da4c931c-ed4e-4451-9e7a-239a66f5bdf6", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "ffc4902e-5d39-4006-85d4-263792cbf12b": { + "_id": "ffc4902e-5d39-4006-85d4-263792cbf12b", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j03", + "enabled": true, + "entryNodeId": "ffc4902e-5d39-4006-85d4-263792cbf12b", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "40b880dd-fae5-4618-8a5a-15f096a1bd31": { + "connections": { + "true": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad": { + "connections": { + "true": "8fb91c4d-de64-49d8-83dc-7c03b7899613", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "8fb91c4d-de64-49d8-83dc-7c03b7899613": { + "connections": { + "true": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "da4c931c-ed4e-4451-9e7a-239a66f5bdf6": { + "connections": { + "true": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "ffc4902e-5d39-4006-85d4-263792cbf12b": { + "connections": { + "level only": "da4c931c-ed4e-4451-9e7a-239a66f5bdf6", + "none": "da18dc78-fbb4-488c-bcc0-dfec4d6f9ee1", + "shared and level": "789a5583-b8eb-4d0a-92ae-ac0a83e7e2ad", + "shared only": "40b880dd-fae5-4618-8a5a-15f096a1bd31", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j04": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7": { + "_id": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j03", + }, + "31b2f947-d118-4593-9037-47631e4c6362": { + "_id": "31b2f947-d118-4593-9037-47631e4c6362", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "a3a5259d-07be-4ff3-a62d-82da3be53383": { + "_id": "a3a5259d-07be-4ff3-a62d-82da3be53383", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c": { + "_id": "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2": { + "_id": "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b": { + "_id": "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j04", + "enabled": true, + "entryNodeId": "a3a5259d-07be-4ff3-a62d-82da3be53383", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "31b2f947-d118-4593-9037-47631e4c6362": { + "connections": { + "true": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "a3a5259d-07be-4ff3-a62d-82da3be53383": { + "connections": { + "level only": "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c", + "none": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + "shared and level": "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b", + "shared only": "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "a5cf5d6f-4a80-4d3f-86da-b1a0f32a167c": { + "connections": { + "true": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "a899b13d-1bd0-4b52-b06b-68f6f6a3ded2": { + "connections": { + "true": "1ab9abc3-5b0f-4eff-bbdd-4cb03eed55d7", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "f2728a6b-f6c3-4b17-a967-a8dd9d7af81b": { + "connections": { + "true": "31b2f947-d118-4593-9037-47631e4c6362", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j05": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "327eb877-019d-4ef6-9b17-a024fea0c71e": { + "_id": "327eb877-019d-4ef6-9b17-a024fea0c71e", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "84d09172-2001-4e49-aad7-d8913fa27ff7": { + "_id": "84d09172-2001-4e49-aad7-d8913fa27ff7", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "95af6abc-623d-4580-bda5-152c19949c96": { + "_id": "95af6abc-623d-4580-bda5-152c19949c96", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "a8f93777-948d-4efd-a76b-c44bc925d84e": { + "_id": "a8f93777-948d-4efd-a76b-c44bc925d84e", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "cb490a79-245e-4876-a1a0-f507ac9c1553": { + "_id": "cb490a79-245e-4876-a1a0-f507ac9c1553", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "cf10428f-0bb6-48c4-9926-96604c43da05": { + "_id": "cf10428f-0bb6-48c4-9926-96604c43da05", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j04", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j05", + "enabled": true, + "entryNodeId": "327eb877-019d-4ef6-9b17-a024fea0c71e", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "327eb877-019d-4ef6-9b17-a024fea0c71e": { + "connections": { + "level only": "cb490a79-245e-4876-a1a0-f507ac9c1553", + "none": "cf10428f-0bb6-48c4-9926-96604c43da05", + "shared and level": "95af6abc-623d-4580-bda5-152c19949c96", + "shared only": "84d09172-2001-4e49-aad7-d8913fa27ff7", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "84d09172-2001-4e49-aad7-d8913fa27ff7": { + "connections": { + "true": "cf10428f-0bb6-48c4-9926-96604c43da05", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "95af6abc-623d-4580-bda5-152c19949c96": { + "connections": { + "true": "a8f93777-948d-4efd-a76b-c44bc925d84e", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "a8f93777-948d-4efd-a76b-c44bc925d84e": { + "connections": { + "true": "cf10428f-0bb6-48c4-9926-96604c43da05", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "cb490a79-245e-4876-a1a0-f507ac9c1553": { + "connections": { + "true": "cf10428f-0bb6-48c4-9926-96604c43da05", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "cf10428f-0bb6-48c4-9926-96604c43da05": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j06": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0": { + "_id": "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "53169a16-1d53-4188-8342-83200849303f": { + "_id": "53169a16-1d53-4188-8342-83200849303f", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "708467b1-f201-40f6-a0ba-33148defec5d": { + "_id": "708467b1-f201-40f6-a0ba-33148defec5d", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j05", + }, + "a70d6f30-ffa8-4c77-851e-2d71fd601fa2": { + "_id": "a70d6f30-ffa8-4c77-851e-2d71fd601fa2", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1": { + "_id": "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "ccabe192-8f7a-4cf2-8a9d-dec9076d910a": { + "_id": "ccabe192-8f7a-4cf2-8a9d-dec9076d910a", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j06", + "enabled": true, + "entryNodeId": "a70d6f30-ffa8-4c77-851e-2d71fd601fa2", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0": { + "connections": { + "true": "708467b1-f201-40f6-a0ba-33148defec5d", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "53169a16-1d53-4188-8342-83200849303f": { + "connections": { + "true": "708467b1-f201-40f6-a0ba-33148defec5d", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "708467b1-f201-40f6-a0ba-33148defec5d": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + "a70d6f30-ffa8-4c77-851e-2d71fd601fa2": { + "connections": { + "level only": "53169a16-1d53-4188-8342-83200849303f", + "none": "708467b1-f201-40f6-a0ba-33148defec5d", + "shared and level": "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1", + "shared only": "049f1e8b-2d7b-40e5-8bb9-4bf373e515c0", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "c9f349aa-17da-4e3a-80d5-8d28c4fd86b1": { + "connections": { + "true": "ccabe192-8f7a-4cf2-8a9d-dec9076d910a", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "ccabe192-8f7a-4cf2-8a9d-dec9076d910a": { + "connections": { + "true": "708467b1-f201-40f6-a0ba-33148defec5d", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j07": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "0242464d-58bb-46d3-bf41-ec0157ba8720": { + "_id": "0242464d-58bb-46d3-bf41-ec0157ba8720", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "57182fc1-789a-49d0-ba08-3d3f39202daf": { + "_id": "57182fc1-789a-49d0-ba08-3d3f39202daf", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j06", + }, + "85bf5f29-709e-42bb-939e-6c7bc8e710ac": { + "_id": "85bf5f29-709e-42bb-939e-6c7bc8e710ac", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280": { + "_id": "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "af0f2180-6077-42d5-bad6-a238d351e6db": { + "_id": "af0f2180-6077-42d5-bad6-a238d351e6db", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "dad45c04-3d86-4e3a-b5c3-34e89719f705": { + "_id": "dad45c04-3d86-4e3a-b5c3-34e89719f705", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j07", + "enabled": true, + "entryNodeId": "85bf5f29-709e-42bb-939e-6c7bc8e710ac", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "0242464d-58bb-46d3-bf41-ec0157ba8720": { + "connections": { + "true": "57182fc1-789a-49d0-ba08-3d3f39202daf", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "57182fc1-789a-49d0-ba08-3d3f39202daf": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + "85bf5f29-709e-42bb-939e-6c7bc8e710ac": { + "connections": { + "level only": "af0f2180-6077-42d5-bad6-a238d351e6db", + "none": "57182fc1-789a-49d0-ba08-3d3f39202daf", + "shared and level": "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280", + "shared only": "0242464d-58bb-46d3-bf41-ec0157ba8720", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "9b48d3b0-36fd-47ca-8ef0-26a6b00e9280": { + "connections": { + "true": "dad45c04-3d86-4e3a-b5c3-34e89719f705", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "af0f2180-6077-42d5-bad6-a238d351e6db": { + "connections": { + "true": "57182fc1-789a-49d0-ba08-3d3f39202daf", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "dad45c04-3d86-4e3a-b5c3-34e89719f705": { + "connections": { + "true": "57182fc1-789a-49d0-ba08-3d3f39202daf", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j08": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "1ac726e7-e46d-4521-a65e-00c71951dd5b": { + "_id": "1ac726e7-e46d-4521-a65e-00c71951dd5b", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "875be2ae-0926-43ee-b742-ef75e4235015": { + "_id": "875be2ae-0926-43ee-b742-ef75e4235015", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "b524e828-573e-40c1-aef6-84abfec262c2": { + "_id": "b524e828-573e-40c1-aef6-84abfec262c2", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "b5a9be22-512b-402c-960d-c4c8b1f32cfa": { + "_id": "b5a9be22-512b-402c-960d-c4c8b1f32cfa", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "c9e13651-7c3f-4cd8-8245-c9dd09672069": { + "_id": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j07", + }, + "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2": { + "_id": "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j08", + "enabled": true, + "entryNodeId": "1ac726e7-e46d-4521-a65e-00c71951dd5b", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1ac726e7-e46d-4521-a65e-00c71951dd5b": { + "connections": { + "level only": "875be2ae-0926-43ee-b742-ef75e4235015", + "none": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + "shared and level": "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2", + "shared only": "b524e828-573e-40c1-aef6-84abfec262c2", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "875be2ae-0926-43ee-b742-ef75e4235015": { + "connections": { + "true": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "b524e828-573e-40c1-aef6-84abfec262c2": { + "connections": { + "true": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "b5a9be22-512b-402c-960d-c4c8b1f32cfa": { + "connections": { + "true": "c9e13651-7c3f-4cd8-8245-c9dd09672069", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "c9e13651-7c3f-4cd8-8245-c9dd09672069": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 232.015625, + }, + "f9802f38-14cd-4a2e-a7a1-2e6c4d0fb6e2": { + "connections": { + "true": "b5a9be22-512b-402c-960d-c4c8b1f32cfa", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j09": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "06794f50-9356-492c-bd46-2662d68dfc53": { + "_id": "06794f50-9356-492c-bd46-2662d68dfc53", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "4d9ceac3-0de2-48e6-9547-562de6a0b180": { + "_id": "4d9ceac3-0de2-48e6-9547-562de6a0b180", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "553fd963-ba44-409c-a9fb-36f8cc5ca6b8": { + "_id": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j08", + }, + "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde": { + "_id": "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058": { + "_id": "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "e3303783-9734-42ec-88c5-a7a627427059": { + "_id": "e3303783-9734-42ec-88c5-a7a627427059", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j09", + "enabled": true, + "entryNodeId": "06794f50-9356-492c-bd46-2662d68dfc53", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "06794f50-9356-492c-bd46-2662d68dfc53": { + "connections": { + "level only": "e3303783-9734-42ec-88c5-a7a627427059", + "none": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + "shared and level": "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde", + "shared only": "4d9ceac3-0de2-48e6-9547-562de6a0b180", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "4d9ceac3-0de2-48e6-9547-562de6a0b180": { + "connections": { + "true": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "553fd963-ba44-409c-a9fb-36f8cc5ca6b8": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "61ea0d1e-2ec3-47ba-8c9c-319a60a9cbde": { + "connections": { + "true": "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "aad50ee1-c4dd-4bb7-a403-bb6f60dbf058": { + "connections": { + "true": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "e3303783-9734-42ec-88c5-a7a627427059": { + "connections": { + "true": "553fd963-ba44-409c-a9fb-36f8cc5ca6b8", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + "j10": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "09e1d1e6-b388-448c-b5a6-00db52f826e7": { + "_id": "09e1d1e6-b388-448c-b5a6-00db52f826e7", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "36cb348f-3b91-443b-a2ba-2e23c6446f49": { + "_id": "36cb348f-3b91-443b-a2ba-2e23c6446f49", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2": { + "_id": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j09", + }, + "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead": { + "_id": "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "aa5aebcf-131b-44f9-b596-f0805e1f4305": { + "_id": "aa5aebcf-131b-44f9-b596-f0805e1f4305", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "ccc8e0e1-86fc-4515-bc02-a3e11b07b933": { + "_id": "ccc8e0e1-86fc-4515-bc02-a3e11b07b933", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j10", + "enabled": true, + "entryNodeId": "ccc8e0e1-86fc-4515-bc02-a3e11b07b933", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "09e1d1e6-b388-448c-b5a6-00db52f826e7": { + "connections": { + "true": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "36cb348f-3b91-443b-a2ba-2e23c6446f49": { + "connections": { + "true": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead": { + "connections": { + "true": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "aa5aebcf-131b-44f9-b596-f0805e1f4305": { + "connections": { + "true": "64c4e3ef-5cf3-4c6d-a3c1-367430b65ead", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "ccc8e0e1-86fc-4515-bc02-a3e11b07b933": { + "connections": { + "level only": "09e1d1e6-b388-448c-b5a6-00db52f826e7", + "none": "53eaf2b6-6a93-4cf7-b8b9-788155d12ff2", + "shared and level": "aa5aebcf-131b-44f9-b596-f0805e1f4305", + "shared only": "36cb348f-3b91-443b-a2ba-2e23c6446f49", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export -i j00": should export the journey with journey id "j00" 1`] = `""`; + +exports[`frodo journey export "frodo journey export -i j00": should export the journey with journey id "j00": ./j00.journey.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "1e0789eb-3394-4f7d-9db4-f06cb4d71eab": { + "_id": "1e0789eb-3394-4f7d-9db4-f06cb4d71eab", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "240d83a3-2268-4ae1-9c20-30b65be6adab": { + "_id": "240d83a3-2268-4ae1-9c20-30b65be6adab", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "2a9c577f-402a-4fba-94f7-ccf7c479553b": { + "_id": "2a9c577f-402a-4fba-94f7-ccf7c479553b", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "b787efaf-f1a6-433a-8194-85b7c3df9c07": { + "_id": "b787efaf-f1a6-433a-8194-85b7c3df9c07", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "d1c184a0-5fbb-45a0-b0aa-36932833814c": { + "_id": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "3cb43516-ae69-433a-8787-501d45db14e9", + }, + "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a": { + "_id": "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "3cb43516-ae69-433a-8787-501d45db14e9": { + "_id": "3cb43516-ae69-433a-8787-501d45db14e9", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Display sharedState, transientState, and headers.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "debug", + "script": ""/* debug\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Display sharedState, transientState, and headers.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - true\\n */\\nvar anchor = \\"anchor-\\".concat(generateNumericToken('xxx'));\\nvar halign = \\"left\\";\\nvar message = \\"

Shared State:
\\".concat(\\n sharedState.toString()).concat(\\"

\\").concat(\\n \\"

Transient State:
\\").concat(\\n transientState.toString()).concat(\\"

\\").concat(\\n \\"

Request Headers:
\\").concat(\\n requestHeaders.toString()).concat(\\"

\\")\\nvar script = \\"Array.prototype.slice.call(\\\\n\\".concat(\\n \\"document.getElementsByClassName('callback-component')).forEach(\\\\n\\").concat(\\n \\"function (e) {\\\\n\\").concat(\\n \\" var message = e.firstElementChild;\\\\n\\").concat(\\n \\" if (message.firstChild && message.firstChild.nodeName == '#text' && message.firstChild.nodeValue.trim() == '\\").concat(anchor).concat(\\"') {\\\\n\\").concat(\\n \\" message.className = \\\\\\"text-left\\\\\\";\\\\n\\").concat(\\n \\" message.align = \\\\\\"\\").concat(halign).concat(\\"\\\\\\";\\\\n\\").concat(\\n \\" message.innerHTML = '\\").concat(message).concat(\\"';\\\\n\\").concat(\\n \\" }\\\\n\\").concat(\\n \\"})\\")\\nvar fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.TextOutputCallback,\\n com.sun.identity.authentication.callbacks.ScriptTextOutputCallback\\n)\\nif (message.length && callbacks.isEmpty()) {\\n action = fr.Action.send(\\n new fr.TextOutputCallback(\\n fr.TextOutputCallback.INFORMATION,\\n anchor\\n ),\\n new fr.ScriptTextOutputCallback(script)\\n ).build()\\n}\\nelse {\\n action = fr.Action.goTo(\\"true\\").build();\\n}\\n\\n /*\\n * Generate a token in the desired format. All 'x' characters will be replaced with a random number 0-9.\\n * \\n * Example:\\n * 'xxxxx' produces '28535'\\n * 'xxx-xxx' produces '432-521'\\n */\\nfunction generateNumericToken(format) {\\n return format.replace(/[x]/g, function(c) {\\n var r = Math.random()*10|0;\\n var v = r;\\n return v.toString(10);\\n });\\n}"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j00", + "enabled": true, + "entryNodeId": "240d83a3-2268-4ae1-9c20-30b65be6adab", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "1e0789eb-3394-4f7d-9db4-f06cb4d71eab": { + "connections": { + "true": "b787efaf-f1a6-433a-8194-85b7c3df9c07", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + "240d83a3-2268-4ae1-9c20-30b65be6adab": { + "connections": { + "level only": "2a9c577f-402a-4fba-94f7-ccf7c479553b", + "none": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + "shared and level": "1e0789eb-3394-4f7d-9db4-f06cb4d71eab", + "shared only": "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "2a9c577f-402a-4fba-94f7-ccf7c479553b": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "b787efaf-f1a6-433a-8194-85b7c3df9c07": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "d1c184a0-5fbb-45a0-b0aa-36932833814c": { + "connections": { + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "debug", + "nodeType": "ScriptedDecisionNode", + "x": 1033, + "y": 261.015625, + }, + "d481e647-675e-4d0e-9bd3-dd4d41b7fc2a": { + "connections": { + "true": "d1c184a0-5fbb-45a0-b0aa-36932833814c", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; + +exports[`frodo journey export "frodo journey export -i j01 -f my-j01.json": should export the journey with journey id "j01" into file named my-j01.json 1`] = `""`; + +exports[`frodo journey export "frodo journey export -i j01 -f my-j01.json": should export the journey with journey id "j01" into file named my-j01.json: ./my-j01.json 1`] = ` +{ + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "meta": Any, + "nodes": { + "7e975947-efba-4a50-97ea-7cbe3fbf7416": { + "_id": "7e975947-efba-4a50-97ea-7cbe3fbf7416", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "aa97f870-d95e-4861-b756-64b6423dd7da": { + "_id": "aa97f870-d95e-4861-b756-64b6423dd7da", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j00", + }, + "b9c26251-9d4d-4499-b8e9-518f35111dbf": { + "_id": "b9c26251-9d4d-4499-b8e9-518f35111dbf", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "ba0ed11d-850f-4b4a-81bc-0d4ad07736df": { + "_id": "ba0ed11d-850f-4b4a-81bc-0d4ad07736df", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787": { + "_id": "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "fa62ae77-1e86-4939-a773-e428259fac97": { + "_id": "fa62ae77-1e86-4939-a773-e428259fac97", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": { + "1b52a7e0-4019-40fa-958a-15a49870e901": { + "_id": "1b52a7e0-4019-40fa-958a-15a49870e901", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set the same shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "shared", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('sharedValue', 'Level ' + level + ': This is a longer string value shared across all nested journeys. It contains an indicator in which level it was last set.');\\n}());"", + }, + "41c24257-d7fc-4654-8b46-c2666dc5b56d": { + "_id": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "set per level shared state variable", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "level", + "script": ""(function () {\\n outcome = 'true';\\n var level = nodeState.get('level').asInteger();\\n sharedState.put('level' + level + 'Value', 'Level ' + level + ': This is a longer string value set at each level of the nested journeys. It contains an indicator in which level it was set.');\\n}());"", + }, + "5bbdaeff-ddee-44b9-b608-8d413d7d65a6": { + "_id": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if mode has already been set.", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "mode", + "script": ""/* mode\\n *\\n * Author: volker.scheuber@forgerock.com\\n * \\n * Collect mode if not already set and set outcome to mode.\\n * \\n * This script does not need to be parametrized. It will work properly as is.\\n * \\n * The Scripted Decision Node needs the following outcomes defined:\\n * - 'shared and level'\\n * - 'shared only'\\n * - 'level only'\\n * - 'none'\\n */\\n(function () {\\n var mode = nodeState.get('mode');\\n if (mode) {\\n outcome = mode.asString();\\n var level = nodeState.get('level').asInteger() + 1;\\n logger.error('mode: mode=' + mode.asString() + ', level=' + level);\\n sharedState.put('level', level);\\n }\\n else {\\n var choices = ['shared and level', 'shared only', 'level only', 'none'];\\n \\n var fr = JavaImporter(\\n org.forgerock.openam.auth.node.api.Action,\\n javax.security.auth.callback.ChoiceCallback\\n )\\n\\n if (callbacks.isEmpty()) {\\n action = fr.Action.send([\\n new fr.ChoiceCallback('Choose test mode', choices, 0, false)\\n ]).build();\\n } else {\\n var choice = parseInt(callbacks.get(0).getSelectedIndexes()[0]);\\n nodeState.putShared('mode', choices[choice]);\\n nodeState.putShared('level', 0);\\n action = fr.Action.goTo(choices[choice]).build();\\n }\\n }\\n}());"", + }, + }, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j01", + "enabled": true, + "entryNodeId": "b9c26251-9d4d-4499-b8e9-518f35111dbf", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "nodes": { + "7e975947-efba-4a50-97ea-7cbe3fbf7416": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 395, + "y": 345.015625, + }, + "aa97f870-d95e-4861-b756-64b6423dd7da": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + "x": 816, + "y": 233.015625, + }, + "b9c26251-9d4d-4499-b8e9-518f35111dbf": { + "connections": { + "level only": "7e975947-efba-4a50-97ea-7cbe3fbf7416", + "none": "aa97f870-d95e-4861-b756-64b6423dd7da", + "shared and level": "fa62ae77-1e86-4939-a773-e428259fac97", + "shared only": "ba0ed11d-850f-4b4a-81bc-0d4ad07736df", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + "x": 167, + "y": 210.015625, + }, + "ba0ed11d-850f-4b4a-81bc-0d4ad07736df": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 393, + "y": 259.015625, + }, + "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787": { + "connections": { + "true": "aa97f870-d95e-4861-b756-64b6423dd7da", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + "x": 598, + "y": 173.015625, + }, + "fa62ae77-1e86-4939-a773-e428259fac97": { + "connections": { + "true": "d2c7ef78-6b25-40d6-b58e-6ddca3c1f787", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + "x": 392, + "y": 173.015625, + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": { + "x": 1236, + "y": 145, + }, + "e301438c-0bd0-429c-ab0c-66126501069a": { + "x": 1236, + "y": 253, + }, + "startNode": { + "x": 50, + "y": 250, + }, + }, + "uiConfig": { + "categories": "[]", + }, + }, +} +`; diff --git a/test/e2e/journey-export.e2e.test.js b/test/e2e/journey-export.e2e.test.js new file mode 100644 index 000000000..2562a9907 --- /dev/null +++ b/test/e2e/journey-export.e2e.test.js @@ -0,0 +1,128 @@ +/** + * Follow this process to write e2e tests for the CLI project: + * + * 1. Test if all the necessary mocks for your tests already exist. + * In mock mode, run the command you want to test with the same arguments + * and parameters exactly as you want to test it, for example: + * + * $ FRODO_MOCK=1 frodo conn save https://openam-frodo-dev.forgeblocks.com/am volker.scheuber@forgerock.com Sup3rS3cr3t! + * + * If your command completes without errors and with the expected results, + * all the required mocks already exist and you are good to write your + * test and skip to step #4. + * + * If, however, your command fails and you see errors like the one below, + * you know you need to record the mock responses first: + * + * [Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`. + * + * 2. Record mock responses for your exact command. + * In mock record mode, run the command you want to test with the same arguments + * and parameters exactly as you want to test it, for example: + * + * $ FRODO_MOCK=record frodo conn save https://openam-frodo-dev.forgeblocks.com/am volker.scheuber@forgerock.com Sup3rS3cr3t! + * + * Wait until you see all the Polly instances (mock recording adapters) have + * shutdown before you try to run step #1 again. + * Messages like these indicate mock recording adapters shutting down: + * + * Polly instance 'conn/4' stopping in 3s... + * Polly instance 'conn/4' stopping in 2s... + * Polly instance 'conn/save/3' stopping in 3s... + * Polly instance 'conn/4' stopping in 1s... + * Polly instance 'conn/save/3' stopping in 2s... + * Polly instance 'conn/4' stopped. + * Polly instance 'conn/save/3' stopping in 1s... + * Polly instance 'conn/save/3' stopped. + * + * 3. Validate your freshly recorded mock responses are complete and working. + * Re-run the exact command you want to test in mock mode (see step #1). + * + * 4. Write your test. + * Make sure to use the exact command including number of arguments and params. + * + * 5. Commit both your test and your new recordings to the repository. + * Your tests are likely going to reside outside the frodo-lib project but + * the recordings must be committed to the frodo-lib project. + */ + +/* +FRODO_MOCK=record FRODO_HOST=https://openam-frodo-dev.forgeblocks.com/am frodo journey export -i j00 +FRODO_MOCK=record FRODO_HOST=https://openam-frodo-dev.forgeblocks.com/am frodo journey export -i j01 -f my-j01.json +FRODO_MOCK=record FRODO_HOST=https://openam-frodo-dev.forgeblocks.com/am frodo journey export --journey-id j02 --no-deps --use-string-arrays -D journeyTestDirectory1 +FRODO_MOCK=record FRODO_HOST=https://openam-frodo-dev.forgeblocks.com/am frodo journey export -a +FRODO_MOCK=record FRODO_HOST=https://openam-frodo-dev.forgeblocks.com/am frodo journey export --all --file my-allAlphaJourneys.journey.json +FRODO_MOCK=record FRODO_HOST=https://openam-frodo-dev.forgeblocks.com/am frodo journey export -a --no-deps --use-string-arrays --directory journeyTestDirectory2 +FRODO_MOCK=record FRODO_HOST=https://openam-frodo-dev.forgeblocks.com/am frodo journey export --all-separate --no-deps --use-string-arrays +FRODO_MOCK=record FRODO_HOST=https://openam-frodo-dev.forgeblocks.com/am frodo journey export -AD journeyTestDirectory3 +*/ +import { testExport } from './utils/TestUtils'; +import { connection as c } from './utils/TestConfig'; +import fs from "fs"; + +process.env['FRODO_MOCK'] = '1'; +const env = { + env: process.env, +}; +env.env.FRODO_HOST = c.host; +env.env.FRODO_SA_ID = c.saId; +env.env.FRODO_SA_JWK = c.saJwk; + +const type = 'journey'; + +describe('frodo journey export', () => { + test('"frodo journey export -i j00": should export the journey with journey id "j00"', async () => { + const exportFile = "j00.journey.json"; + const CMD = `frodo journey export -i j00`; + await testExport(CMD, env, type, exportFile); + }); + + test('"frodo journey export -i j01 -f my-j01.json": should export the journey with journey id "j01" into file named my-j01.json', async () => { + const exportFile = "my-j01.json"; + const CMD = `frodo journey export -i j01 -f ${exportFile}`; + await testExport(CMD, env, type, exportFile); + }); + + test('"frodo journey export --journey-id j02 --no-deps --use-string-arrays -D journeyTestDirectory1": should export the journey with journey id "j02" to the folder named "journeyTestDirectory1", and the export should not contain dependencies and should use string arrays.', async () => { + const exportFile = "j02.journey.json"; + const exportDirectory = "journeyTestDirectory1"; + const CMD = `frodo journey export --journey-id j02 --no-deps --use-string-arrays -D ${exportDirectory}`; + await testExport(CMD, env, type, exportFile, exportDirectory); + //Delete folder + fs.rmdirSync(exportDirectory); + }); + + test('"frodo journey export -a": should export all journeys to a single file', async () => { + const exportFile = "allAlphaJourneys.journey.json"; + const CMD = `frodo journey export -a`; + await testExport(CMD, env, type, exportFile); + }); + + test('"frodo journey export --all --file my-allAlphaJourneys.journey.json": should export all journeys to a single file named my-allAlphaJourneys.journey.json', async () => { + const exportFile = "my-allAlphaJourneys.journey.json"; + const CMD = `frodo journey export --all --file ${exportFile}`; + await testExport(CMD, env, type, exportFile); + }); + + test('"frodo journey export -a --no-deps --use-string-arrays --directory journeyTestDirectory2": should export all journeys to a single file in the folder named "journeyTestDirectory2" with no dependencies and only string arrays in the export.', async () => { + const exportFile = "allAlphaJourneys.journey.json"; + const exportDirectory = "journeyTestDirectory2"; + const CMD = `frodo journey export -a --no-deps --use-string-arrays --directory ${exportDirectory}`; + await testExport(CMD, env, type, exportFile, exportDirectory); + //Delete folder + fs.rmdirSync(exportDirectory); + }); + + test('"frodo journey export --all-separate --no-deps --use-string-arrays": should export all journeys to separate files with no dependencies and using string arrays', async () => { + const CMD = `frodo journey export --all-separate --no-deps --use-string-arrays`; + await testExport(CMD, env, type); + }); + + test('"frodo journey export -AD journeyTestDirectory3": should export all journeys to separate files in the folder named "journeyTestDirectory3"', async () => { + const exportDirectory = "journeyTestDirectory3"; + const CMD = `frodo journey export -AD ${exportDirectory}`; + await testExport(CMD, env, type, undefined, exportDirectory); + //Delete folder + fs.rmdirSync(exportDirectory); + }); +});