Skip to content
Bill Fenner edited this page Aug 30, 2018 · 1 revision

The baby_steps module is designed to break SET processing within the agent into small manageable steps. Thus consistency can be checked for various types of data checks to ensure the transaction is valid before proceeding to the next step.

It is described by it's ascii diagram in the source file:

   /*     ***********************************************************************     * Baby Steps Flow Chart (2004.06.05)                                  *     *                                                                     *     * +--------------+    +================+    U = unconditional path    *     * |optional state|    ||required state||    S = path for success      *     * +--------------+    +================+    E = path for error        *     ***********************************************************************     *     *                        +--------------+     *                        |     pre      |     *                        |   request    |     *                        +--------------+     *                               | U     * +-------------+        +==============+     * |    row    |f|<-------||  object    ||     * |  create   |1|      E ||  lookup    ||     * +-------------+        +==============+     *     E |   | S                 | S     *       |   +------------------>|     *       |                +==============+     *       |              E ||   check    ||     *       |<---------------||   values   ||     *       |                +==============+     *       |                       | S     *       |                +==============+     *       |       +<-------||   undo     ||     *       |       |      E ||   setup    ||     *       |       |        +==============+     *       |       |               | S     *       |       |        +==============+     *       |       |        ||    set     ||-------------------------->+     *       |       |        ||   value    || E                         |     *       |       |        +==============+                           |     *       |       |               | S                                 |     *       |       |        +--------------+                           |     *       |       |        |    check     |-------------------------->|     *       |       |        |  consistency | E                         |     *       |       |        +--------------+                           |     *       |       |               | S                                 |     *       |       |        +==============+         +==============+  |     *       |       |        ||   commit   ||-------->||     undo   ||  |     *       |       |        ||            || E       ||    commit  ||  |     *       |       |        +==============+         +==============+  |     *       |       |               | S                     U |<--------+     *       |       |        +--------------+         +==============+     *       |       |        | irreversible |         ||    undo    ||     *       |       |        |    commit    |         ||     set    ||     *       |       |        +--------------+         +==============+     *       |       |               | U                     U |     *       |       +-------------->|<------------------------+     *       |                +==============+     *       |                ||   undo     ||     *       |                ||  cleanup   ||     *       |                +==============+     *       +---------------------->| U     *                               |     *                          (err && f1)------------------->+     *                               |                         |     *                        +--------------+         +--------------+     *                        |    post      |<--------|      row     |     *                        |   request    |       U |    release   |     *                        +--------------+         +--------------+     *     */

Clone this wiki locally