You can run a script to give the shooting sub a solution, but that doesn't work well in my experience. Best I've found is like described above, create a 'spotter' (I use a UAV) when you create the SS, and remove it soon afterward. Even then, it's not certain that the sub will engage.
I do this in my Red Storm Rising campaign, to get Oscars to shoot from long range.