Hi @philipp.hehnle ,
you could also possibly take the activity instance id.
I also wondered when the task id will be populated because in my local database it is always empty as well and I found this thread: Why is TASK_ID_ column always null in act_hi_detail table? - #2 by thorben
Hope this helps!
Adagatiya