Auto connect custom element when dragged from context pad


I have created a custom element and appended it to the context pad. However when i drag that custom element from the context pad an automatic connection is not established from the source to target. Could you please help me on this?

The connection has to be allowed (and specified) via the rules module. Check out the implementation here.