Elffuss BraidHub

kikocis/EDC public

main · 2.0 KiBRenderedRawPermalink
1# Dataspace Protocol TransferProcess state transitions
2
3## Decision
4
5State machine for `TransferProcess` must be changed to align with the [Dataspace Protocol](https://docs.internationaldataspaces.org/communication-guide-v2-draft/overview/readme)
6
7## Rationale
8
9The [new protocol state machine](https://docs.internationaldataspaces.org/communication-guide-v2-draft/transfer-process/transfer.process.protocol)
10defines some simple and clear states that handles the lifecycle of a `TransferProcess`,
11We need to adapt the EDC `TransferProcess` state machine to fit the provisioning/deprovisioning feature in it.
12
13## Approach
14
15The "provisioning/deprovisioning" feature is not described in the protocol state machine because it is EDC custom,
16to make it fit within the state machine we could see it as a wrapping state machine section:
17
18- Provisioning
19- Protocol state machine
20- Deprovisioning
21
22Doing this the states flow will change, because currently the deprovisioning phase happens before "ENDED/CANCELLED/ERROR",
23that are the equivalent states of "COMPLETED/TERMINATED", but in fact the deprovisioning phase should happen after the
24completion or termination.
25
26Another addition needed will be to add the `*ING` states missing: `STARTING`, `COMPLETING`, `TERMINATING`, needing for
27reliability.
28
29The new states list should become like:
30```
31INITIAL(100),
32// provisioning
33PROVISIONING(200),
34PROVISIONING_REQUESTED(250),
35PROVISIONED(300),
36// protocol state machine
37REQUESTING(400),
38REQUESTED(500),
39STARTING(550),
40STARTED(600),
41SUSPENDING(650),
42SUSPENDED(700),
43COMPLETING(750),
44COMPLETED(800),
45TERMINATING(825),
46TERMINATED(850),
47// deprovisioning
48DEPROVISIONING(900),
49DEPROVISIONING_REQUESTED(950),
50DEPROVISIONED(1000),
51// old states to be deleted
52@Deprecated(since = "milestone9") ERROR(-1),
53@Deprecated(since = "milestone9") UNSAVED(0),
54@Deprecated(since = "milestone9") IN_PROGRESS(600),
55@Deprecated(since = "milestone9") STREAMING(700),
56@Deprecated(since = "milestone9") ENDED(1100),
57@Deprecated(since = "milestone9") CANCELLED(1200);
58```