Connectors : Consolidation Server : Appendix - Groovy Processors
 
Appendix - Groovy Processors
A Groovy processor is a piece of Groovy code defined with a Closure named process, taking one constant string (and one only) as parameter.
The string value has two possible interpretations:
If empty, it means that the processor is executed on all document types pushed to the Consolidation Server.
If non-empty, then the processor is executed by checking if the type provided belongs to the document type inheritance. See Processor Type Inheritance and Runtime Selection.
Recommendation: Read the Groovy documentation.
The similar behavior is achieved in Java with IJavaAggregationProcessor.getAggregationDocumentType() and IJavaTransformationProcessor.getTransformationDocumentType().
process("city") {
log.info("Processing " + it.getUri());
}
The code above is equivalent to Java Example 1. You do not find for which source it is associated to, because it is defined in the Administration Console as shown below.
Although it is not explicitly visible in the method signature, the process method receives the current document being processed (transformation or aggregation) using the special it variable. You can see it in the above example with it.getUri(), which is the equivalent of IConsolidationDocument.getUri().