returning data via the interceptor

I have a function that is not rendered , and calls an interceptor, which executes a cfhttp call and gets a result

i am wondering how i can return data the interceptor has collected

my interceptor


var prc = event.getCollection( private = true ); var entityData = getmodel("entity").ESselect(id_number=interceptData.newEntity.id_number);

var esUrl = getSetting(‘elasticsearchUrl’)&’/’&index&’/’&type&’/’&APImethod;


my handler

function newEntity(event, rc, prc){
rc.interceptorResults = announceInterception(‘IncrementalIndex’, prc);

} ;

I expected the interceptorResults request collection item to have values, but none ever get passed. It DOES however execute correctly

Interceptor Asynchronicity

Getting results from interceptors can be done in two ways.

First of all, you have to note that when working with interceptors you move to event-driven programming land. Meaning the RPC approach is gone, there is no execute->get result paradigm anymore. Everything is events just like in JS in the browser.

  1. If the interceptors are ran synchronously then they can use the RC or PRC to drop their results there, so they can be picked up later.
  2. The interceptor can announce yet another event like “onResultsForThis” and then another interceptor can process the return.



Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager:


Ok, forgive me as i am trying my best to learn, in the example i gave, am i calling the interceptor synchronously? as i was putting the results in the private collection, i was thinking it would return