http://scn.sap.com/community/business-one-sdk/blog/2014/09/04/various-sdk-testsHi Rajesh,
I'm not locked to one solution, I'm more open-minded than this
Look at http://scn.sap.com/community/business-one-sdk/blog/2014/09/04/various-sdk-tests which is a blog post I am maintaining with answer on questions posed here for which I am chosing to write tests samples: you'll find Inside how to post an invoice.
Basically, to automate DTW, you have to do the full process once, and before executing it to save the xml configuration file, then to call DTW with this file as a parameter. As far as I remind, this is fully explained in the HLP.
Regards,
Eric