I'm using the following SRM code to add a resource to a booking:
((ServiceReservationInstance)reservationInstance).AssignResources((Engine)engine, requests);
This throws an ResourceNotAvailableException when a certain resource is in use by another booking but if you try to add the same resource to a booking which is already included in that booking it doesn't throw an exception which seems odd to me. I'm I doing something wrong or how should I tackle this
Martijn,
This is expected behavior because AssignResource is not only used to assign a resource but also to add/update parameters. Therefore, it will not throw an exception if the resource is already assigned to the booking and you assign it again (otherwise updating parameters would not be possible).
You'll have to check in your script if the resource the user is trying to add is already part of the booking.