MerrionComputing / AzureFunctions-TheLongRun-Leagues

Demo code for CQRS on Event Grid
The Unlicense
15 stars 5 forks source link

Query outputs projection - no values returned #8

Closed MerrionComputing closed 5 years ago

MerrionComputing commented 5 years ago

The projection : Query_Outputs_Projection does not seem to be returning the [Targets] collection that it should be getting from the Query.OutputLocationSet event being handled.

(On running it over a query event stream that does have that event in, the collection is returned empty)

MerrionComputing commented 5 years ago

Interesting - the output location set event was not persisted to the stream (maybe not called?)


  {
    "$type": "CQRSAzure.EventSourcing.Azure.Blob.BlobBlockJsonWrappedEvent, CQRSAzure.EventSourcing.Implementation",
    "EventName": "QueryCreated",
    "Sequence": 0,
    "Version": 1,
    "Timestamp": "2019-03-04T22:23:43.0343673Z",
    "CorrelationIdentifier": "",
    "EventInstanceAsJson": {
      "$type": "TheLongRun.Common.Events.Query.QueryCreated, TheLongRun.Common",
      "QueryName": "Get League Summary",
      "Date_Logged": "2019-03-04T22:23:42.8411281Z",
      "QueryIdentifier": "53d009aa-091e-001c-62ab-afb72e001846",
      "AuthorisationToken": ""
    },
    "EventInstanceClassName": "TheLongRun.Common.Events.Query.QueryCreated"
  },
  {
    "$type": "CQRSAzure.EventSourcing.Azure.Blob.BlobBlockJsonWrappedEvent, CQRSAzure.EventSourcing.Implementation",
    "EventName": "QueryParameterValueSet",
    "Sequence": 1,
    "Version": 1,
    "Timestamp": "2019-03-04T22:23:44.5123114Z",
    "CorrelationIdentifier": "",
    "EventInstanceAsJson": {
      "$type": "TheLongRun.Common.Events.Query.QueryParameterValueSet, TheLongRun.Common",
      "Name": "League_Name",
      "Value": "New Booterstown Retirees Divisional"
    },
    "EventInstanceClassName": "TheLongRun.Common.Events.Query.QueryParameterValueSet"
  },
  {
    "$type": "CQRSAzure.EventSourcing.Azure.Blob.BlobBlockJsonWrappedEvent, CQRSAzure.EventSourcing.Implementation",
    "EventName": "ProjectionRequested",
    "Sequence": 2,
    "Version": 1,
    "Timestamp": "2019-03-04T22:23:48.5315634Z",
    "CorrelationIdentifier": "",
    "EventInstanceAsJson": {
      "$type": "TheLongRun.Common.Events.Query.ProjectionRequested, TheLongRun.Common",
      "DomainName": "Leagues",
      "AggregateType": "League",
      "AggregateInstanceKey": "New Booterstown Retirees Divisional",
      "ProjectionTypeName": "League_Summary_Information",
      "AsOfDate": null
    },
    "EventInstanceClassName": "TheLongRun.Common.Events.Query.ProjectionRequested"
  },
  {
    "$type": "CQRSAzure.EventSourcing.Azure.Blob.BlobBlockJsonWrappedEvent, CQRSAzure.EventSourcing.Implementation",
    "EventName": "ProjectionRunStarted",
    "Sequence": 3,
    "Version": 1,
    "Timestamp": "2019-03-04T22:23:55.6153335Z",
    "CorrelationIdentifier": "",
    "EventInstanceAsJson": {
      "$type": "TheLongRun.Common.Events.Query.ProjectionRunStarted, TheLongRun.Common",
      "DomainName": "Leagues",
      "AggregateType": "League",
      "AggregateInstanceKey": "New Booterstown Retirees Divisional",
      "ProjectionTypeName": "League_Summary_Information",
      "AsOfDate": "2019-03-04T22:23:55.2049776Z",
      "ProjectionRunnerIdentifier": "53d009aa-091e-001c-62ab-afb72e001846"
    },
    "EventInstanceClassName": "TheLongRun.Common.Events.Query.ProjectionRunStarted"
  },
  {
    "$type": "CQRSAzure.EventSourcing.Azure.Blob.BlobBlockJsonWrappedEvent, CQRSAzure.EventSourcing.Implementation",
    "EventName": "ProjectionValueReturned",
    "Sequence": 4,
    "Version": 1,
    "Timestamp": "2019-03-04T22:24:30.7797924Z",
    "CorrelationIdentifier": "",
    "EventInstanceAsJson": {
      "$type": "TheLongRun.Common.Events.Query.ProjectionValueReturned, TheLongRun.Common",
      "DomainName": "Leagues",
      "AggregateType": "League",
      "AggregateInstanceKey": "New Booterstown Retirees Divisional",
      "ProjectionTypeName": "League_Summary_Information",
      "AsOfDate": "0001-01-01T00:00:00",
      "ReturnedValue": {
        "Row_Number": 0,
        "Date_Incorporated": "2018-07-01T16:41:00.9584103Z",
        "Location": "",
        "Twitter_Handle": "@merrion"
      },
      "AsOfSequenceNumber": 0
    },
    "EventInstanceClassName": "TheLongRun.Common.Events.Query.ProjectionValueReturned"
  }```
MerrionComputing commented 5 years ago

Closing this and opening an issue for the real problem - no "OutputLocationSet" event was written.