BpmConfListenerManager bpmConfListenerManager = getBpmConfListenerManager();
for (ActivitiListener activitiListener : activitiListeners) {
String value = activitiListener.getImplementation();
int type = eventTypeMap.get(activitiListener.getEvent());
BpmConfListener bpmConfListener = bpmConfListenerManager
.findUnique(
"from BpmConfListener where value=? and type=? and status=0 and bpmConfNode=?",
value, type, bpmConfNode);
if (bpmConfListener == null) {
bpmConfListener = new BpmConfListener();
bpmConfListener.setValue(value);
bpmConfListener.setType(type);
bpmConfListenerManager.save(bpmConfListener);
}
}
}