rockcarver / frodo-cli

A CLI to manage ForgeRock platform deployments supporting Identity Cloud tenants, ForgeOps deployments, and classic deployments.
MIT License
17 stars 14 forks source link

Replace not found custom nodes with scripted node #337

Open cuzic4n opened 7 months ago

cuzic4n commented 7 months ago

I did worked on-prem and used many custom nodes i.e. HTMLMessageNode below. That env is long gone and I have a backup of the journeys from frodo sitting around. Now, I just want to see the journey and don't care about having HTMLMessageNode as part of my minikube deployment or my cloud enviroment... but when you import them it fails like seen below.

➜  frodo journey import -k --no-deps -f Login.journey.json cdk.example.com
Connected to https://cdk.example.com/am [/] as user amadmin
Importing first journey in file...
✔ Resolved all dependencies.
⠋ Importing panwLogin...{
  code: 404,
  reason: 'Not Found',
  message: "Resource 'HTMLMessageNode' not found"
}
✖ Error: Error importing inner node 1e5cd9d5-7327-4f03-bc9d-ed4ff06a1bc3 in journey Login

"Nodes are not that easily removed from journeys, as they are referenced by their preceding nodes and they reference nodes that their exits connect to. However, we could do a generic replacement of unknown nodes with a scripted decision node, for example. That’s what our S2S tool does. That way we can keep the tree itself intact and the number of exists and let the admin sort it out." - Volker The scripted decision node name that replaces the failed custom node can reference that ‘not found HTMLMessageNode name’ to help spell it out to the admin.