Order Loading and Order Entry — Training Order System
This procedure takes a batch of customer order lines supplied in a CSV file (Orders.csv) and loads every row into a central shared work list — the Blue Prism work queue named OrdersSystem — so that each order becomes a separately tracked item of work. A second component drives the Training Order System desktop application: it signs in, keys each order's product code, quantity, unit price and cost centre, submits it, and reads back the order reference number printed on the confirmation screen. The delivered business outcome is a traceable order backlog plus orders entered into the order system with their reference numbers captured.
Important scope note before you read further: the automation as supplied contains only the loading half as a runnable process. The Training Order System steps exist as a reusable component ("Order System" object) but no process in this package calls them. Stages 6–11 below therefore document what that component does when driven, not a proven end-to-end run.
At a glance
| Trigger | Manual or scheduled start of the "Create Orders Process". The process runs Read CSV, then Add to Queue, and ends — there is no file-watch or queue-arrival trigger in the source. Not recorded in the source. |
| Frequency | Not recorded in the source |
| Systems used | Microsoft Excel (used only to read the CSV); the Orders.csv file on disk; the OrdersSystem work queue; the Training Order System Windows desktop application (process name TrainingOrderSystem) |
| Inputs | Orders.csv (first row = column headings); the CSV file path (held in a setting called [Path]); Order System user ID and password; menu option number (1, 2 or 3); per-order fields Product Code, Number Required, Unit Price, Cost Centre |
| Outputs | One queue item per CSV row in OrdersSystem; the list of queue item IDs the system generates; Order Reference Number read from the confirmation screen; orders submitted in the Training Order System |
| Typical run | Not recorded in the source (no volume, duration or run window is stated) |
| Owner | Not recorded in the source |
Before you start
- The orders file must be in place. The file is described by the developer as "the exact csv file(Orders.csv)". Its folder is not given in the source — only that the location is held in a setting named
[Path]. Confirm with the process owner where this file is expected and that today's file has been dropped there. If the path is wrong or points at a folder rather than a file, the run stops immediately (see Exceptions). - The work queue must already exist. The developer's note is explicit: the OrdersSystem queue "has created manually". The automation does not create it. Confirm it exists and, if you are re-running, check whether previously loaded items are still sitting in it — the automation has no duplicate check.
- Excel must be installed and able to open a session on the machine running the process. Excel is opened with events/macros switched off (
Enable Events = False) so no macro or prompt fires from the file. - Training Order System access (needed only for Stages 6–11): a valid user ID and password. Where these come from — credential store, environment setting or manual entry — is not stated in the source. Both must be non-blank or the sign-in is refused before it is attempted.
- Screen-wait tolerance. All waits for Training Order System windows use a setting called
wait, default 5 seconds. On a slow machine or slow first launch, this is the number to raise.
Procedure
Stage 1 — Start a clean Excel session
- Open a fresh Excel session dedicated to this run. Developer note: "action creates instance of MS Excel VBO".
- Switch Excel events off for that session (
Enable Events = False) so the file cannot trigger macros, add-ins or dialog prompts that would stall the run. - The session is identified internally by a numeric
handle; the default value0means "the session most recently used". This matters only if you are debugging.
Stage 2 — Open the orders file
- Before opening anything, the automation checks that the Excel session handle is valid, and that the file named in
[Path]actually exists and is a file. If either check fails, then the run stops with an error and nothing is loaded — see Exceptions. - Open the CSV. Developer note: "It open orders csv file". Excel returns the workbook name it has assigned, which is retained for the next step.
Stage 3 — Read all order rows into memory
- Read the active worksheet of the opened file into an in-memory table (a grid of rows and columns; Blue Prism calls this a "collection"). The first row of the sheet is treated as the column headings and becomes the column names of that table.
- Developer note: "It collects all the row present in ordrs excel sheet and store into Data collection".
- Note the sheet is taken as whichever sheet is active — no sheet name is specified. For a single-sheet CSV this is unambiguous; if the source is ever changed to a multi-sheet workbook, this step becomes fragile.
Stage 4 — Close Excel
- Exit Excel without saving. Developer note: "It exits the opened Orders excel file". The source file is left untouched — the automation does not edit, move, archive or delete it.
Stage 5 — Load the orders into the OrdersSystem work queue
- Add every row of the in-memory table to the work queue named OrdersSystem, one queue item per row. Developer note: "It adds all the row from Data collection to OrdersSystem queue which has created manually".
- No priority, tag, status or deferral date is set — these options are left unspecified, so every item is loaded as an ordinary, immediately-available item at default priority.
- The queue returns a system-generated identifier for each item created. These are collected and held. Developer note: "Its a collection to store automated genarate id while data is successfully added in queue". The source shows nothing further being done with these IDs — they are not written to a file, report or email.
- The loading process ends here.
Stages 6–11 describe the Training Order System component. In the supplied package this component is not invoked by any process, so the link between a queue item and the keystrokes below is not evidenced in the source. Treat the field values as coming from a queue item unless the process owner confirms otherwise.
Stage 6 — Open or attach to the Training Order System
- Check whether the automation is already connected to the application.
- If already connected, then do nothing further and continue.
- If not connected, then attach to the existing application window titled "Sign in" belonging to process
TrainingOrderSystem. - If no such window exists, then launch the application and wait up to
waitseconds (default 5) for the login window to appear. If it still does not appear, the run raises "Application Not Found".
Stage 7 — Sign in
- Check that both the user ID and the password are non-blank. If either is blank, then raise "Invalid login" and stop — no attempt is made to sign in.
- Type the user ID into Input – User Name and the password into Input – Password on the Login Window.
- Press Sign In.
- Wait up to
waitseconds for the Options window. The automation simultaneously watches whether the Login Window is still on screen. - If the Login Window is still present (i.e. the sign-in was rejected), then read the on-screen error label, press OK to dismiss it, and raise an exception carrying that error text verbatim — so the operator sees the application's own wording.
- If neither window resolves within the timeout, then raise "Option window not found".
Stage 8 — Navigate to order entry
- Wait for the Options window (timeout
wait; on timeout, raise "options window is not comming"). - Check the requested menu option. Only 1, 2 or 3 are accepted. If the value is anything else, then raise "Invalid Choice" and stop.
- Type the option number into Input – Option Number and press Option Go.
- Wait for the Add New Order window. If it does not appear within
waitseconds, then raise "Input Order Window has not Appeared".
Which option number corresponds to "Add New Order" versus "View Order" is not stated in the source. Only that 1–3 are valid, and that 3 is the quit option (Stage 11). Confirm the mapping against the application before relying on a specific number.
Stage 9 — Key the order
-
Wait for the Add New Order window (on timeout, raise "New Order Window has not Appeared").
-
Enter the four order fields into their respective boxes on that window:
Field on screen Value entered Input – Product Code Product Code Input – Cost Centre Cost Centre Input – Number Required Number Required (quantity) Input – Unit Price Unit Price The values
1,2,4,5visible in the component are development placeholders, not business defaults. -
Check none of the four fields is blank. If any one of Product Code, Number Required, Unit Price or Cost Centre is empty, then raise "Text field should not be empty" and do not submit.
-
If all four are populated, then press Submit Order.
-
Wait for the Order Confirmation window. If it does not appear within
waitseconds, then raise "Order Confirmation Window not Appeared" — treat this as an order of uncertain status and check the application manually before re-keying.
Stage 10 — Capture the order reference
- Wait for the Order Confirmation window.
- Read the text of the Label – Confirmation Text on that window.
- Extract the order number from that text. The extraction is done by a calculation step named "Get Exact Number"; the exact rule it uses (e.g. which characters it strips) is not visible in the source.
- Output the result as Order Reference Number. The source shows no onward write-back, report or notification for this value.
- Press Continue to return to the menu, ready for the next order.
Stage 11 — Close down the application
- Wait for the Options window (on timeout, raise "option window error").
- Enter the quit choice into Input – Option Number.
- Check the choice equals 3. If it is not 3, then raise "enter option 3" and stop. If it is 3, then press Option Go.
- Terminate the Training Order System application.
Exceptions and recovery
| Condition | What the automation does | What a human should do |
|---|---|---|
| Excel session handle invalid / no active Excel session | Raises "Bad Handle — Handle: n does not correspond to an Excel Instance"; run aborts before any data is read | Check for orphaned Excel processes on the runtime machine, close them, re-run. Nothing was loaded, so a clean re-run is safe |
Orders.csv path does not exist or is not a file |
Raises "File Not Found — File: name does not exist or is not a file". Checked before any read, so nothing is loaded | Confirm the file has been delivered to the expected folder and that [Path] points at the file (not the folder). Re-run |
| Named workbook not found in the Excel session | Raises "Workbook Not Found". Developer note: "Thrown when a workbook name was not found" | Usually a stale/partial Excel session. Close Excel, re-run |
| Named worksheet missing when reading data | Raises "Worksheet Not Found", naming the sheet, workbook and session | Open the CSV manually and confirm it has readable content on the first/active sheet |
| No running Excel instance when attaching to one | Caught internally: if the underlying error is of type "Internal", a brand-new Excel session is created and processing continues; any other error is re-thrown | No action needed in the recovered case. If it re-throws, treat as "Bad Handle" above |
| Training Order System cannot be attached to or launched | Attempts a launch, waits for the login window, then raises "Application Not Found" | Start the application manually, confirm it reaches the "Sign in" window, then re-run. If launch is simply slow, ask the developer to raise the wait value from 5 seconds |
| User ID or password blank | Raises "Invalid login" without attempting to sign in | Check where credentials are supplied from and that they are populated |
| Sign-in rejected (Login Window still shown after Sign In) | Reads the application's own error message, presses OK, then raises an exception containing that message text | Read the quoted message — it is the application's wording (e.g. locked account, wrong password). Fix the credential and re-run |
| Options window does not appear after login | Raises "Option window not found" / "options window is not comming" | Check the application manually for an unexpected dialog; consider increasing the wait timeout |
| Menu option is not 1, 2 or 3 | Raises "Invalid Choice" | Correct the option value being supplied |
| Add New Order window does not appear | Raises "Input Order Window has not Appeared" / "New Order Window has not Appeared" | Check for a blocking dialog in the application; increase wait if the app is slow |
| Any of Product Code, Number Required, Unit Price, Cost Centre is blank | Raises "Text field should not be empty" and does not submit the order | Inspect the source row in Orders.csv / the queue item, complete the missing field, and re-present the order |
| Order Confirmation window does not appear after Submit | Raises "Order Confirmation Window not Appeared" / "Order confirmation window has not appeared" | Do not blindly re-key. Check in the application whether the order was in fact created before re-submitting, to avoid a duplicate order |
| Quit requested with a choice other than 3 | Raises "enter option 3" | Correct the quit choice value |
Data handled
| Name | What it holds | Where it comes from |
|---|---|---|
Path |
Location of the source CSV file | A configured setting; the literal value is not shown in the source |
Workbook Name |
The name Excel assigns to the opened file | Returned by Excel when the file is opened. Developer note: "Data item to store the exact csv file(Orders.csv)" |
Data |
The whole orders table read from the sheet — one row per order, column names taken from the CSV's first row | Read from the active worksheet. Developer note: "Collection in which all the excel data is stored as a form of row" |
Item IDs |
The system-generated identifier for each queue item created | Returned by the queue when rows are added. Developer note: "collection to store automated genarate id while data is successfully added in queue" |
handle |
Numeric identifier for the Excel session (default 0 = most recently used session) |
Created when the Excel session is opened |
Enable Events |
Whether Excel macros/events fire. Default False | Configured setting |
UserId, Password |
Training Order System sign-in credentials | Source not shown in the outline |
InputValue |
Menu option to select after login; only 1, 2 or 3 accepted | Supplied to the Order System component |
Product Code, Number Required, Unit Price, Cost Centre |
The four values keyed onto the Add New Order screen | Intended to come from an order row; the mapping from CSV columns is not shown. The values 1/2/4/5 present in the component are development placeholders |
Choice |
Quit option; must be 3 | Supplied to the Order System component |
Value from Label-Read Reeor |
The error text read off the Login Window when sign-in fails; re-used as the exception message | Read from the application screen |
OrderNO / Order Reference Number |
The order reference extracted from the confirmation screen text | Read from Label – Confirmation Text and trimmed by the "Get Exact Number" calculation |
wait |
Timeout in seconds for every application window wait. Default 5 | Configured setting |
Not determinable from the source
- The literal file path and folder of
Orders.csv— only the setting name[Path]is visible. - The CSV column names, and how they map onto Product Code, Number Required, Unit Price and Cost Centre.
- Whether any process actually consumes the OrdersSystem queue. The package contains only the loading process; the Order System component's pages are not called from it, so the link between a queue item and the keystrokes in Stages 6–11 is not evidenced.
- Where the Training Order System user ID and password come from (credential store, environment variable, or manual entry).
- Which menu option number is "Add New Order" versus "View Order" — only that 1, 2 and 3 are accepted, and that 3 is the quit option.
- The schedule, run window, and expected daily volume of rows/orders.
- Queue configuration: owner, priority, tags, deferral, retry limits, and whether items are marked complete or exception after entry.
- What happens downstream to the captured Order Reference Numbers — no write-back, report or notification appears in the source.
- Whether
Orders.csvis archived, moved or deleted after loading. A file-management component is present in the package but no move or delete call is made by the process. - How a duplicate load is handled if the same
Orders.csvis processed twice. - The exact rule the "Get Exact Number" calculation uses to extract the reference from the confirmation label text.
How this SOP was checked
Generated from the project's source files and audited against them. Audit verdict: minor issues, confidence high.
Covers the runnable process end-to-end and correctly: Excel instance creation with Enable Events=False, handle/file-exists pre-checks, Open Workbook from [Path], Get Worksheet As Collection (Fast) reading the active sheet with row 1 as headers, Exit without saving, and Add To Queue into 'OrdersSystem' returning Item IDs. Order System object pages (Launch/attach on 'Sign in' + TrainingOrderSystem, Log IN, Nevigate Menu, Input Order, Order Confirmation, Quit) are described with correct conditions, correct field-write-before-blank-check ordering, correct wait timeouts driven by [wait]=5, and correct exception texts. The SOP is appropriately explicit that no process invokes the Order System object, that [Path], CSV column mapping, credential source, option-number mapping and downstream use of Order Reference Number are not in the source, and that the Utility - File Management object is unused. Small gaps: the second confirmation-window wait and its exception, the separate Exit/Terminate page, and the inference of queue-item defaults.
Remaining minor notes, not corrected:
- Stage 10 — Capture the order reference, step 5; Exceptions table — Omits the second wait that follows pressing Continue. In the Order Confirmation page the source shows a second 'Wait For Order Confirmation window' (Order Confirmation Check Exists) whose timeout raises System Exception ' Option Window Error'. Neither the wait nor that message appears in the SOP. (Add: after pressing Continue, the component waits again (timeout [wait]s) on the Order Confirmation window check; on timeout it raises ' Option Window Error'. Note the check/message mismatch in the source as an ambiguity.)
- Stage 11 — Close down the application, step 4 — 'Terminate the Training Order System application' is presented as the final step of the Quit sequence. In the source Quit ends after pressing Option Go; termination lives on a separate 'Exit' page (UI Terminate) that nothing in the package chains to Quit. (Present termination as a separate available action ('Exit' — terminates the application) and state that the source does not show it being called immediately after Quit.)
- Stage 5, step 2 — States that no priority, tag, status or deferral is set and therefore items load 'as an ordinary, immediately-available item at default priority'. The outline records these Add To Queue inputs as unresolved ('?'), not as demonstrably blank; the default-priority conclusion is inference. (Say the outline does not resolve the Defer Until, Priority, Tags and Status inputs, so their values cannot be confirmed from the source.)
- Exceptions table, row 'No running Excel instance when attaching to one' — Describes the Open Instance recovery logic (catch, ExceptionType()="Internal" → Create Instance, else rethrow) as behaviour of this automation. The process's Read CSV page calls Create Instance and Open Workbook, never Open Instance/Attach, so this recovery path is unreachable in the delivered process. (Either drop the row or mark it as capability of the Excel component that this process does not exercise.)
- Before you start / Data handled ('Path', 'Enable Events') — Both are called 'configured settings'. 'Enable Events' is a process-level data item with default False; '[Path]' does not appear in the process's declared data items at all (handle, Enable Events, Workbook Name, Data, Item IDs), so its origin (environment/session variable vs. undeclared item) is unknown. (Note that [Path] is referenced by Open Workbook but is not among the process's declared data items, so where it is defined cannot be determined from the source; describe Enable Events as a process value defaulted to False.)