Fetch runtime activity details

Hi Guys,

We are working on some timeline thing in which we are complete process activities one by one,
presently we are querying from

public.act_hi_actinst

table but in case of activity fails it is not logged in this table,
we can check in

> public.act_ru_execution

for activity which has failed but details like activity start time, activity type whether it is service task or user task we cant get from there.
One solution would be to log even failed activities also in public.act_hi_actinst table but not sure how to do that