ACT-821: Cascading sub-process instances
ACT-1723: Using RES.ID_ to count instead of RES.*