When querying tasks by workflow model name as follow:
it will work for workflow started after the last server restart.
But for workflow started before the last server restart, the workflow model associated to the wf instance does not exist anymore.
Indeed, models are recreated at each server restart (why? maybe to avoid conflicts when some modifications are done).