{
  "test_id": "ORCL.SCM.MFG.WO.CLOSE",
  "scenario_name": "Close Work Order",
  "application": "Oracle Fusion Cloud",
  "product": "SCM",
  "module": "Manufacturing",
  "process": "Close Work Order",
  "business_flow": "Plan-to-Produce",
  "scenario_type": "Positive / Functional",
  "priority": "High",
  "automation_status": "SyntraFlow Ready",
  "library": "Syntra Standard",
  "canonical_url": "https://www.syntraflow.cloud/oracle-erp-testing-tool/test-library/scm/manufacturing/work-orders/close-work-order/",
  "objective": {
    "intro": "The objective of this test is to validate closure of fully completed work orders and correct blocking of closure when incomplete operations or open material transactions exist in Oracle Fusion SCM Manufacturing.",
    "confirms": [
      "a work order with all operations complete and all material transactions closed is closed successfully, individually or as part of a batch",
      "a work order with all required components issued is eligible for closure",
      "the work order status correctly transitions to Closed once the closure action completes, including where a residual quantity remains and configuration allows it",
      "closure of a work order with incomplete operations or a pending operation is correctly blocked",
      "closure of a work order with an open material transaction, or a work order that is already Closed, is correctly blocked",
      "Oracle correctly enforces validation and security restrictions when data, configuration or authorization issues are introduced (DATA_ERROR, CONFIGURATION_ERROR, SECURITY_ERROR, EXPECTED_VALIDATION)"
    ],
    "scope_note": "This scenario covers single, batch and exception closure of work orders in Oracle Fusion SCM Manufacturing TEST/UAT environments, including residual quantity handling. Residual quantity tolerance at closure is governed by customer-specific manufacturing organization parameters — this scenario does not assume a universal closure-tolerance policy across Oracle Fusion implementations. It does not cover creation, release or completion of the work order itself, which are covered by the separate Create Work Order, Release Work Order and Complete Work Order scenarios in the same Manufacturing test library."
  },
  "preconditions": [
    "The work order exists in Oracle Fusion SCM Manufacturing with a status eligible for closure (typically Completed).",
    "All operations on the work order have been completed, or the operation status to be tested is deliberately left incomplete for negative scenarios.",
    "All material transactions associated with the work order are closed, or deliberately left open for negative scenarios.",
    "The test user has appropriate access to close work orders for the manufacturing organization.",
    "For batch closure, multiple eligible work orders are available for selection."
  ],
  "test_data": [
    {
      "field": "Work Order",
      "example": "${WORK_ORDER}"
    },
    {
      "field": "Component",
      "example": "${COMPONENT}"
    },
    {
      "field": "Operation Status",
      "example": "${OPERATION_STATUS}"
    },
    {
      "field": "Residual Quantity",
      "example": "${RESIDUAL_QUANTITY}"
    },
    {
      "field": "Material Transaction",
      "example": "${MATERIAL_TRANSACTION}"
    },
    {
      "field": "User Role",
      "example": "${USER_ROLE}"
    }
  ],
  "business_steps": [
    {
      "step_number": 1,
      "step_name": "Sign In and Navigate to Manufacturing",
      "action": "Sign in to Oracle Fusion using an authorised manufacturing test user and navigate to the Manufacturing work area.",
      "test_data": "",
      "expected_result": "The Manufacturing work area opens successfully.",
      "validation_type": "action"
    },
    {
      "step_number": 2,
      "step_name": "Navigate to the Work Order",
      "action": "Open the work order to be closed from the work order list.",
      "test_data": "${WORK_ORDER}",
      "expected_result": "The work order details page opens with the correct status, operations and material transaction detail.",
      "validation_type": "action"
    },
    {
      "step_number": 3,
      "step_name": "Verify Operations and Material Transactions Are Complete",
      "action": "Review operation status and material transaction status for the work order before attempting closure.",
      "test_data": "${OPERATION_STATUS} / ${MATERIAL_TRANSACTION}",
      "expected_result": "All operations show complete and no material transactions remain open, or the expected blocking condition is confirmed for negative scenarios.",
      "validation_type": "action",
      "note": "This single business step replaces multiple technical actions such as opening the operations list and reviewing each transaction status individually."
    },
    {
      "step_number": 4,
      "step_name": "Select Close Individually or as Part of a Batch",
      "action": "Select the work order for closure individually, or select it along with other eligible work orders and close as a batch.",
      "test_data": "${WORK_ORDER} / ${RESIDUAL_QUANTITY}",
      "expected_result": "The selected work order or work orders are correctly staged for closure.",
      "validation_type": "action"
    },
    {
      "step_number": 5,
      "step_name": "Submit the Closure",
      "action": "Submit the closure action for the selected work order or batch.",
      "test_data": "",
      "expected_result": "Oracle Fusion successfully processes the closure action without unexpected errors, or correctly returns a blocking validation for negative scenarios.",
      "validation_type": "action"
    },
    {
      "step_number": 6,
      "step_name": "Verify the Work Order Status and History",
      "action": "Reopen or refresh the work order and confirm the status and closure history.",
      "test_data": "",
      "expected_result": "The work order status correctly shows Closed only when eligible, and the closure is correctly reflected in work order history.",
      "validation_type": "business_assertion",
      "note": "This is the primary business assertion for the scenario — a work order correctly transitioning to Closed status only when eligible is the expected pass condition, not merely a successful save."
    }
  ],
  "expected_results": [
    "The work order correctly transitions to Closed status only when eligible.",
    "Closure of a work order with incomplete operations or a pending operation is correctly blocked.",
    "Closure of a work order with an open material transaction is correctly blocked.",
    "Batch closure correctly processes multiple eligible work orders in a single action.",
    "An already-closed work order is correctly rejected on a reclose attempt.",
    "Unauthorized closure is correctly blocked."
  ],
  "validation_checkpoints": [
    "Work order correctly transitions to Closed status only when eligible.",
    "Incomplete operations correctly block closure.",
    "Open material transactions correctly block closure.",
    "Batch closure correctly processes multiple eligible orders.",
    "Already-closed orders correctly rejected on reclose attempt.",
    "Unauthorized closure correctly blocked."
  ]
}
