@Override public void onExecuteActions(Rule rule, Event event) { List<String> ruleExecutionInfo = new ArrayList<>(); ruleExecutionInfo.add(rule.getItemId()); ruleExecutionInfo.add(rule.getMetadata().getName()); ruleExecutionInfo.add(event.getEventType()); ruleExecutionInfo.add(event.getSessionId()); ruleExecutionInfo.add(event.getProfileId()); ruleExecutionInfo.add(event.getTimeStamp().toString()); ruleExecutionInfo.add(event.getScope()); outputLine(out, ruleExecutionInfo); } }
@Override public int onEvent(Event event) { if (!event.isPersistent() && !withInternal) { return EventService.NO_CHANGE; } List<String> eventInfo = new ArrayList<>(); eventInfo.add(event.getItemId()); eventInfo.add(event.getEventType()); eventInfo.add(event.getSessionId()); eventInfo.add(event.getProfileId()); eventInfo.add(event.getTimeStamp().toString()); eventInfo.add(event.getScope()); eventInfo.add(Boolean.toString(event.isPersistent())); outputLine(out, eventInfo); return EventService.NO_CHANGE; }
public void populateRuleInfo(Rule rule, Event event, String status) { if (!ArrayUtils.contains(ruleIds, rule.getItemId())) { return; } List<String> ruleExecutionInfo = new ArrayList<>(); ruleExecutionInfo.add(status); ruleExecutionInfo.add(rule.getItemId()); ruleExecutionInfo.add(rule.getMetadata().getName()); ruleExecutionInfo.add(event.getEventType()); ruleExecutionInfo.add(event.getSessionId()); ruleExecutionInfo.add(event.getProfileId()); ruleExecutionInfo.add(event.getTimeStamp().toString()); ruleExecutionInfo.add(event.getScope()); outputLine(out, ruleExecutionInfo); }
if (session) { profileIdCondition.setParameter("propertyName", "sessionId"); profileIdCondition.setParameter("propertyValue", event.getSessionId()); } else { profileIdCondition.setParameter("propertyName", "profileId");
if (session) { profileIdCondition.setParameter("propertyName", "sessionId"); profileIdCondition.setParameter("propertyValue", event.getSessionId()); } else { profileIdCondition.setParameter("propertyName", "profileId");