eventTypeMap.put("create", 3);
eventTypeMap.put("assignment", 4);
eventTypeMap.put("complete", 5);
eventTypeMap.put("delete", 6);
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);
}
}
}