feat(kernel): inject decision journal into stage context + wire repository
This commit is contained in:
@@ -3,6 +3,9 @@ package com.correx.infrastructure
|
||||
import com.correx.core.approvals.ApprovalProjector
|
||||
import com.correx.core.approvals.DefaultApprovalReducer
|
||||
import com.correx.core.approvals.DefaultApprovalRepository
|
||||
import com.correx.core.journal.DecisionJournalProjector
|
||||
import com.correx.core.journal.DefaultDecisionJournalReducer
|
||||
import com.correx.core.journal.DefaultDecisionJournalRepository
|
||||
import com.correx.core.artifacts.DefaultArtifactReducer
|
||||
import com.correx.core.artifacts.repository.ArtifactRepository
|
||||
import com.correx.core.artifactstore.ArtifactStore
|
||||
@@ -177,6 +180,14 @@ object InfrastructureModule {
|
||||
),
|
||||
)
|
||||
|
||||
fun createDecisionJournalRepository(eventStore: EventStore): DefaultDecisionJournalRepository =
|
||||
DefaultDecisionJournalRepository(
|
||||
DefaultEventReplayer(
|
||||
eventStore,
|
||||
DecisionJournalProjector(DefaultDecisionJournalReducer()),
|
||||
),
|
||||
)
|
||||
|
||||
fun createWorkflowLoader(extraKinds: List<ArtifactKind> = emptyList()): WorkflowLoader {
|
||||
val registry = DefaultArtifactKindRegistry()
|
||||
extraKinds.forEach { registry.register(it) }
|
||||
|
||||
Reference in New Issue
Block a user