Hi Mohan,
Before I answer this question, one question for you - why?
Attack mode was originally intended as a manual option, where you manually explore the website and that way control what ZAP attacks.
Using the Attack mode with automation is no different to exploring your application first (eg using the spiders, importing API definitions) and then running an active scan.
Cheers,
Simon