Table of Contents

Class AchievementChangeProcessor

Namespace
InSite.Application.Records.Read
Assembly
Shift.Sdk.dll

Implements the process manager for Achievement changes.

public class AchievementChangeProcessor
Inheritance
AchievementChangeProcessor
Inherited Members
Extension Methods

Remarks

A process manager (sometimes called a saga in CQRS) is an independent component that reacts to domain changes in a cross-aggregate, eventually consistent manner. Time can be a trigger. Process managers are sometimes purely reactive, and sometimes represent workflows. From an implementation perspective, a process manager is a state machine that is driven forward by incoming changes (which may come from many aggregates). Some states will have side effects, such as sending commands, talking to external web services, or sending emails.

Constructors

AchievementChangeProcessor(ICommander, IChangeQueue, IAlertMailer, IAchievementSearch, ICourseObjectSearch, IAttemptSearch, IJournalSearch, IProgramSearch, IProgramStore, IProgramService, IMessageSearch, IContentSearch, IContactSearch, bool)

public AchievementChangeProcessor(ICommander commander, IChangeQueue publisher, IAlertMailer mailer, IAchievementSearch achievements, ICourseObjectSearch courses, IAttemptSearch attempts, IJournalSearch journals, IProgramSearch program, IProgramStore programStore, IProgramService programService, IMessageSearch messages, IContentSearch contents, IContactSearch contacts, bool restartCourseWhenCredentialExpired)

Parameters

commander ICommander
publisher IChangeQueue
mailer IAlertMailer
achievements IAchievementSearch
courses ICourseObjectSearch
attempts IAttemptSearch
journals IJournalSearch
program IProgramSearch
programStore IProgramStore
programService IProgramService
messages IMessageSearch
contents IContentSearch
contacts IContactSearch
restartCourseWhenCredentialExpired bool

Methods

Handle(AchievementDeleted)

public void Handle(AchievementDeleted c)

Parameters

c AchievementDeleted

Handle(CredentialCreated)

public void Handle(CredentialCreated e)

Parameters

e CredentialCreated

Handle(CredentialExpired2)

After a credential is expired, find any e-learning modules that are used to grant it, and restart those modules (i.e. remove course progression records and void assessment attempts).

public void Handle(CredentialExpired2 e)

Parameters

e CredentialExpired2

Handle(CredentialGranted3)

If the achievement has a valid webhook, then build and send an HTTP POST Request to the endpoint for this learner/achievement completion.

public void Handle(CredentialGranted3 x)

Parameters

x CredentialGranted3