/Engine/Source/Editor/AnimGraph/Public/AnimationStateMachineSchema.h
Try relinking the connection starting at the old source and target pins and relink it to the new target pin.
virtual bool TryRelinkConnectionTarget ( [UEdGraphPin](API\Runtime\Engine\EdGraph\UEdGraphPin) * SourcePin, [UEdGraphPin](API\Runtime\Engine\EdGraph\UEdGraphPin) * OldTargetPin, [UEdGraphPin](API\Runtime\Engine\EdGraph\UEdGraphPin) * NewTargetPin, const [TArray](API\Runtime\Core\Containers\TArray)< [UEdGraphNode](API\Runtime\Engine\EdGraph\UEdGraphNode) * > & InSelectedGraphNodes ) const