Primefaces command button execution order (p:commandButton)

Here is the order of the actions, which will be done by clicking on p:commandButton:

  1. User clicks button
  2. onclick is fired
  3. Ajax request is prepared based on process
  4. onstart is fired
  5. Ajax request is sent
  6. actionListener is fired
  7. action is fired
  8. Ajax response is prepared based on update
  9. Ajax response is returned
  10. if HTTP response status is 200, onsuccess is fired
  11. if HTTP response status is 500, onerror is fired
  12. update is performed based on ajax response
  13. oncomplete is fired