Reward pathway sequence of events
Essentially that's what I remember, but there can be a lot more steps between A and C, i.e. more pathways interacting in different systems to produce an associative memory. Pavlov's dogs is the classic example:

1: Pavlov rings bell, dogs hear bell

2: Pavlov feeds dogs, (dogs rewarded)

3: Repeat 1 and 2 for a few days.

4: Ring bell, dogs will salivate and expect food, even if no food is on the way.

So, in the skull, the dogs are making a link between hearing a bell and a reward.

Dopamine is released at dopaminergic synapses, the limbic system is probably the best understood part of the memory/reward system, particularly the mesolimbic pathway for reward.

Neurons get triggered by presynaptic neurotransmitters, some require convergence of signals to reach threshold and trigger an action potential. Connections are strengthened by long-term potentiation, which has been argued to be the basis for memories, but that's a massive topic I'm not qualified to discuss.

I haven't heard of the "error prediction signal" before, might be a new discovery/thinking that I'm a bit behind on.