Integer nrOfCompletedInstances, Integer loopCounter) {
String activityId = execution.getActivityId();
String processDefinitionId = ((ExecutionEntity) execution)
.getProcessInstance().getProcessDefinitionId();
BpmConfCountersign bpmConfCountersign = bpmConfCountersignManager
.findUnique(
"from BpmConfCountersign where bpmConfNode.bpmConfBase.processDefinitionId=? and bpmConfNode.code=?",
processDefinitionId, activityId);
if (bpmConfCountersign != null) {
rate = bpmConfCountersign.getRate();
}
String agreeCounterName = "agreeCounter";
Object agreeCounter = runtimeService.getVariable(execution.getId(),
agreeCounterName);