Skip to content

Status of SubscriptionRequest is not considered when Notifications for LogisticsObjet Update is setup

After a LogisticsObject has been created or updated, Notifications are sent out. This also includes collecting all subscriptions that are interested in this data update. However, it seems that the status of SubscriptionRequest (as wrapper of a Subscription) is not checked for being RequestStatus.REQUEST_ACCEPTED. As a result, Notifications are sent to requested subscribers even if SubscriptionRequests are rejected ore revoked.

Problem: SubscriptionRepository#getAcceptedSubscriptions does not check https://onerecord.iata.org/ns/api#hasRequestStatus == https://onerecord.iata.org/ns/api#REQUEST_ACCEPTED

see https://git.openlogisticsfoundation.org/wg-digitalaircargo/ne-one/-/blob/cd8814f10398dbabe58deeedef9d36ba12d175fc/src/main/java/org/openlogisticsfoundation/neone/repository/SubscriptionRepository.java#L94

To reproduce: Precondition: Ensure that ActionRequestClient does not approve ActionRequest, e.g. by increasing action-request.evaluation.interval=60m

  1. POST /subscription As non-dataholder request subscription with "api:hasTopicType": { "@id": "api:LOGISTICS_OBJECT_IDENTIFIER" } and "api:hasTopic": ...
  2. POST /logistics-objects Create LogisticsObject