How To
ForgeRock Identity Cloud

How do I find the script used in a Scripted Decision node when I export a journey in Identity Cloud?

Last updated Jan 24, 2023

The purpose of this article is to provide information on extracting the script details used in a journey when you export the journey in ForgeRock Identity Cloud.


Extracting the script details

When you export a journey in Identity Cloud, all the associated node and script details are included in the export. See Export journeys for information on how to export a journey.

Once you have an export, you can locate the associated script used by a Scripted Decision node as follows:

  1. Open the journey export JSON file in a text editor.
  2. Locate the Scripted Decision node you are interested in (you can search for "nodeType": "ScriptedDecisionNode" in the export file to find them all). For example:         "0785d2c3-c565-4e9f-bc47-0b5239039d42": {             "connections": {               "true": "bbd0e9b6-b0d3-4682-adae-11404f0874c4"             },             "displayName": "<node name>",             "nodeType": "ScriptedDecisionNode",             "x": 593,             "y": 76.73579406738281           },This will give you the node ID, which is required to locate the script. In the example above, the node ID is: 0785d2c3-c565-4e9f-bc47-0b5239039d42
  3.  Search the export file for the node ID identified in the previous step to find the script reference. For example:      "0785d2c3-c565-4e9f-bc47-0b5239039d42": {           "_id": "0785d2c3-c565-4e9f-bc47-0b5239039d42",           "_rev": "1511327752",           "script": "8adf0b08-d402-4758-9890-ed8402c5d3fd",           "outcomes": [             "true",             "false"           ],This will give you the ID of the script used by that node, which is required to locate the actual script content. In the example above, the script ID is: 8adf0b08-d402-4758-9890-ed8402c5d3fd
  4. Search the export file for the script ID identified in the previous step to find the script itself. For example:     "8adf0b08-d402-4758-9890-ed8402c5d3fd": {           "_id": "8adf0b08-d402-4758-9890-ed8402c5d3fd",           "name": "<script name>",           "description": "<script description",           "script": "<script content>",           "default": false,           "language": "JAVASCRIPT",           "context": "AUTHENTICATION_TREE_DECISION_NODE",           "createdBy": "null",           "creationDate": 0,           "lastModifiedBy": "null",           "lastModifiedDate": 0         },

See Also

Journeys in Identity Cloud

Journeys


Copyright and Trademarks Copyright © 2023 ForgeRock, all rights reserved.