What life-cycle states can the IdP user pass through in the webshop scenario, and which events move it between them?
Three states: no user, private user (no company, own password) and business user (with company); self-registration, CRM creation, CRM deletion, account deletion and updates move it between them.
* A state diagram makes every entry and exit of the object explicit, including the ones nobody has decided yet. *
The transitions, with the matching state-table cases:
- No user → private user: the customer registers in the self-service (1.3).
- No user → business user: sales create a customer whose e-mail is unknown; the user is created with company and initial password (1.1).
- Private user → business user: sales create a customer whose e-mail is known; only the company is added (1.2).
- Business user → no user: sales delete the customer; the user is deleted completely.
- Private user → no user: the account is deleted through the account LCP.
- Self-loops: attribute updates by the end customer (2.1) or through the CRM (2.2).
Drawing the object's states is a strong complement to the process views because it asks a question flowcharts never ask: from every state, what can happen next? Here it exposes an undecided transition: a business user created by sales, who later tries to register in the self-service with the same e-mail. The model has to define whether that becomes "claim the existing account" or a rejected registration; leaving it open invites duplicates.
Go deeper:
State diagram (Wikipedia) — states, transitions and triggering events, including UML state machines.
UML state machine (Wikipedia) — events, guards and actions on transitions in UML notation.