AnsweredAssumed Answered

In ActivitiEventListener Task Created Event how can i get Activity Entity associated with task ?

Question asked by piyush.kaizen on Sep 21, 2016
Hi,
In ActivitiEventListener Task Created Event how can i get Activity Entity associated with task ?

I can not use historicActivityInstance queries as the data is not yet written to database.
On experimenting I found out that Task Instance Id is Activity Instance Id + 1.

1) Can i rely on that ?
2) Is there any better way to get respective activity in ActivitiEventListener  EntityCreated Event (Task Entity)
    I need that data Real Time .

3) When is data actually written to database ?
4) Is there any event for Execution Halted while waiting for User Task ?

Outcomes