erasmus-without-paper / ewp-specs-api-iias

Specifications of EWP's Interinstitutional Agreements API.
MIT License
4 stars 13 forks source link

Scenario 7: IIA-CNR and IIA Approval CNR at the same time? #171

Closed demilatof closed 5 months ago

demilatof commented 5 months ago

The scenarios are represented as if the EWP communication were a synchronous finite state machine, but this is not the real world.

In particular the scenario, "7. Create, Unil. Appr., Del. x2" (rows from 17 to 23) supposes that B sends first the IIA CNR, then wait for A's IIA Get and only at the end deletes the IIA Approval and sends IIA Approval CNR.

But in the real world B deletes at the same time IIA and IIA Approval, therefore what B should do is: sending IIA CNR and immediately after sending IIA Approval CNR; but they can arrive to the partner in the reverse order or not arrive (at all or one of them).

The doubt is: are all of the partners able to manage the reception at almost the same time of the notifications listed here after?

  1. IIA CNR immediately followed by IIA Approval CNR
  2. IIA Approval CNR immediately followed by IIA CNR
  3. IIA CNR (IIA Approval CNR missed)
  4. IIA Approval CNR (IIA CNR missed)
  5. both of them missed (this should be the ordinary)

PS: I would skip this part, but since the testing session with Dashboard considers the deletion, this is the correct implementations for my system: if I delete, I delete all items at the same time

janinamincer-daszkiewicz commented 5 months ago

The scenarios are represented as if the EWP communication were a synchronous finite state machine, but this is not the real world.

The Excel file shows only a subset of all possible scenarios. There are many (although countably many) possible interleaving executions of these two sequences of events (one by A and one by B).

In particular the scenario, "7. Create, Unil. Appr., Del. x2" (rows from 17 to 23) supposes that B sends first the IIA CNR, then wait for A's IIA Get and only at the end deletes the IIA Approval and sends IIA Approval CNR.

B does not (intentionally) wait for A's IIA Get, B does not HAVE to wait for A's IIA GET, B can proceed immediately. The behaviour of A will not change.

The doubt is: are all of the partners able to manage the reception at almost the same time of the notifications listed here after?

I hope so :)

IIA CNR immediately followed by IIA Approval CNR IIA Approval CNR immediately followed by IIA CNR IIA CNR (IIA Approval CNR missed) IIA Approval CNR (IIA CNR missed) both of them missed (this should be the ordinary)

In all these cases when A gets any CNR and sends either IIA get or IIA approval request, A will get the empty answer and will know what has happened.

If there is no CNR, A sooner or later will send IIA get to find out what has happened and will get the empty response. Our implementations should be ready for all possible interleaving executions.

demilatof commented 5 months ago

OK, many thanks for your answer and for remarking the right sequence