Skip to content

Commit

Permalink
Merge pull request #291 from fraktalio/feature/compute_events_by_orch…
Browse files Browse the repository at this point in the history
…estrating

Application module: Fixing bug in event computation - orchestrated scenario
  • Loading branch information
idugalic committed May 17, 2024
2 parents 6319f1e + b319835 commit 4935efe
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ interface EventOrchestratingComputation<C, S, E> : ISaga<E, C>, IDecider<C, S, E
resultingEvents
.flatMapConcat { react(it) }
.onEach { c ->
val newEvents = flowOf(fetchEvents(c), resultingEvents)
val previousEvents = resultingEvents.toList().asFlow()
val newEvents = flowOf(fetchEvents(c), previousEvents)
.flattenConcat()
.computeNewEventsByOrchestrating(c, fetchEvents)
resultingEvents = flowOf(resultingEvents, newEvents).flattenConcat()
Expand Down

0 comments on commit 4935efe

Please sign in to comment.