/** * This method validates the intercepted activity event. * * @param actType The activity type * @throws Exception Failed to validate activity */ public void validate(ActivityType actType) throws Exception { // Check if predicate defined and if so, the event is applicable if (_predicate == null || _predicate.evaluate(actType)) { // Process the event _eventProcessor.process(null, actType, 0); } }
/** * Initialize the activity validator. * * @throws Exception Failed to initialize */ public void init() throws Exception { if (!_initialized) { _initialized = true; if (_predicate != null) { _predicate.init(); } if (_eventProcessor != null) { _eventProcessor.init(); } } }
if (getPredicate() == null || getPredicate().evaluate(event)) { try { java.io.Serializable processed=getEventProcessor().process(source, event, retriesLeft);
/** * This method initializes the node. * * @throws Exception Failed to initialize the node */ protected void init() throws Exception { if (getPredicate() != null) { getPredicate().init(); } if (getEventProcessor() == null) { throw new Exception("Event Processor has not been configured for node"); } getEventProcessor().init(); if (getEventProcessor().getAsynchronous()) { _handler = new NodeResultHandler(); getEventProcessor().setResultHandler(_handler); } }