Anywhere I can read about the various properties and structures in the “e” object (i.e. the event) for a projection.
I’m trying to do something like the below sample: create a “header” stream for each Widget stream. Widget streams are full of tons of low-level events, but when I want to just build up quick header information, I only care about a small subset of those events, so I want to create a companion “header” stream.
But how do I get the name of the original stream ( so I can extract the Widget ID from it? )
fromCategory(“Widget”)
.foreachStream()
.when({
WidgetCreated: function(s,e) {
var origStream = e.??? // HOW DO I GET THIS?
var widgetId = origStream.substring(7); // i.e. Widget-59e9a5f8-ac1b-41d9-8230-728a6be937e9
linkTo(“Table.header-” + widgetId, e);
},
WidgetAltered: function(s,e) { … /* ditto */ … },
WidgetDeleted: function(s,e) { … /* ditto */ … }
});
``