Facing issue on performing Process Instance Modification

I have a Leave Approval process model with BPMN call-activities.

“L1 Approval” is call activity bpmn. Consider I have an instance in “L1 Approval->Accept Leave Request”.

I want to modify the process instance into “L2 Approval->Reject Leave Request” below is the “L2 Approval” call activity bpmn.

Using process instance modification logics,

//get the parent process instance id
String processInstanceId = ….

runtimeService.createProcessInstanceModification(processInstanceId)
.cancelAllForActivity(runtimeService.getActiveActivityIds(processInstanceId).get(0))
.startBeforeActivity(activityName).execute();

// Change the sub process task
ProcessInstance subprocess = runtimeService.createProcessInstanceQuery()
.superProcessInstanceId(processInstanceId).singleResult();

runtimeService.createProcessInstanceModification(subprocess.getId())
.cancelAllForActivity(
runtimeService.getActiveActivityIds(subprocess.getId()).get(0))
.startBeforeActivity(instructions.get(“taskDefId”).toString()).execute();

After executing my logic, I went to my camunda cockpit in that, then clicked on L2 Approval process.

I couldn’t see any process instances count here. But if I clicked on the process instance id, I could see the process instance count.