Closed ryan-mars closed 3 years ago
Some events will be emitted outside of the bounded context for others to react. We need a component that will aid the developer in describing this behavior.
Related #15, #7
// operations/src/service.ts import { scheduling } from "scheduling/lib/index"; const SchedulingBoundedContext = new ExternalBoundedContext({ boundedContext: scheduling, }); const { ScheduledFlightAddedEvent, FlightCreatedEvent, } = SchedulingBoundedContext.events; export const FlightManagementPolicy = new Policy( { __filename, events: [ScheduledFlightAddedEvent, FlightCreatedEvent], commands: [AddFlight], }, async (event, commands) => { // ... } ); export const operations = new EventStorm({ handler: "operations", name: "Operations", components: { SchedulingBoundedContext, FlightManagementPolicy, AddFlight, }, });
Some events will be emitted outside of the bounded context for others to react. We need a component that will aid the developer in describing this behavior.
Related #15, #7