Actors
- Engineer or product user submitting a part
- Exception reviewer
- Rule steward proposing changes
- Rule approver
- PLM integration service
- Operations and audit staff
FACTORY DESK / MOCK 07
Design a guided part-intake application with live validation, editable governance rules, human exception review, and reliable creation in an existing PLM system of record.
OPENING PROMPT
Read this once, then begin aloud. Spend the first two minutes establishing contract, actors, risk and what must remain authoritative.
Design PartFlow, a front end to an existing Product Lifecycle Management system. It guides 1,200 users through part and model-number intake, validates entries against an administrator-editable rulebook while typing, automatically approves compliant requests, routes exceptions to reviewers with evidence, and creates approved parts in the PLM. The PLM remains the source of record.
Separate deterministic, versioned rule evaluation from workflow and from the unreliable PLM integration. Approval freezes an input and rule version; an idempotent outbox/saga creates the PLM record without pretending a remote API call shares our transaction.
REQUIREMENTS
These are supplied mock numbers for sizing and follow-ups. Say your assumptions before using them.
HIGH-LEVEL DESIGN
Name the authoritative state, derived projections, asynchronous boundaries and the exact point where a business decision becomes durable.
STORAGE + ACCESS
The table is logical, not a mandate for one database. Choose physical stores after access patterns, transactions, retention and rebuildability are clear.
| Entity | Primary / unique key | Important fields and purpose |
|---|---|---|
| Submission |
(tenant_id, submission_id)
|
workflow_type, applicant, payload_version, state, row_version |
| SubmissionRevision |
(submission_id, revision)
|
canonical_payload, content_hash, created_by, created_at |
| Rule |
(tenant_id, rule_id)
|
name, owner, severity, lifecycle_state |
| RuleVersion |
(rule_id, version)
|
dsl_ast, effective_from/to, bundle_id, tests, approvals |
| Evaluation |
(submission_revision, bundle_id)
|
facts_hash, result, violations, trace_hash |
| ReviewTask |
(queue_id, task_id)
|
submission_revision, lease_owner, SLA, state, decision |
| PLMCommand |
(tenant_id, command_id)
|
submission_id, business_key, payload_hash, state, attempts |
| PLMMapping |
(tenant_id, submission_id)
|
plm_part_id, plm_version, reconciled_at |
GET /v1/forms/{workflow}?context=
Versioned schema, dictionaries and safe local rules
200 {schemaVersion,bundleId}POST /v1/validations
Canonical draft + bundle or latest-approved context
200 {violations,traceHash}POST /v1/submissions
Idempotency key + payload/schema versions
201 {submissionId,state}POST /v1/submissions/{id}/submit
Expected revision + frozen rule bundle
202 {evaluationId,state}POST /v1/reviews/{id}/decision
Approve, return, reject; expected task version
200 / 409POST /v1/rules/{id}/publish
Tests + impact simulation + approvals
201 {ruleVersion,bundleId}00:00 → 30:00
Answers are written in a speakable first-person style. Turn on Practice Mode to hide them, answer aloud, then reveal one at a time.
Candidate · clear top-down answerThe existing PLM system remains the owner of released part IDs. PartFlow owns forms, validation evidence, and approvals. A submission moves through draft, validation, approval or review, one safe PLM create request, and a final cross-check.
Why this mattersThis gives the interviewer a map before any boxes appear, and it makes the system's most important trust decision explicit.
Candidate · clear top-down answerVersion one has six forms, live field feedback, final server checks, automatic approval for safe cases, human exception review, controlled rule changes, and PLM creation. A warning may pass; a blocking error needs review or correction.
Why this mattersA narrow first release keeps the design realistic. It also shows which tempting features can wait without weakening the core product.
Candidate · clear top-down answerThe request rate is modest. Human review is the real capacity risk: 10,000 submissions with 20% review and eight minutes each need about 267 hours a month before coverage and rework. That tells us to track queue age and safe auto-approval.
Why this mattersThe calculation is not about perfect forecasting. It identifies the part most likely to run out of capacity or delay users.
Candidate · clear top-down answerThe main records are submission, fixed submitted revision, rule and rule version, approved rule bundle, evaluation, review task, PLM command, and PLM ID mapping. Every final decision points to the exact submitted data and exact rules used. The common reads are a user's drafts, a reviewer's queue, every decision for one revision, and the PLM result for one submission. Those access paths guide the indexes.
Why this mattersA small set of records is easier to reason about. Exact versions keep later changes from silently rewriting an earlier decision.
Candidate · clear top-down answerRules use a small restricted language, not arbitrary JavaScript. Each rule names its inputs, condition, severity, message, start and end dates, and stable ID. It cannot call the network, read secrets, or loop forever. The browser may run the same safe rules for quick hints, but the server reruns them against fresh PLM facts and makes the final decision.
Why this mattersA restricted language is easier to test, compare, and run safely than arbitrary code. Browser feedback stays helpful without becoming the approval authority.
Candidate · clear top-down answerOn submit, the server freezes the form, picks the approved rules, fetches needed PLM facts, and stores the evaluation with their versions. If it passes, one database transaction records approval and a pending PLM command. A worker sends that command afterward with one stable submission reference. The user sees progress, not a browser request waiting on PLM.
Why this mattersTracing one real request proves the boxes connect. It also exposes where we acknowledge success and where a retry may begin.
Candidate · clear top-down answerA rule change is treated like a software release. Check its types, test examples, run it on recent safe data, and show how many cases would change by form and severity. Require a second person to approve the exact bundle. Start it with a small group, monitor approval and review rates, and keep the previous bundle ready for one-step rollback.
Why this mattersThe deep dive starts only after the basic path is clear. Use one concrete example, then state the speed-versus-correctness choice.
Candidate · clear top-down answerWe cannot make one database transaction cover our database and PLM. Instead, save approval and a pending command together. The worker sends a unique submission reference. After a timeout, look up that reference before ever trying another create.
Why this mattersThe database protects our intent, while the unique reference reveals the outside result. Lookup-before-retry prevents two released parts after an uncertain timeout.
Candidate · clear top-down answerFinal submission, review, and rule publishing need the newest confirmed value. Live hints may be slightly old but must show rule and PLM-data freshness. Repeated submit clicks and worker retries are safe because they reuse stable keys. Separate queues and per-customer limits protect live validation from imports, rule replays, and a slow PLM connection.
Why this mattersUse immediate agreement only for decisions that cannot be ambiguous. Let rebuildable views catch up and always show their freshness.
Candidate · clear top-down answerA timeout does not mean PLM failed. Mark the result unknown and look up the unique reference. If the part exists, verify it and finish. Retry creation only after PLM clearly says it does not exist and enough time has passed.
Why this mattersA failure answer should name the uncertain state first. Then explain how the system learns the truth before it repeats an action.
Candidate · clear top-down answerA review task points to one fixed submission revision and evaluation. Later user edits create a new draft and cannot change the case under review. The review decision checks a version number so two reviewers cannot silently overwrite each other.
Why this mattersReview must cover exact submitted data. Fixed revisions and a version check turn simultaneous reviewer actions into a visible conflict instead of lost work.
Candidate · clear top-down answerMonitor approval and review rates for every rule bundle. If one bundle suddenly sends 70% to review, stop using it for new submissions, restore the last good bundle, preserve affected decisions, and investigate before replaying anything.
Why this mattersRule versions make rollback precise. Existing decisions keep their original evidence, while only new or explicitly replayed submissions use the repaired bundle.
Candidate · clear top-down answerEvery database row, cache key, queue message, and object path includes the customer ID. Separate rule authors from publishers. Keep PLM secrets in a secret store, give workers short-lived access to one command, block network calls from rule code, and keep part data out of general logs. Reviewers may see only the product groups assigned to them.
Why this mattersSecurity belongs in keys, tokens, workers, and logs. It is not a single box added to the diagram at the end.
Candidate · clear top-down answerMeasure validation speed, browser/server disagreement, auto-approval, queue age, reviewer changes, PLM command age, duplicate prevention, and rule impact. Trace one submission from form through rules, review, command, and PLM ID.
Why this mattersMetrics should cover user speed, system safety, and result quality. Rollout starts read-only and earns stronger automation with evidence.
Candidate · clear top-down answerStart read-only, then one low-risk form with every result reviewed, then safe auto-approval, and only then PLM writes for a small group. A restricted rule language is less flexible, but much safer to test and operate.
Why this mattersEvery design choice has a cost. Name the simpler alternative and explain which requirement makes the added complexity worth it.
Candidate · clear top-down answerIn short: PartFlow owns guided intake and evidence; PLM owns released part identity. Freeze each submission, run one approved rule bundle, review exceptions on fixed data, and create the PLM part through a lookup-before-retry workflow.
Why this mattersThe recap should repeat the user flow, the main trust rule, the hardest failure, and the most important trade-off—not every component.
DOMAIN DEPTH
These mechanisms are the interview’s differentiators. Be able to redraw each from memory and defend its failure behavior.
Treat editable validation logic like production code: typed, tested, simulated, approved, versioned, reversible and observable.
Approval is local; PLM creation is an asynchronous external fact. The state machine tells the truth through timeouts.
FAILURE MATRIX
When the interviewer injects a fault, restate the violated assumption, change state or protocol, and name the new invariant.
| Injection | Recovery mechanism | Tempting wrong answer |
|---|---|---|
| 01PLM timeout | Unknown state + lookup-before-retry | Blind duplicate create |
| 02Bad rule bundle | Runtime rate guard + fallback | Queue overload |
| 03Stale draft review | Decision pins immutable revision | Approve changed data |
| 04Duplicate submit | Idempotency + content hash | Two commands |
| 05Fact cache stale | Fresh critical checks at submit | Trust TTL blindly |
| 06Reconciler mismatch | Quarantine and operator evidence | Overwrite PLM |
BOTEC
Use orders of magnitude to expose the bottleneck. State what this simple model omits.
INTERACTIVE SCENARIO
See how auto-approval and review duration translate into monthly human capacity.
OPERATIONS + DELIVERY
A system is incomplete without observable user outcomes, staged deployment, rollback and an answer to “how will we know?”
INTERVIEWER TRAPS
Use these as flash cards. The right column is the compact sentence you want available under pressure.
| Trap | Better move |
|---|---|
| Two systems of record | PLM owns released part identity. |
| Arbitrary rule code | Constrained typed DSL. |
| Remote call in transaction | Outbox and saga. |
| Retry timeout = create | Lookup by client reference first. |
| Latest rule on old case | Freeze bundle at submission. |
| Automation rate alone | Pair it with correction and duplicate rates. |
DEFINITIONS
Define the term, then connect it to a concrete invariant in this design. Avoid dropping vocabulary as a substitute for reasoning.
FINAL MINUTE
PartFlow owns guided intake and evidence; PLM remains authoritative for released parts. Versioned forms and a constrained deterministic DSL provide fast client hints and authoritative server validation. Submit seals an immutable revision with one approved rule bundle. Passing cases or reviewed exceptions become approval state plus an outbox command in one transaction. A lookup-before-retry saga and reconciler create exactly one PLM part despite timeouts. Rule publication uses tests, simulation, separation of duties and runtime guardrails. Metrics cover user latency, reviewer load and cross-system correctness.
Rehearse again