====== Exalead / Consobox ======
===== Consolidation Debug =====
http://HOST:PORT+53/introspection/?uri=BUS%2Fxxxxxx&limit=2
{{ ::consodebug.png?600 |}}
===== Transformation Processor =====
==== Replace a ‘/’ with a ‘-’ ====
Use the ‘com.exalead.consobox.transformation.RegexpToStringTransformationProcessor’ processor
{{ ::exalead_consobox_replacecharacters.png?400 |}}
==== Replace a ‘ ’ with a ‘-’ ====
Use the following pattenr :
(.*)\s(.*)
==== Replace a ‘/’ with a ‘/’ ====
Use the following pattern :
(.*)/(.*)
Use the following output :
%1$s/%2$s
===== MAMI - Consolidation =====
Available from "API Console/Manage/Consolidation"
==== Force Aggregation ====
{{::exalead_consobox_forceaggregation.png?600|}}
===== Groovy Examples =====
==== Creation of Child Document ====
process("hpc_co") {
log.info("Processing " + it.getUri());
String hpc_co_dc_type = it.metas.getValue("dc_type");
log.info "******* hpc_co_dc_type: "+hpc_co_dc_type;
String[] SDC_TYPE = it.directives.getValues("SDC:TYPE");
log.info "SDC_TYPE:"+SDC_TYPE.length;
String datamodel_class = it.directives.getValue("datamodel_class");
log.info "datamodel_class:"+datamodel_class;
child = createChildDocument(
it, // root
it.getUri()+'_cosnapshot_Test', // child URI
"hpc_co" // type
);
child.directives.datamodel_class = it.directives.getValue("datamodel_class");
child.withDirectives("SDC:TYPE", it.directives.getValues("SDC:TYPE"));
child.metas.hierarchical_types = "hpc_co";
child.metas.hierarchical_types+="co";
child.metas.hierarchical_types+="change";
child.metas.hierarchical_types+="document";
child.metas.id = it.metas.getValue("id");
child.metas.url = "eno:bo:" + it.metas.getValue("id") + "_cosnapshot_Test";
child.metas.history_type = "cosnapshot";
child.metas.parenttype = "Change";
child.metas.type = "Change Order";
child.metas.current = "In Work";
child.metas.changes = "current";
yield child;
log.info "childcreated:"+child;
}
===== Changement du type à la transformation =====
Pour faire cela, il faut :
* Ajouter un processeur 'ConditionalTypeSetterTransformationProcessor' avant le processeur 'HierarchicalTypesSetter'
* Et ajouter un processeur 'CreateMetasOrDirectivesTransformationProcessor' pour faire un override de la directive 'datamodel_class'