Example #1
0
        protected override void CorrelateMessages(ICorrelationConfig <PersonSagaData> config)
        {
            config.Correlate <ImportPersonCommand>(
                message => message.PersonId,
                sagaData => sagaData.PersonId);

            config.Correlate <RegisterPersonCommand>(
                message => message.PersonId,
                sagaData => sagaData.PersonId);

            config.Correlate <ChangePersonLegalAddressCommand>(
                message => message.PersonId,
                sagaData => sagaData.PersonId);

            config.Correlate <ChangePersonContactInfoCommand>(
                message => message.PersonId,
                sagaData => sagaData.PersonId);

            config.Correlate <ChangePersonShippingAddressCommand>(
                message => message.PersonId,
                sagaData => sagaData.PersonId);

            config.Correlate <ChangePersonBillingAddressCommand>(
                message => message.PersonId,
                sagaData => sagaData.PersonId);

            config.Correlate <UnlistPersonCommand>(
                message => message.PersonId,
                sagaData => sagaData.PersonId);
        }
Example #2
0
        protected override void CorrelateMessages(ICorrelationConfig <JobOrderSagaData> config)
        {
            config.Correlate <ImportJobOrderCommand>(
                message => message.JobOrderId,
                sagaData => sagaData.JobOrderId);

            config.Correlate <RegisterJobOrderCommand>(
                message => message.JobOrderId,
                sagaData => sagaData.JobOrderId);

            config.Correlate <ExtendJobOrderCommand>(
                message => message.JobOrderId,
                sagaData => sagaData.JobOrderId);

            config.Correlate <LinkIncomingInvoiceToJobOrderCommand>(
                message => message.JobOrderId,
                sagaData => sagaData.JobOrderId);

            config.Correlate <LinkOutgoingInvoiceToJobOrderCommand>(
                message => message.JobOrderId,
                sagaData => sagaData.JobOrderId);

            config.Correlate <MarkJobOrderAsCompletedCommand>(
                message => message.JobOrderId,
                sagaData => sagaData.JobOrderId);
        }
Example #3
0
        protected override void CorrelateMessages(ICorrelationConfig <CreateOrUpdateMachineSagaData> config)
        {
            base.CorrelateMessages(config);

            config.Correlate <OperationTaskStatusEvent <PlaceVirtualMachineCommand> >(m => m.OperationId, d => d.OperationId);
            config.Correlate <OperationTaskStatusEvent <ConvergeVirtualMachineCommand> >(m => m.OperationId, d => d.OperationId);
        }
Example #4
0
        protected override void CorrelateMessages(ICorrelationConfig <SomeSagaData> config)
        {
            config.Correlate <string>(GetCorrelationId, d => d.CorrelationId);

            // just be sure that this particular message can never be correlated
            config.Correlate <MessageThatCanNeverBeCorrelated>(m => Guid.NewGuid().ToString(), d => d.CorrelationId);
        }
Example #5
0
 protected override void CorrelateMessages(ICorrelationConfig <OnboardCustomerSagaData> config)
 {
     config.Correlate <OnboardCustomer>(m => m.CustomerName, d => d.CustomerName);
     config.Correlate <CustomerAccountCreated>(m => m.CustomerName, d => d.CustomerName);
     config.Correlate <WelcomePackSentToCustomer>(m => m.CustomerName, d => d.CustomerName);
     config.Correlate <VerifyCustomerOnboardingOla>(m => m.CustomerName, d => d.CustomerName);
 }
 protected override void CorrelateMessages(ICorrelationConfig <OnboardingSagaData> config)
 {
     config.Correlate <OnboardNewCustomer>    (x => x.Email, nameof(OnboardingSagaData.CustomerEmail));
     config.Correlate <CustomerAccountCreated>(x => x.Email, nameof(OnboardingSagaData.CustomerEmail));
     config.Correlate <WelcomeEmailSent>      (x => x.AccountId, nameof(OnboardingSagaData.AccountId));
     config.Correlate <SalesCallScheduled>    (x => x.AccountId, nameof(OnboardingSagaData.AccountId));
     config.Correlate <OnboardingOlaBreached> (x => x.SagaId, nameof(OnboardingSagaData.Id));
 }
Example #7
0
 protected override void CorrelateMessages(ICorrelationConfig <ProposalCreatingData> config)
 {
     config.Correlate <ProposalRequest>(c => c.Email, d => d.CustomerEmail);
     config.Correlate <ProposalCreated>(c => c.Email, d => d.CustomerEmail);
     config.Correlate <ProposalApproved>(c => c.ProposalId, d => d.ProposalId);
     config.Correlate <ContractCreated>(c => c.ProposalId, d => d.ProposalId);
     config.Correlate <ContractValidated>(c => c.ContractId, d => d.ContractId);
 }
Example #8
0
 protected override void CorrelateMessages(ICorrelationConfig <OperationSagaData> config)
 {
     config.Correlate <CreateOperationCommand>(m => m.TaskMessage.OperationId, d => d.OperationId);
     config.Correlate <CreateNewOperationTaskCommand>(m => m.OperationId, d => d.OperationId);
     config.Correlate <OperationTimeoutEvent>(m => m.OperationId, d => d.OperationId);
     config.Correlate <OperationTaskAcceptedEvent>(m => m.OperationId, d => d.OperationId);
     config.Correlate <OperationTaskStatusEvent>(m => m.OperationId, d => d.OperationId);
 }
Example #9
0
 protected override void CorrelateMessages(ICorrelationConfig <TestSagaData> config)
 {
     config.Correlate <KickoffSagaMessages>(m => m.SagaInstanceId, d => d.SagaInstanceId);
     config.Correlate <SagaMessageFire>(m => m.SagaInstanceId, d => d.SagaInstanceId);
     config.Correlate <SagaMessageEarth>(m => m.SagaInstanceId, d => d.SagaInstanceId);
     config.Correlate <SagaMessageWind>(m => m.SagaInstanceId, d => d.SagaInstanceId);
     config.Correlate <IFailed <ISagaMessage> >(m => m.Message.SagaInstanceId, d => d.SagaInstanceId);
 }
Example #10
0
 protected override void CorrelateMessages(ICorrelationConfig <PedidoSagaData> config)
 {
     config.Correlate <RealizarPedidoCommand>(m => m.AggregateRoot, d => d.Id);
     config.Correlate <PagamentoRealizadoEvent>(m => m.AggregateRoot, d => d.Id);
     config.Correlate <PedidoFinalizadoEvent>(m => m.AggregateRoot, d => d.Id);
     config.Correlate <PagamentoRecusadoEvent>(m => m.AggregateRoot, d => d.Id);
     config.Correlate <PedidoCanceladoEvent>(m => m.AggregateRoot, d => d.Id);
 }
 protected override void CorrelateMessages(ICorrelationConfig <PedidoSagaData> config)
 {
     config.Correlate <AdicionarPedidoCommand>(m => m.AggregateRoot, d => d.Id);
     config.Correlate <PedidoAdicionadoEvent>(m => m.AggregateRoot, d => d.Id);
     config.Correlate <PagamentoCartaoProcessadoEvent>(m => m.PedidoId, d => d.Id);
     config.Correlate <PedidoDespachadoEvent>(m => m.AggregateRoot, d => d.Id);
     config.Correlate <PedidoDespachadoEvent>(m => m.AggregateRoot, d => d.Id);
 }
Example #12
0
            protected override void CorrelateMessages(ICorrelationConfig <MySagaData> config)
            {
                // this is silly!
                config.Correlate <Initiate>(m => Guid.NewGuid(), d => d.Id);

                config.Correlate <IntMessage>(m => m.AnInt, d => d.IntValue);
                config.Correlate <GuidMessage>(m => m.AGuid, d => d.GuidValue);
                config.Correlate <StringMessage>(m => m.AString, d => d.StringValue);
            }
Example #13
0
        protected override void CorrelateMessages(ICorrelationConfig <OutgoingCreditNoteSagaData> config)
        {
            config.Correlate <IssueCreditNoteCommand>(
                message => message.CreditNoteId,
                sagaData => sagaData.CreditNoteId);

            config.Correlate <RegisterOutgoingCreditNoteCommand>(
                message => message.CreditNoteId,
                sagaData => sagaData.CreditNoteId);
        }
Example #14
0
 protected override void CorrelateMessages(ICorrelationConfig <OperationSagaData> config)
 {
     config.Correlate <StartOperation>(m => m.OperationId, d => d.OperationId);
     config.Correlate <OperationTimeoutMessage>(m => m.OperationId, d => d.OperationId);
     config.Correlate <OperationAcceptedEvent>(m => m.OperationId, d => d.OperationId);
     config.Correlate <OperationCompletedEvent>(m => m.OperationId, d => d.OperationId);
     config.Correlate <OperationFailedEvent>(m => m.OperationId, d => d.OperationId);
     config.Correlate <ConvergeVirtualMachineProgressEvent>(m => m.OperationId, d => d.OperationId);
     config.Correlate <AttachMachineToOperationCommand>(m => m.OperationId, d => d.OperationId);
 }
Example #15
0
 protected override void CorrelateMessages(ICorrelationConfig <SagaBuyWorkflowData> config)
 {
     config.Correlate <BuyRegisterSagaCommand>(m => m.AggregateId, d => d.Id);
     config.Correlate <BuyRegisteredEvent>(m => m.AggregateId, d => d.Id);
     config.Correlate <BuyFailedEvent>(m => m.AggregateId, d => d.Id);
     config.Correlate <UpdateBankAccountBanlanceFailedEvent>(m => m.AggregateId, d => d.Id);
     config.Correlate <UpdatedBankAccountBalanceEvent>(m => m.AggregateId, d => d.Id);
     config.Correlate <CreatedDailyExtractLotEvent>(m => m.AggregateId, d => d.Id);
     config.Correlate <UpdatedDailyExtractLotEvent>(m => m.AggregateId, d => d.Id);
 }
Example #16
0
        protected override void CorrelateMessages(ICorrelationConfig <CompanySagaData> config)
        {
            config.Correlate <RegisterCompanyCommand>(
                message => message.CompanyId,
                sagaData => sagaData.CompanyId);

            config.Correlate <ChangeCompanyNameCommand>(
                message => message.CompanyId,
                sagaData => sagaData.CompanyId);
        }
Example #17
0
        protected override void CorrelateMessages(ICorrelationConfig <PayoutSagaData> config)
        {
            // events of interest
            config.Correlate <AmountsCalculated>(m => m.CaseNumber, d => d.CaseNumber);
            config.Correlate <TaxesCalculated>(m => m.CaseNumber, d => d.CaseNumber);
            config.Correlate <PayoutMethodSelected>(m => m.CaseNumber, d => d.CaseNumber);

            // internal verification message
            config.Correlate <VerifyComplete>(m => m.CaseNumber, d => d.CaseNumber);
        }
Example #18
0
        protected override void CorrelateMessages(ICorrelationConfig <TradeCreatedSagaData> config)
        {
            // events
            config.Correlate <TradeCreated>(message => message.TradeId, data => data.TradeId);
            config.Correlate <TradeAccepted>(message => message.TradeId, data => data.TradeId);
            config.Correlate <TradeRejected>(message => message.TradeId, data => data.TradeId);

            // timeout
            config.Correlate <TradeSagaTimeout>(message => message.TradeId, data => data.TradeId);
        }
Example #19
0
 protected override void CorrelateMessages(ICorrelationConfig <MySagaData> config)
 {
     if (_useMessageContext)
     {
         config.CorrelateContext <MyMessage>(context => context.Headers["custom-correlation-id"], d => d.CorrelationId);
     }
     else
     {
         config.CorrelateHeader <MyMessage>("custom-correlation-id", d => d.CorrelationId);
     }
 }
Example #20
0
 protected override void CorrelateMessages(ICorrelationConfig <ComplianceSagaData> config)
 {
     config.Correlate <ComplianceOrderInitiationMessage>(x => x.ID, x => x.ComplianceOrderID);
     config.Correlate <LegionAssignedMessage>(x => x.ComplianceOrderID, x => x.ComplianceOrderID);
     config.Correlate <ReconInitiatedMessage>(x => x.ComplianceOrderID, x => x.ComplianceOrderID);
     config.Correlate <ReconCompletedMessage>(x => x.ComplianceOrderID, x => x.ComplianceOrderID);
     config.Correlate <ImperialGuardDeploymentCreatedMessage>(x => x.ComplianceOrderID, x => x.ComplianceOrderID);
     config.Correlate <ImperialGuardDeploymentArrivedMessage>(x => x.ComplianceOrderID, x => x.ComplianceOrderID);
     config.Correlate <ImperialGuardDeploymentEradicatedMessage>(x => x.ComplianceOrderID, x => x.ComplianceOrderID);
     config.Correlate <ImperialGuardReinforcementCreatedMessage>(x => x.ComplianceOrderID, x => x.ComplianceOrderID);
     config.Correlate <ImperialGuardReinforcementArrivedMessage>(x => x.ComplianceOrderID, x => x.ComplianceOrderID);
     config.Correlate <EnemyForcesEradicatedMessage>(x => x.ComplianceOrderID, x => x.ComplianceOrderID);
 }
        protected override void CorrelateMessages(ICorrelationConfig <OrderSagaData> config)
        {
            // Link all the events with given ID which we want to follow.
            config.Correlate <OrderCreatedEvent>(m => m.requestID, d => d.requestID);
            config.Correlate <OrderStockAvailableEvent>(m => m.requestID, d => d.requestID);
            config.Correlate <OrderPaymentReservedEvent>(m => m.requestID, d => d.requestID);
            config.Correlate <OrderStockNotAvailableEvent>(m => m.requestID, d => d.requestID);
            config.Correlate <OrderPaymentFailedEvent>(m => m.requestID, d => d.requestID);

            //Rollback events to listen for in this saga
            config.Correlate <PaymentRefundedEvent>(m => m.requestID, d => d.requestID);

            // Link timeout event to saga so we can gracefully timeout a saga and rollback.
            config.Correlate <VerifyComplete>(m => m.requestID, d => d.requestID);
        }
Example #22
0
 protected override void CorrelateMessages(ICorrelationConfig <IncomingInvoiceSagaData> config)
 {
     config.Correlate <RegisterIncomingInvoiceCommand>(
         message => message.InvoiceId,
         sagaData => sagaData.InvoiceId);
     config.Correlate <ImportIncomingInvoiceCommand>(
         message => message.InvoiceId,
         sagaData => sagaData.InvoiceId);
     config.Correlate <MarkIncomingInvoiceAsPaidCommand>(
         message => message.InvoiceId,
         sagaData => sagaData.InvoiceId);
     config.Correlate <MarkIncomingInvoiceAsOverdueCommand>(
         message => message.InvoiceId,
         sagaData => sagaData.InvoiceId);
     config.Correlate <IncomingInvoiceSaga.IncomingInvoiceOverdueTimeout>(
         message => message.InvoiceId,
         sagaData => sagaData.InvoiceId);
 }
Example #23
0
 protected override void CorrelateMessages(ICorrelationConfig <OutgoingInvoiceSagaData> config)
 {
     config.Correlate <IssueInvoiceCommand>(
         message => message.InvoiceId,
         sagaData => sagaData.InvoiceId);
     config.Correlate <ImportOutgoingInvoiceCommand>(
         message => message.InvoiceId,
         sagaData => sagaData.InvoiceId);
     config.Correlate <MarkOutgoingInvoiceAsPaidCommand>(
         message => message.InvoiceId,
         sagaData => sagaData.InvoiceId);
     config.Correlate <MarkOutgoingInvoiceAsOverdueCommand>(
         message => message.InvoiceId,
         sagaData => sagaData.InvoiceId);
     config.Correlate <OutgoingInvoiceSaga.OutgoingInvoiceExpiredTimeout>(
         message => message.InvoiceId,
         sagaData => sagaData.InvoiceId);
 }
Example #24
0
        protected override void CorrelateMessages(ICorrelationConfig <ProjectSagaData> config)
        {
            config.Correlate <ImportProjectCommand>(
                message => message.ProjectId,
                sagaData => sagaData.ProjectId);

            config.Correlate <RegisterProjectCommand>(
                message => message.ProjectId,
                sagaData => sagaData.ProjectId);

            config.Correlate <ExtendProjectCommand>(
                message => message.ProjectId,
                sagaData => sagaData.ProjectId);

            config.Correlate <MarkProjectAsCompletedCommand>(
                message => message.ProjectId,
                sagaData => sagaData.ProjectId);
        }
Example #25
0
            protected override void CorrelateMessages(ICorrelationConfig <MySagaData> config)
            {
                if (!_useSagaDataPropertyNames)
                {
                    // this is silly!
                    config.Correlate <Initiate>(m => Guid.NewGuid(), d => d.Id);

                    config.Correlate <IntMessage>(m => m.AnInt, d => d.IntValue);
                    config.Correlate <GuidMessage>(m => m.AGuid, d => d.GuidValue);
                    config.Correlate <StringMessage>(m => m.AString, d => d.StringValue);
                }
                else
                {
                    config.Correlate <Initiate>(m => Guid.NewGuid(), nameof(MySagaData.Id));
                    config.Correlate <IntMessage>(m => m.AnInt, nameof(MySagaData.IntValue));
                    config.Correlate <GuidMessage>(m => m.AGuid, nameof(MySagaData.GuidValue));
                    config.Correlate <StringMessage>(m => m.AString, nameof(MySagaData.StringValue));
                }
            }
Example #26
0
        protected override void CorrelateMessages(ICorrelationConfig <EstimationState> config)
        {
            // events of interest
            config.Correlate <EstimationRequested>(m => m.CaseNumber, d => d.CaseNumber);

            config.Correlate <ImageDownloaded>(m => m.CaseNumber, d => d.CaseNumber);
            config.Correlate <UnableToDownloadImage>(m => m.CaseNumber, d => d.CaseNumber);

            config.Correlate <ImageProcessed>(m => m.CaseNumber, d => d.CaseNumber);
            config.Correlate <UnableToProcessImage>(m => m.CaseNumber, d => d.CaseNumber);
            config.Correlate <AwaitExternalImageToBeProcessed>(m => m.CaseNumber, d => d.CaseNumber);

            config.Correlate <EstimationCompleted>(m => m.CaseNumber, d => d.CaseNumber);
            config.Correlate <UnableToEstimate>(m => m.CaseNumber, d => d.CaseNumber);
            config.Correlate <AwaitExternalEstimationToBeProcessed>(m => m.CaseNumber, d => d.CaseNumber);

            config.Correlate <NotificationCompleted>(m => m.CaseNumber, d => d.CaseNumber);
            config.Correlate <UnableToNotify>(m => m.CaseNumber, d => d.CaseNumber);
        }
Example #27
0
        protected override void CorrelateMessages(ICorrelationConfig <CompanySagaData> config)
        {
            config.Correlate <RegisterCompanyCommand>(
                message => message.CompanyId,
                sagaData => sagaData.CompanyId);

            config.Correlate <ImportCompanyCommand>(
                message => message.CompanyId,
                sagaData => sagaData.CompanyId);

            config.Correlate <ChangeCompanyNameCommand>(
                message => message.CompanyId,
                sagaData => sagaData.CompanyId);

            config.Correlate <ChangeCompanyLegalAddressCommand>(
                message => message.CompanyId,
                sagaData => sagaData.CompanyId);

            config.Correlate <ChangeCompanyShippingAddressCommand>(
                message => message.CompanyId,
                sagaData => sagaData.CompanyId);

            config.Correlate <ChangeCompanyBillingAddressCommand>(
                message => message.CompanyId,
                sagaData => sagaData.CompanyId);

            config.Correlate <AssociateAdministrativeContactToCompanyCommand>(
                message => message.CompanyId,
                sagaData => sagaData.CompanyId);

            config.Correlate <AssociateMainContactToCompanyCommand>(
                message => message.CompanyId,
                sagaData => sagaData.CompanyId);

            config.Correlate <ChangeCompanyContactInfoCommand>(
                message => message.CompanyId,
                sagaData => sagaData.CompanyId);

            config.Correlate <UnlistCompanyCommand>(
                message => message.CompanyId,
                sagaData => sagaData.CompanyId);
        }
Example #28
0
        protected override void CorrelateMessages(ICorrelationConfig <TaskLifecycleSagaData> config)
        {
            config.Correlate <AddTaskCommand>(
                message => message.TaskId,
                sagaData => sagaData.TaskId);

            config.Correlate <MarkTaskAsCompletedCommand>(
                message => message.TaskId,
                sagaData => sagaData.TaskId);

            config.Correlate <CancelTaskCommand>(
                message => message.TaskId,
                sagaData => sagaData.TaskId);

            config.Correlate <UpdateTaskCommand>(
                message => message.TaskId,
                sagaData => sagaData.TaskId);

            config.Correlate <TaskCompletedEvent>(
                message => message.TaskId,
                sagaData => sagaData.TaskId);
        }
Example #29
0
        protected override void CorrelateMessages(ICorrelationConfig <TaskLifecycleSagaData> config)
        {
            config.Correlate <CreateTaskCommand>(
                message => message.TaskId,
                sagaData => sagaData.TaskId);

            config.Correlate <MarkTaskAsCompletedCommand>(
                message => message.TaskId,
                sagaData => sagaData.TaskId);

            config.Correlate <CancelTaskCommand>(
                message => message.TaskId,
                sagaData => sagaData.TaskId);

            config.Correlate <RenameTaskCommand>(
                message => message.TaskId,
                sagaData => sagaData.TaskId);

            config.Correlate <ReactivateTaskCommand>(
                message => message.TaskId,
                sagaData => sagaData.TaskId);

            config.Correlate <SetTaskDueDateCommand>(
                message => message.TaskId,
                sagaData => sagaData.TaskId);

            config.Correlate <RemoveTaskDueDateCommand>(
                message => message.TaskId,
                sagaData => sagaData.TaskId);

            config.Correlate <TaskCompletedEvent>(
                message => message.TaskId,
                sagaData => sagaData.TaskId);

            config.Correlate <TaskCreatedTimeout>(
                message => message.TaskId,
                sagaData => sagaData.TaskId);
        }
Example #30
0
 protected override void CorrelateMessages(ICorrelationConfig <MySagaData> config)
 {
     config.Correlate <Message2>(m => m.CorrelationId, d => d.CorrelationProperty1);
 }