Skip to main content

Automaton

I built Automaton as the solo developer to handle repetitive SAP updates and free time for other work. It combines reusable workflows, a desktop interface, and run records for reviewing outcomes and resuming supported work.

Watercolor concept illustration of input sheets leading to a browser window with a gear and a checked run journal
Concept illustration

Starting from the manual baseline

Making the same SAP change across hundreds of records means repeating a sequence of clicks, field edits, and saves by hand. Interrupted batches introduce a second problem: knowing which records already completed before deciding where to continue.

As the solo developer, I designed and implemented Automaton end to end: browser automation, reusable infrastructure, workflow adapters, the PySide6 desktop interface, run journals, and tests. As a computer science graduate, I approached the tool as a software engineering problem. My first goal was to replace manual clicking with a reliable single-browser loop that checked each record before editing and recorded every outcome.

Foundational baseline: manual effort vs. first automated loop

Per-record execution time before wait optimization or multi-worker scaling, comparing manual SAP edits with the initial single-browser driver.

Component-maintenance workflow

Seconds per outcome

Manual baseline (model rate)
90.0 s
Initial automated loop (median, p90 8.0 s)
6.0 s

Material-update workflow

Seconds per record save

Manual baseline (timed example to estimate)
38.6–108.0 s
Initial automated loop (138-row baseline)
17.5 s
Manual rates come from the project's cost-savings model (90 s per component outcome; 38.6–108 s per material save, where the shaded band spans the 38.6–108.0 s estimate range). Initial automated timings come from early single-browser run-journal cohorts (2,892 component outcomes through May 22, 2026; 138-row single-field material baseline on June 18, 2026).

Even before performance tuning, that first working loop shifted the day-to-day bottleneck. Component-maintenance rows that took roughly 90 seconds by hand finished in a 6.0-second median (8.0 s p90 across 2,892 early outcomes), and single-field material updates that took 38.6–108 seconds by hand ran in 17.5 seconds per row while freeing me from driving the browser.

Designing around what varies

Once the initial automation worked, the next challenge was supporting additional SAP workflows without duplicating browser-handling code or losing track of state when a session needed recovery.

Python and Selenium drive an existing, signed-in Chrome session, while a PySide6 desktop interface and command-line tools run the same underlying workflows. I separated workflow orchestration from browser adapters and shared infrastructure:

  • Shared browser services handle page readiness, list navigation, the record transaction loop, and session recovery.
  • Workflow adapters retain the rules for identifying records, reading current values, editing fields, and confirming each workflow’s result.
  • Run journals capture row outcomes and provide checkpoints for supported resume paths, distinguishing completed saves from skipped, failed, or interrupted steps.

01 / System structure

Separate policy from browser mechanics

  1. Operator interface / Command lineSelect the work to run.
  2. Workflow orchestrationCoordinate the record loop and workflow actions.
    Run journalsKeep recorded outcomes available for supported resume behavior.
    Record outcomes; resume supported work.
  3. Workflow adapterTranslate workflow actions into browser operations.
  4. Shared browser servicesPage readiness, record processing, and recovery.
  5. Signed-in browserInteract with the enterprise application.
  6. SAPThe system where changes are made.
Simplified runtime view. Orchestration also calls shared browser services directly. These are responsibility boundaries, not an exact import graph.

02 / Field-update decisions

Check before changing a record

  1. Read current valueInspect the field before editing.
  2. Compare with intended valueDecide whether a change is needed.

Already matches

Record skipped outcomeLeave the matching value unchanged.

Change needed

  1. EditApply the intended changes.
  2. SaveUse the workflow's save rules.
  3. Confirm workflow resultUse the checks supported by that workflow.
  4. Record outcomeWrite the result to the run journal.
Recovery is conditional

Supported recovery paths can discard a stranded draft or restore a session. Other failures stop for operator review.

Simplified field-update workflow. Save and verification rules remain specific to each workflow.

Different workflows preserve the evidence they need without forcing every operation into one recovery schema. Supported recovery paths can discard a stranded draft or restore a session, while unexpected failures stop cleanly for operator review. Business-specific field names, record identifiers, and environment details are redacted; the diagrams use generic labels to show the system structure.

Time freed as batches scaled

With reusable adapters and resumable run journals in place, Automaton moved from small runs into regular batch maintenance. The project’s savings model estimates 76–119.5 hours of manual work avoided across 4,328 recorded row outcomes from April 23 through August 3, 2026. Continued operation through November 3, 2026 reached 4,920 delivered row outcomes (2,248 component outcomes and 2,672 material saves across 724 run-journal files, corresponding to 84.9–136.4 hours under the same model).

Automaton handles the repetitive browser steps in batches, freeing time for other work while keeping outcomes available for review.

Estimated manual work avoided

76–119.5 hours

Repetitive SAP work handled by automation, freeing time for other tasks.

  • Lower estimate: 76 hours
  • Upper estimate: 119.5 hours
Based on 4,328 recorded outcomes and estimated manual effort per outcome. This estimates repetitive work avoided, not net time saved: setup, monitoring, and review time have not been deducted.

How the estimate works

The August 3 snapshot combines 2,070 component-maintenance outcomes at 90 seconds each with 2,258 material saves at 38.6–108 seconds each. The lower material rate comes from a timed example cited in the project’s report; the upper rate is a practitioner estimate.

These rates were not benchmarked against the same population. Recorded outcomes can include repeat work, so they are not a count of unique records. Setup, monitoring, and review time are not deducted. The range describes estimated repetitive manual work avoided, rather than measured net time savings.

Instrumenting and removing wasted waits

Automating the work freed my hands, but multi-hundred-record batches still took hours of wall-clock time. Before guessing at optimizations, I upgraded the run journals on July 15, 2026 from one-second timestamps to millisecond stage durations (duration_ms) across every step of a row transaction.

The stage timings confirmed that local Python logic and data structures cost only microseconds per row; wall time lived in SAP server round-trips, UI5 client re-rendering, and conservative wait gates:

  1. Tightening single-field row waits: On June 18, 2026, removing duplicate UI5 idle waits in edit and save transitions reduced a 138-row baseline from 17.5 seconds per row to 16.3 seconds. Replacing a post-expand idle wait with a targeted field-readiness gate and tightening settle thresholds brought a 121-row batch down to 11.0 seconds per row (p50; p90 12.0 s), reaching SAP’s draft-commit latency floor.
  2. Recognizing resolved blank fields: On September 10, 2026, logs from a six-field batch revealed that a pre-edit idempotency read treated a legitimately blank SAP field as if its OData binding had not finished rendering. Every blank field waited the full 8.0-second timeout and ran roughly 80 browser probes before accepting the blank value (4,056 wasted probes across 55 rows). Refining the condition to distinguish a resolved empty binding from an unrendered control cut that check to approximately 0.1 seconds and 1 probe, removing roughly 27% of total row wall time on that batch while preserving the full retry for genuinely unrendered fields.
  3. Skipping value-help waits on plain table cells: On October 21, 2026, profiling a 21-chain distribution table write (42 cells written and verified per record) showed every cell waiting for value-help suggestion popovers even on plain-text inputs and empty clears. Probing input capabilities first cut the 42-cell table write span in three steps from 42.93 seconds to 30.19 seconds, 15.78 seconds, and finally 13.54 seconds (-68.5%).

Single-worker iteration: removing redundant waits

Adding millisecond stage durations to the run journals exposed where waits were polling resolved state instead of actual SAP work.

Pre-edit readiness check on a legitimately blank field (September 10, 2026)

Time for one blank-field check

Seconds

Polled until timeout
8.0 s
Resolved blank recognized
≈0.1 s

Browser probes per check

Probes per check

Polled until timeout
≈80
Resolved blank recognized
1

Single-field material save (OPEN to SAVED)

June 18, 2026 live batches (138-row baseline to 121-row tuned cohort)

Initial single-worker baseline
17.5 s/row
Remove duplicate UI5 idle waits
16.3 s/row
Targeted readiness gate and settle tuning
11.0 s/row

21-chain distribution table write (42 cells)

October 21, 2026 live harness (scan, 42-cell write, and readback check)

Uniform value-help waits on every cell
42.93 s
Skip popover waits on plain-text inputs
30.19 s
Immediate probe on empty clears and plain inputs
13.54 s
Measurements from the project's performance lineage ledger. The blank-field readiness fix removed ~27% of total row wall time (~8.0 s of ~29.15 s/row) on a six-field batch while keeping the full 8.0 s retry when an OData binding is genuinely unrendered.

Scaling throughput with a second worker

Once single-browser waits were tuned down to SAP’s server and OData draft-commit latency floor, optimizing a single tab had diminishing returns. A single SAP Fiori tab must walk records serially because it shares object-page state and active drafts. When batches grew to 890, 1,188, and 1,513 materials, single-worker runs still spanned a full workday.

To reduce overall time to completion, I added a coordinated two-worker mode (--workers) built around two fixed, cross-process Chrome sessions on ports 9222 and 9223.

A Selenium-free parent coordinator preflights both browser endpoints, confirms both tabs are authenticated against the same target SAP environment, and compiles a deduplicated material scope with a SHA-256 digest. Instead of a static 50/50 split that could leave half a batch waiting behind one slow browser or session heal, the coordinator distributes work in 60% / 25% / 15% waves, dealing queued slices to whichever worker finishes first.

Scaling throughput: one worker vs. two coordinated workers

Once single-tab waits reached SAP's server draft-commit floor, adding a second isolated Chrome worker cut batch completion time by more than half.

21-chain distribution updates (1,513-material batch)

July 20–23, 2026 live migration across 16 seeded chunks

Effective seconds per material (lower is faster)

1 worker (Chunks 1–12, single browser)
≈45.0 s/row
2 workers (Chunks 11-remainder–16, ~2.3× throughput)
≈24.0 s/row

Object-field updates (1,188-material production batch)

August 5–6, 2026 single-worker baseline vs. 12-chunk 2-worker run

Batch completion time and per-material rate

1 worker rate (24.9 s/material, ~145/hr → ~8.2 hrs for 1,188)
24.9 s/row
2 workers chunked (9.7 s/material, ~373/hr → 3.2 hrs for 1,188)
9.7 s/row

How the two-worker coordinator keeps concurrent runs safe

  • 60% / 25% / 15% dynamic wave balancingDeals 60% of the validated scope first (for example, 267 + 267 of 890 materials) and hands queued 25% and 15% slices to whichever worker finishes first, finishing that 890-material run at 444 and 446 in 2h 42m.
  • Disjoint partitions & isolated journalsEnforces non-overlapping material sets before launch and binds Worker 1 (port 9222) and Worker 2 (port 9223) to separate worker-1/ and worker-2/ run-journal directories so sessions never collide on SAP drafts or files.
  • Manifest-based resumeVerifies the SHA-256 input digest and prunes each worker's partition against its own checkpointed SAVED and skipped outcomes without re-splitting the batch.
Measured from live single-worker and two-worker (--workers) batch logs. Worker count is structurally fixed at two independent Chrome profiles (~1.4 GiB memory each) to double throughput while keeping workstation memory and authenticated sessions bounded.

On a live 1,513-material distribution-chain batch (July 20–23, 2026), switching mid-batch from one worker to two workers reduced effective wall time from approximately 45 seconds per row to 24 seconds per row (~2.3× effective throughput). On a 1,188-material object-field production batch (August 6, 2026), two chunked workers averaged 9.7 seconds per material (~373 materials/hour) compared with the 24.9-second single-worker baseline (~145 materials/hour), completing the batch in 3.2 hours instead of an estimated 8.2 hours (2.57× throughput).

Correctness, verification, and takeaway

Moving faster and coordinating two concurrent workers only helps if every write remains trustworthy and auditable:

  • Offline tests exercise input canonicalization, partition disjointness, workflow logic, journal replay, and desktop interface behavior using sanitized traces and fakes without a live SAP connection.
  • Separate live checks use --single canary smokes before batch launch and --verify-only readback passes afterward to confirm that SAP displayed the expected screen and persisted the intended values.

Treating Automaton as an evolving engineering system turned multi-day manual maintenance into predictable, resumable runs. Starting with a working baseline, separating workflow rules from shared browser mechanics, instrumenting millisecond stage timings before optimizing waits, and scaling out to a two-worker coordinator with strict partition and journal boundaries made each improvement measurable and safe to operate.