We would like to insert a class between two Alfresco class sys:base and cmerson. What are the options? Like type Party has 2 children, Person(individual) and Organisation, So how to model it as Type Party comes between sys:base and cmerson
It is likely to be a lot less trouble (and safer) to create an aspect that you can add to the out-of-the-box person type rather than touching Alfresco's model. Is that a viable approach for what you are trying to do?
I'm trying to achieve it by bi-directional association (using Java) such that person (if it is a party) to be associated to party and same for business. Coding such a way that when party is created, edited or deleted associated person or business should get created, edited or deleted respectively. Please comment on it.
For this I would definitely create an aspect and add it to the person objects that need to be treated differently than "normal" person objects. As part of the aspect you can define one or more associations that point to the other objects that need to be related to that person object.
If you would like to also add logic then I would create a behavior and bind it to the aspect and the creation of the association so that when the aspect is added or when the associations are created or deleted your code can do what it needs to.
All of this–creating custom aspects, creating associations, and creating behaviors–is documented so hopefully you can hook it all together to make it work according to your requirements.