| GetEventStore: Projections Tab |
Step 1: Click on New Projection
Delete the code in the Source. Add your Javascript. For Example, I had to go through the entire GES to search for an event where Id == 69864709-5991-49CF-8283-65E99AB343A2 (Guid)
fromStream('Test-events')
.when({
$init: function () {
return { count: 0, }; // initial state
},
OrderModified: function(s, e) {
if(e.body.OrderId.toString() == 'a88b484d-e208-44c4-afd0-2ea1d76838cd'){
linkTo('OrderId-a88b484d', e);
}
},
});
.when({
$init: function () {
return { count: 0, }; // initial state
},
OrderModified: function(s, e) {
if(e.body.OrderId.toString() == 'a88b484d-e208-44c4-afd0-2ea1d76838cd'){
linkTo('OrderId-a88b484d', e);
}
},
});
2 Click on Emit Enable
3 Post. Now your Projection shows up in the Streams for analysis.
No comments:
Post a Comment