@Override public String[] getEventTypes() { return new String[] { "timerTriggered", getActivationType()}; }
private void addActivationListener() { getProcessInstance().addEventListener(getActivationType(), this, true); }
private void removeActivationListener() { getProcessInstance().removeEventListener(getActivationType(), this, true); }
@Override public void signalEvent(String type, Object event) { if ("timerTriggered".equals(type)) { TimerInstance timerInstance = (TimerInstance) event; if (timerInstances != null && timerInstances.contains(timerInstance.getId())) { triggerTimer(timerInstance); } else if (timerInstance.getId() == slaTimerId) { handleSLAViolation(); } } else if (("slaViolation:" + getId()).equals(type)) { handleSLAViolation(); } else if (type.equals(getActivationType())) { if (event instanceof MatchCreatedEvent) { String name = ((MatchCreatedEvent)event).getMatch().getRule().getName(); if (checkProcessInstance((Activation) ((MatchCreatedEvent)event).getMatch())) { ((MatchCreatedEvent)event).getKieRuntime().signalEvent(name, null); } } } }
@Override public String[] getEventTypes() { return new String[] { "timerTriggered", getActivationType()}; }
private void addActivationListener() { getProcessInstance().addEventListener(getActivationType(), this, true); }
private void removeActivationListener() { getProcessInstance().removeEventListener(getActivationType(), this, true); }
@Override public void signalEvent(String type, Object event) { if ("timerTriggered".equals(type)) { TimerInstance timerInstance = (TimerInstance) event; if (timerInstances != null && timerInstances.contains(timerInstance.getId())) { triggerTimer(timerInstance); } else if (timerInstance.getId() == slaTimerId) { handleSLAViolation(); } } else if (("slaViolation:" + getId()).equals(type)) { handleSLAViolation(); } else if (type.equals(getActivationType())) { if (event instanceof MatchCreatedEvent) { String name = ((MatchCreatedEvent)event).getMatch().getRule().getName(); if (checkProcessInstance((Activation) ((MatchCreatedEvent)event).getMatch())) { ((MatchCreatedEvent)event).getKieRuntime().signalEvent(name, null); } } } }