Record/Execute Routine for multiple process nodes

Hi guys

In my case, I use Record/Execute Routine to avoid robot colliding with obstacles. However, there’re multiple process nodes that the robot is going to. When I record the routine, the robot likely only considered of the first process node that it is going first. So, after the first process node, which ever process node the robot is going to, the robot is not gripping the unit in a right position. I tried to change the base to Null, but it turned out that out of reach error occurred.

So, in this case, is there a method to fix it? thanks.

(PS: There are 50 process nodes that the robot is going to, so I prefer not having a set of subprograms for each process node.)