thenativeweb / cqrs-sample

CQRS, EventSourcing, (DDDD) Sample in node.js
148 stars 50 forks source link

trying to setup saga in cqrs-sample #18

Closed pawarvijay closed 8 years ago

pawarvijay commented 8 years ago

cqrs-sample-with-saga

itemCreated.js saga is not responding

doubt's 1 : i am using onEvent in init function

is there any thing missing :>)

adrai commented 8 years ago

Probably here you have to say false: https://github.com/pawarvijay/cqrs-sample-with-saga/blob/master/saga/lib/itemCreated.js#L15

pawarvijay commented 8 years ago

still it saga dosen't reaches saga , i think need to recheck config and debug :>)

adrai commented 8 years ago

DEBUG=* node server.js

Il giorno 15-feb-2016, alle ore 20:59, vijay pawar notifications@github.com<mailto:notifications@github.com> ha scritto:

still it sagahttps://github.com/pawarvijay/cqrs-sample-with-saga/blob/master/saga/lib/itemCreated.js#l15 dosen't responds i think need to debug :>)

Reply to this email directly or view it on GitHubhttps://github.com/adrai/cqrs-sample/issues/18#issuecomment-184365913.

adrai commented 8 years ago

did you find the issue?

pawarvijay commented 8 years ago

yes i found :) ,wait i will post answer in detail

pawarvijay commented 8 years ago

Thanks :+1:

it was not issue , but some wiring mistake from my side

On debugging saga at certain point i found aggregate was undefined so

as i implemented saga in new copy of cqrs-sample repository , and aggregates with names were defined in the 'domainPath' structure and i forgot to setup these configurations for aggregate

aggregate: 'aggregate.name', in domain.defineCommand({in Domain folder aggregate: 'aggregate.name', in domain.defineEvent({ in Domain folder aggregate: 'aggregate.name', in eventDenormalizer.defineEvent({ in Host folder aggregate: 'aggregate.name', in pm.defineEvent({ in Saga folder aggregate : 'item',in defineSaga({ initemCreated.js saga

then i almost added all other configurations and it worked cqrs-sample-with-saga