cancel
Showing results for 
Search instead for 
Did you mean: 

No process instance in execution

tdtappe
Confirmed Champ
Confirmed Champ
After getting some unexpected NPEs using CDI (e.g. injecting ProcessInstance) I had a look into the activiti tables and noticed some tasks having a process instance id assigned - but their assigned execution do not have a process instance id.
Is this supposed to be possible/allowed?
Can anyone shed some light on this?

–Heiko
11 REPLIES 11

frederikherema1
Star Contributor
Star Contributor
Can you confirm if I understand your question correct: You have ACT_RU_EXECUTION entries that don't have a PROC_INST_ID_ set.

Yes - a whole bunch of them.

jbarrez
Star Contributor
Star Contributor
That can only be done by casting and setting the process instance id your self.

Are you sure this are "first-class" tasks of a process instance? Ie. they are not standalone tasks or subtasks (parentId != null)?

AFAICT I don't set any process instance id on my own.
As for the standalone tasks or subtasks: I think I don't have any of these. At least not on purpose.

If I don't miss anything the only thing I do in my app concerning Activiti is starting process instances via RuntimeService and completing tasks via TaskService. And for the time being (I am just exploring Activiti) my process definitions are fairly simple - without any subprocesses or anything.

tdtappe
Confirmed Champ
Confirmed Champ
What just popped into my mind: Could this problem be related to suspended processes? While exploring Activiti I made some tests with suspending processes.

No, I haven't got suspended processes any longer in my database.

frederikherema1
Star Contributor
Star Contributor
Can you post a dump of the related ACT_RU_EXECUTION entries that don't have an execution ID defined? Executions without a process-instance shouldn't exist actually… You're using cdi 'BusinessProcess' I presume?

Sure. Need some time though - I have to restore a backup of the database first.
What I noticed in the meantime was that obviously only "old" processes were affected. So after removing those "invalid" processes I didn't run into problems (so far). So probably there must have been something strange at that time. But for the time being I have no idea what that could have been. As I mentioned before I did some tests with suspended processes. And I removed pseudo tasks which I used to "pause" the processes right after they were started. Also I switched two service tasks right at the beginning and at the end of the process to "async".

Here you are!