I've used the global constants in passing data between the workflow tasks and batch jobs.. Not saying it's the best practice and it has it's limitations, as it only works when there are no simultaneous users triggering tasks that write to variable with same name.
Communicating via DB-table might be better alternative. It's been pretty rare requirement and last time I did it, there was no requirement for simultaneous usage, so I got away by using global variables.
Note that you cannot pass context variables to the jobs.
regards, Tero