AnsweredAssumed Answered

How to get the parentId of call activiti task

Question asked by cirerenat on May 14, 2013
Latest reply on May 15, 2013 by cirerenat
I have a process (18725) with a call activiti (18502) and that process also has a call activiti (18920) task. When the process(18920) arrives a receive task, here's how it looks the execution table.


SELECT id_, proc_INST_ID_ , parent_id_, supER_EXEC_  FROM ACT_RU_EXECUTION
ID_  PROC_INST_ID_  PARENT_ID_ SUPER_EXEC_ 
18275   18275   null   null
18300   18275   18275   null
18502   18502   null   18300
18918   18502   18502   null
18920   18920   null   18918


I am using the runtimeService to signal the 18920, but before doing that, I want to know the parentId of the 18920. I am having difficulty to get that using the Execution Queries, since 18502 is not a parent of 18920. (And when I use activiti explorer to browse the active processes, I don't see 18918 and 18300., I guess I don't understand the super_exec_ relation).

<code>
Execution execution = runtimeService.createExecutionQuery().processInstanceId(18920).activityId(
                activityId).singleResult();
// Here, how can I find 18502 from "execution" ?
runtimeService.signal(execution.getId());
<code>

Outcomes