-
Notifications
You must be signed in to change notification settings - Fork 490
Rule returning multiple events #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@jgoux thanks, you're welcome! No reason I can think of off the top of my head. Perhaps we'll look at adding this in a future release if there's enough demand. In the meantime, you may be able to work around this by listing multiple events in the let rule = {
conditions: {
/* ... */
},
event: {
type: 'multiple-events',
params: {
event1: {
/* any additional event 1 parameters */
},
event2: {
/* any additional event 2 parameters */
}
}
}
} You would of course need to write a few lines of logic for handling the 'multiple-events' payload |
Indeed, it works well that way too. 👍 (I pass an array as the params) event: {
type: 'SUCCESS',
params: [
{
type: 'INDUIRE_RESULTAT',
params: {
analyse: 'URFIN',
resultat: 'F'
}
},
{
type: 'INDUIRE_RESULTAT',
params: {
analyse: 'FOO',
resultat: 'BAZ'
}
}
]
} I can live with it for now, thanks for the tip @CacheControl :D |
Going to close this out as it doesn't seem to be gaining much traction, and the workaround has been reported to be successful. |
Hi @CacheControl , not sure if this is obsolete, but we at riskine would definitely love the feature discussed here. Cheers, Johannes |
Would greatly appreciate multi-event capability as well. |
Just a note, that the workaround proposed here would be incompatible with some new functionality that relies on the correct use of the |
@honzabit This should still work, you just won't get the new feature. |
@chris-pardy - do we have something like pairing of conditions and events e.g condition 1 is successful, return event 1, condition 2 is successful, return event 2. |
Is this becoming implemented ? |
Any updates here? This would be extremely useful in a current use case. I'm currently having to create custom events that are combinations of other events in order to accommodate. |
Hello,
thanks for this great lib! 👍
Is there a reason why the rule can't return multiple events when it succeed ?
The text was updated successfully, but these errors were encountered: