My intention was to write and read some attributes to some groups and components.
After writing it to components (instances) ,it was impossible to read the attribute of the parent component(or group).
To resolve it,I have decide to write and read only to definitions of the components.
Now,before I write or read to entities, I check if the entity is group or component.
If it is a group,I read and write to this entity,if it is a component,I read and write to the definition of this component.In this way,I don't need to know the exact parent instance of the component,because all the instances have the same attributes.
So the problem is resolved