DelegateExecution::getCurrentActivityId returns null

Hello experts,

I have the following diagram(I will explain it below):
There is a SubProcess element in which there is a CallActivity. The SubProcess is NOT asynchronous but the CallActivity IS asynchronous. The process definition which the CallActivity starts has a JavaDelegate ServiceTask which invokes the method getCurrentActivityId of the DelegateExecution and uses the Id for reporting.
The problem is that the getCurrentActivityId is returning null. What I have observed in the database is that, when the CallActivity is being started, two executions are being created for the CallActivity - one with activityId = null and the other with activityId = ‘id of the CallActivity’ . I do not know whether this might be the problem here - just sharing with you what I have observed in the database :slight_smile:

Could you give me a hint what could be done here?

Also, when an error in such scenario is thrown, the process is not finished. I can see in the database that the endTime is NULL and moreover when I query the process instance from the RuntimeService and check the isEnded method it returns false.

Could you also give me a hint here?

Thanks,
Encho

Hello,

Could you give me some update here?
I am also experiencing this using CallActivity - not only with SubProcess.

Thanks