Applying ChangeRequests ignore competing ChangeRequests
After a ChangeRequest has been accepted, e.g. by each scheduled call to the evaluatePendingActionRequests
method and associated onChangeRequestUpdated
execution, it is not checked that the revision number of the last LogisticsObject version. Therefore, multiple accepted Changes that can be applied to the same revisionNumber.
The revisionNumber is also not incremented correctly. For example, two accepted and applied ChangeRequests result in a revision number of 2, although both changes are applied. Probably, because it is not increasing the revisionNumber from the RDF store, yet increasing the revisionNumber from the Change in ChangeRequest.
Expected behaviour:
After first ActionRequest (oldest according to hasRequestedAt datetime) is applied, the following ones should be marked as api#REQUEST_FAILED
and send Notifications of NotificationEventType api#CHANGE_REQUEST_FAILED
(This could require that the ActionRequests are placed in a queue on the event bus in the order of requestedAt): extend fetchPendingActionRequests by considering the order