I use Activiti since maybe one year.
Now I use the ACT_RU_VARIABLE table to get the PROC_INST_ID of the execution.
I use this, becaus I think this is one of the the easiest way to get the PROC_INST_ID.
Now the Problem:
If I create a processdefinition with a Parallel-Gateway( and I know the ExecutionId and the ProcessInstanceId should be differet)
and i look in my database, I see that ExecutionId and the ProcessInstanceId are the same at the table ACT_RU_VARIABLE.
After this I have looked over the document described in the subject and it could be that I find a mistake.
I. This is the statement, where the Execution_ID_ of the ACT_RU_VARIABLE get the ID_ of ACT_RU_EXECUTION. This is OK.
create index ACT_IDX_VAR_EXE on ACT_RU_VARIABLE(EXECUTION_ID_);
alter table ACT_RU_VARIABLE
add constraint ACT_FK_VAR_EXE
foreign key (EXECUTION_ID_)
references ACT_RU_EXECUTION (ID_);
II. But in the following statement the PROC_INST_ID_ of the ACT_RU_VARIABLE get the ID_ of ACT_RU_EXECUTION, too, but it should get the PROC_INST_ID_ of the ACT_RU_EXECUTION.
create index ACT_IDX_VAR_PROCINST on ACT_RU_VARIABLE(PROC_INST_ID_);
alter table ACT_RU_VARIABLE
add constraint ACT_FK_VAR_PROCINST
foreign key (PROC_INST_ID_)
references ACT_RU_EXECUTION(ID_);
Is this a mistake? If not I don't understan why this is like this way