Attach functions to custom security


We are using OpenGamma v2.1.0. We are going to implement our own security. We are trying to follow documentation here:

Our security is going to use our custom functions which will do our calculations. Unfortunately it is not clear how we can map our custom functions to our new security? Also it not looks clear how we can setup function execution graph for our security?

Do you have some more detailed documentations about it? or some simple examples which add new security with simple functions?