Coworker is a bit of a broad concept here that can mean different things to different people

It might mean that a social relationship exists between this coworker and yourself of the type SocialRelationConstants.TYPE_BI_COWORKER

It might mean every user of a specific organisation that you are also a part of

Or it might mean every user of the portal, because the portal is exclusively used by your coworkers

What you need to do differs slightly depending on this

Regardless probably the easiest way to solve this would be to define a model listener that creates the SocialRelations of type SocialRelationConstants.TYPE_BI_FRIEND which constitute a friendship, when an entity is created and that removes them when that entity is removed.

What the entity is your model listener should be listening for depends on what you consider a coworker.

Thanks for your reply. I am newbie to Liferay and I was thinking that I will be able to achieve this with the help of Organization, Communities or User groups(Any one out of these three). But this looks to a bit complex and need some tweak in code.