I want this second diagram

Generated diagram

I want this inter connect port to port in group

Groups with Ports

Do you mean something like: Groups with Ports ?

Basically you just need to make sure that each port has appropriate fromSpot and toSpot values that are on opposite sites of the port.