AEM 6.4 : Replicate dependent assets of page in workflow step



Hello All, I have a requirement where I would like to find the dependent assets  (The default behaviour of aem where if i try to publish a page, it will ask to publish the dependent images etc) through java code and have them replicated first.

is this do-able via code?


Anand MN