Task Review Configuration flow: what activating it does to Work Order Task closure The Field Service Quality Management plugin (sn_fsm_quality) ships a Flow Designer subflow, "Task review configuration", inactive by default. This is expected out-of-the-box behavior, not a defect. When an admin activates it, a Work Order Task (WOT) that qualifies for review is routed to a Pending Review substate on Close Complete/Incomplete, instead of closing straight to a terminal Complete substate — and a review task is created alongside it in the same transaction. APPLIES TO- Plugin: Field Service Quality Management (com.sn_fsm_quality)- Related plugin: Work Management Core (com.snc.work_management_core) — owns the base state-transition config the quality flow overlays- Tables: wm_task (Work Order Task), review_task OUT-OF-THE-BOX STATETwo flows ship with the Field Service Quality Management plugin, both inactive by default. Neither is a bug — this is the shipped state until an admin opts in. 1. Task review configuration (task_review_admin_configuration) — Subflow Decides whether a WOT qualifies for quality review, based on recent review history, work type, and contractor status.2. Auto Close Pending Work Order Task (auto_close_pending_work_order_task) — Scheduled, daily Auto-closes WOTs stuck in Pending Review for 7+ days. A separate safety net, unrelated to the mechanism below. WHAT ACTIVATING "TASK REVIEW CONFIGURATION" DOESThe eligibility check inside this subflow considers a Work Order Task's asset history: recent completed reviews in the last month, a count-of-5-or-more threshold, whether the work type is Install, and whether the task was worked by a contractor. When it returns eligible, closing the task takes a different path than a normal close: Step 1 — Technician closes the task as Close Complete.The quality plugin installs its own "Close Complete" UI action alongside the base one on wm_task. Step 2 — UI action invokes the State Flow engine.global.StateFlow().processFlow(current, <quality Close Complete config>, 'manual') Step 3 — Config record's eligibility condition runs.FSMStateFlowUtil.taskQualifiesForTaskReview(current) checks the subflow is active, then runs it. Step 4 — Subflow returns eligible.Count >= 5 recent reviews, Install work type, or contractor-worked, per its branch logic. Step 5 — FSMStateFlowController.closeCompleteTaskReviewWOT() runs.Diverts the close into a review path. The shipped config record's own comment states this directly: "When a Work order task qualifies for task review flow, a work order task closed by agent goes to 'Pending review' substate." RESULTING STATE — PRECISELY- wm_task.state -> 3 (Closed Complete). Advances unconditionally, same as a normal close.- wm_task.substate -> 30 (Pending Review), not 6 (Complete). This is the actual diversion. A review_task record is created — or, if a prior review exists in "Awaiting Information," reopened. The task genuinely closes at the state level; it simply doesn't land in the terminal substate. When a reviewer closes a Work Order Task that's in Pending Review via the "Close Task" UI action, the state-flow transition script sets wm_task.substate to Complete (6) directly and triggers the metric-update Business Rule. It then separately calls FSMReviewTaskUtil.completeReview(), which locates the matching open review_task and closes it directly — setting state = Closed, along with assigned_to, last_reviewed_on, and the WOT's description and work notes copied over.