Hello Steven,
Our projections try to create a link to existing projections in order to avoid a bloated Event store.
I am joining a sample of our projections hoping you see something that we were not able to see ourselves.
The store behaves properly until all of a sudden the projections seems to fail…
Best regards
Omar
Sample of Queries
fromStreams(’$ce-{Component}’,
‘$ce-{Geometry}’)
.when(
{
ComponentCreatedEvent:function(state, event){
linkTo(ComponentModified, event);
return state;
},
GeometryCreatedEvent:function(state, event){
if(event.body.SignatureData !== null && event.body.SignatureData.Length !==0) {
linkTo(ComponentModified, event);
state.count += 1;}
return state;
},
GeometrySignatureExtractedEvent:function(state, event){
linkTo(ComponentModified, event);
return state;
},
GeometryExchangeFileExtractedEvent:function(state, event){
linkTo(ComponentModified, event);
return state;
},
GeometryGroupedEvent:function(state, event){
linkTo(ComponentModified, event);
return state;
},
}
);
fromCategory(‘GeometricalGroup’)
.foreachStream()
.when(
{
GeometricalGroupCreatedEvent:function(state, event){
linkTo(GroupsModified, event);
return state;
},
GeometricalGroupVisuAddedEvent:function(state, event){
linkTo(GroupsModified, event);
return state;
},
GeometryGroupedEvent:function(state, event){
linkTo(GroupsModified, event);
return state;
},
}
);
fromStreams(’$ce-{Supplier}’,
‘$ce-{Family}’,
‘$ce-{Component}’,
‘$ce-{Geometry}’)
.when(
{
SupplierCreatedEvent:function(state, event){
linkTo(SupAndFamModified}, event);
return state;
},
FamilyCreatedEvent:function(state, event){
linkTo(SupAndFamModified, event);
return state;
},
ComponentCreatedEvent:function(state, event){
linkTo(SupAndFamModified, event);
return state;
},
GeometryCreatedEvent:function(state, event){
if(event.body.BoundingBox !== null) {
linkTo(SupAndFamModified, event); }
return state;
},
GeometrySignatureExtractedEvent:function(state, event){
linkTo(SupAndFamModified, event);
return state;
},
}
);