Using the Workflow component for e-commerce
summary
Built an order API for the biggest Swiss retailer using the Symfony workflow component as a state machine with explicit state transitions (open confirmed assigned picked up delivered plus cancelled variants). Implementation ties guard and enter/leave events to event‑driven listeners which recalc prices, revoke notifications, queue push/SMS and handle refunds. Pickers typically claim orders within two minutes. Result is clearer error messages, machine‑readable workflow docs and a scalable queue that actually works for high notification volume.
AI-written summary · about
chapters (13)
- 0:00Start
- 0:43This talk assumes little knowledge
- 1:48Michelle Sanver Colour and code addict
- 5:37Handling a large amount of SMS and Push notifications
- 9:55The Order State Machine
- 10:333. User sets delivery address on order
- 11:169. Card gets charged for order, picker gets paid
- 24:16Order API Challenges Solved
- 24:30Keeping orders/prices up to date
- 27:04Handling cancellation of an order
- 29:22Conclusion
- 29:42State machines make business logic explicit
- 30:00Writing Good Code
related talks
35mThe Symfony Workflow Component Is Graphically Great!
41mKnowing your state machines
27mReliable Service Integration
45mMessy data != Messy code
43mAsync with Messenger, AMQP and Mercure
35mMaximize Performance: Asynchronous PHP Explained!
23mSymfony Messenger: Messages, Queues, Workers and more
25mDapr Workflows: The Key to Simplifying Business Process Orchestration
