@Julio R
What you are looking for is difficult to do since AGVs are built
around using control points. One idea that may be helpful to you would be
to create a new path class under AGVNetwork Properties. In the example I attached, I called this path class "NoRotation".

By
modifying your code to look like this, you can cause the code to only be implemented on paths that are labeled as that path class:
AGV thisAGV = AGV(current);
if(objectexists(item) && (getvarnum(ownerobject(getvarnode(thisAGV.currentCP, "path").subnodes[1].value),"pathType")) == 4)
{
item.rotation.z = -current.rotation.z;
}
This code works by finding the class of the path under the control point that was last visited. If the path is of the new path class (in my example it has a varnum value of 4, being the 4th path class), then the custom code will be executed. For this to work it is also important to have the AGV travel to a control point at the start of each path where it can check what the current path class is.
Here is your model with this solution: rotacionanswer1.fsm
Another solution that may be simpler would be to use process flow to make the AGV travel to a control point at the start of each path and then use a "Change Visual" activity on the edges where you don't want the orientation of the AGV to change.
This was a long explanation, so let me know if you have any questions.