FACTORY DESK / MOCK 07

PLM Rules Platform

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.

30 MINUTES 16 INTERVIEWER TURNS FULL Q & A INTERACTIVE LAB

The problem on the whiteboard

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.
Central design thesis

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.

Scope before components

These are supplied mock numbers for sizing and follow-ups. Say your assumptions before using them.

Catalog 10,000 existing parts · 1,200 users · six intake workflows
Rules 500 active validation rules · 25 rule changes/week · 12 effective contexts
Load 60 submissions/min peak · 300 live validation events/s
Experience Local/simple validation < 50 ms; server validation p95 < 300 ms
Outcome Mock baseline 80% auto-approval; no duplicate PLM part; full decision trail

Actors

  • Engineer or product user submitting a part
  • Exception reviewer
  • Rule steward proposing changes
  • Rule approver
  • PLM integration service
  • Operations and audit staff

Functional scope

  • Schema-driven guided forms and live validation
  • Versioned rule DSL, simulation and approval
  • Automatic approval and exception queues
  • Reliable PLM creation and reconciliation
  • Analytics, audit and correction workflow

Explicitly out

  • Replacing the PLM database
  • Editing released engineering geometry
  • Machine-learned auto-denial
  • Unreviewed rule publication
  • Cross-company supplier portal in v1

A traceable end-to-end path

Name the authoritative state, derived projections, asynchronous boundaries and the exact point where a business decision becomes durable.

PLM Rules Platform reference architecture Six stage architecture from Guided form through Reconcile. Guided form schema + hints Validation API deterministic facts Rule bundle effective version Approval workflow auto or human PLM outbox idempotent saga Reconcile SoR check audit · policy · metrics · lineage
01 Guided form schema + hints
02 Validation API deterministic facts
03 Rule bundle effective version
04 Approval workflow auto or human
05 PLM outbox idempotent saga
06 Reconcile SoR check

Keys that preserve history

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 / 409
POST /v1/rules/{id}/publish

Tests + impact simulation + approvals

201 {ruleVersion,bundleId}

The complete mock interview

Answers are written in a speakable first-person style. Turn on Practice Mode to hide them, answer aloud, then reveal one at a time.

INTERVIEWER

Design the application.

CANDIDATE

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.

INTERVIEWER

Clarify scope and decision semantics.

CANDIDATE

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.

INTERVIEWER

Estimate capacity and review staffing.

CANDIDATE

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.

INTERVIEWER

Data model and keys?

CANDIDATE

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.

INTERVIEWER

Describe the rule language.

CANDIDATE

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.

INTERVIEWER

Walk an auto-approved submission.

CANDIDATE

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.

INTERVIEWER

Deep dive: safely publish a rule change.

CANDIDATE

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.

INTERVIEWER

Deep dive: reliable PLM integration without distributed transactions.

CANDIDATE

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.

INTERVIEWER

Consistency, caching and backpressure?

CANDIDATE

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.

INTERVIEWER

Failure injection: PLM creates the part but your worker times out.

CANDIDATE

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.

INTERVIEWER

How does exception review avoid races?

CANDIDATE

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.

INTERVIEWER

Failure injection: a rule steward publishes a bad rule that sends 70% to review.

CANDIDATE

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.

INTERVIEWER

Security and tenant isolation?

CANDIDATE

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.

INTERVIEWER

Observability and evaluation?

CANDIDATE

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.

INTERVIEWER

Rollout and trade-offs?

CANDIDATE

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.

INTERVIEWER

Give your spoken recap.

CANDIDATE

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.

Two places to earn the strong hire

These mechanisms are the interview’s differentiators. Be able to redraw each from memory and defend its failure behavior.

01

Deep dive A · Governed rule lifecycle

Treat editable validation logic like production code: typed, tested, simulated, approved, versioned, reversible and observable.

  1. Typed constrained DSL
  2. Static conflict checks
  3. Historical impact simulation
  4. Separation-of-duties approval
  5. Immutable bundle + runtime kill switch
02

Deep dive B · PLM creation saga

Approval is local; PLM creation is an asynchronous external fact. The state machine tells the truth through timeouts.

  1. Atomic command outbox
  2. Unique client reference
  3. SENT_UNKNOWN state
  4. Lookup before create retry
  5. Scheduled bidirectional reconciliation

Revise, do not hand-wave

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

Calculate before you provision

Use orders of magnitude to expose the bottleneck. State what this simple model omits.

Review workload lab

See how auto-approval and review duration translate into monthly human capacity.

Reviewer hours / month — Change an input to recalculate.
Auto
—
Review
—
Returned
—
Created
—

Prove quality in production

A system is incomplete without observable user outcomes, staged deployment, rollback and an answer to “how will we know?”

Scoreboard

  • Validation p95 and disagreement
  • Auto-approval by workflow
  • Review queue age
  • Unknown PLM command age
  • Duplicate PLM invariant
  • Rule-bundle workload delta

Rollout ladder

  1. 01 Read-only validation mirror
  2. 02 One form; all human decisions
  3. 03 Auto-approve safe classes
  4. 04 PLM writes for canary cohort
  5. 05 Expand workflows
  6. 06 Self-service rules with guardrails

Corrections worth memorizing

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.

Vocabulary without fog

Define the term, then connect it to a concrete invariant in this design. Avoid dropping vocabulary as a substitute for reasoning.

PLM
Product Lifecycle Management system holding released part/product records.
Rule DSL
Restricted domain-specific language for deterministic validations.
Effective date
Business date range during which a rule version applies.
Saga
Sequence of local transactions and external actions with recovery states.
Outbox
Command/event written atomically with domain state, delivered later.
Idempotency
Repeated equivalent request causes one logical effect.
Reconciliation
Compare local command/mapping state to the PLM’s authoritative record.
Separation of duties
Different roles author and approve consequential changes.

Close with a decision, not a component list

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