ProgramLiveInfo info = runtimeService.getLiveInfo(Id.Program.from(accountId, appId, programId), programType);
int count = 0;
if (info instanceof NotRunningProgramLiveInfo) {
return count;
} else if (info instanceof Containers) {
Containers containers = (Containers) info;
for (Containers.ContainerInfo container : containers.getContainers()) {
if (container.getName().equals(runnableId)) {
count++;
}
}
return count;