Sathish,
I believe the simplest solution would be to put a 0 duration timer on the task that goes to the service that will store the task ID via the tw.system.step API you mentioned. You would also be able to look at the Instance Details REST API to derive some task information, but you would still need something to trigger the call to put the task in the database, so you would still need the timer.
The only alternative to the timer I can think of off the top of my head would be to use the Dynamic Event Framework.
Hope this helps!
------------------------------
Rex Townsend
Salient Process
------------------------------