Triggering an NServiceBus Saga Handler after and Extended Period of Inactivity

StackOverflow https://stackoverflow.com/questions/15935579

  •  03-04-2022
  •  | 
  •  

Question

I have a long running business process (weeks, not minutes). The start of the process is triggered by a user's action. The problem I have is that the next step in the saga will come from one of two places, either a second user interaction, or if after a period of say 1 week the the user hasn't performed an action then another point in the saga should be triggered.

Is a saga the correct mechanism to use in this business process? If so, how is this achieved? If a saga isn't suitable for this task, is there a better mechanism than simply executing nightly batch jobs against a database? My aversion to running a nightly batch job is simply the size of the database table I'd have to hit to query for the next point in the saga.

Était-ce utile?

La solution

Yes - sagas are designed for exactly these scenarios.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top