Never mind; this was a DUH moment. I forgot to add the
CorrelatedBy<Guid> interface to the start message. Couldn't see the
forest for the trees.
*sigh*
Symon.
On Jul 6, 3:22 pm, Symon Rottem <
s.rot...@gmail.com> wrote:
> I'm getting an error while trying to set up my first saga and I'm not sure I
> understand what the error is saying.
>
> The saga is a state machine which begins as follows:
>
> Define(() =>
> {
> Initially(
> When(Start)
> .Then((saga, message) => saga.Initialize(message))
>
> ...
>
> There's a state defined...
>
> public static State Initial { get; set; }
>
> ..and an event...
>
> public static Event<StartJob> Start { get; set; }
>
> ...and the corresponding method...
>
> public void Initialize(StartJob message)
> {
>
> }
>
> ..so I would have thought everything was OK. The exception thrown is:
>
> MassTransit.Exceptions.ConfigurationException
> *Failed to create the saga connector for Agent.JobSaga*
> at
> MassTransit.Saga.SubscriptionConnectors.SagaConnector`1..ctor(ISagaReposito ry`1
> sagaRepository) in
> d:\Home\MassTransit\src\MassTransit\Saga\SubscriptionConnectors\SagaConnect or.cs:line
> 57
> at
> MassTransit.SagaSubscriptionConfiguratorExtensions.SubscribeSaga[T](IServic eBus
> bus, ISagaRepository`1 sagaRepository) in
> d:\Home\MassTransit\src\MassTransit\Saga\Configuration\SagaSubscriptionConf iguratorExtensions.cs:line
> 55
> at Agent.JobProcessingService.Start() in
> E:\Source\JobProcessingService.cs:line 31
> at Agent.Program.<>c__DisplayClass8.<Main>b__6(JobProcessingService o) in
> E:\Source\Program.cs:line 74
> at Topshelf.Builders.LocalServiceBuilder`1.StartService(T service) in
> d:\BuildAgent-01\work\799c08e77fef999d\src\Topshelf\Config\Builders\LocalSe rviceBuilder.cs:line
> 65
> HelpLink:
>
> System.NotSupportedException
> *No method to connect to event was found for Messages.StartJob*
> at
> MassTransit.Saga.SubscriptionConnectors.SagaEventConnectorFactory`2.<Create >d__0.MoveNext()
> in
> d:\Home\MassTransit\src\MassTransit\Saga\SubscriptionConnectors\SagaEventCo nnectorFactory.cs:line
> 66
> at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
> at System.Linq.Enumerable.<ConcatIterator>d__71`1.MoveNext()
> at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
> at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
> at
> MassTransit.Saga.SubscriptionConnectors.SagaConnector`1..ctor(ISagaReposito ry`1
> sagaRepository) in
> d:\Home\MassTransit\src\MassTransit\Saga\SubscriptionConnectors\SagaConnect or.cs:line