Stream Filter Required

+1 vote
Hi Team,

I want to implement a stream filter in such a way that for e.g. I have 2 stream items :

1. riskSeverity:"Critical"

2. ownerAdUserId:"anujg"

Now, the filter should be in such a way that if any-one tries to change/append the value of riskSeverity.... the filter reject this request.

But, the value of ownerAdUserId can be changed to anything.

So, please help me to implement this requirement using smart filter.

Thanks

Anuj Gupta
asked Jan 3, 2019 by Anuj Gupta

1 Answer

0 votes

After the first riskSeverity item has been written to the stream, simply install and activate a stream filter that blocks any further items with the riskSeverity key. You can see an example here:

https://github.com/MultiChain/smart-filter-examples/blob/master/stream-filters/reject-stream-key.js

answered Jan 3, 2019 by MultiChain
...