Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Backorder Fill for BlyxNew to Visual Studio Code? Get it now.
Backorder Fill for Blyx

Backorder Fill for Blyx

Rahul Chaube

| (0) | Free
Release a backordered line only after cumulative inbound receipts satisfy its shortage.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Backorder Fill

Test your Backorder Fill project

Copy the bundled starter directory to a writable folder and open it in VS Code. Choose Tasks: Run Test Task → Blyx: Test Backorder Fill project. The task runs the batch and window regression suites against your local framework source. A failed assertion stops the task and returns a nonzero exit code. Install the general Blyx CLI to run these native tests. Blyx CLI downloads

Run Backorder Fill 0.3.1 examples

In a trusted workspace, choose Blyx: Run Installed Framework Example with Blyx Language 1.6.0 or later. Select Backorder Fill, then the starter, batch or window example. The general Blyx CLI executes a temporary copy and compares stdout with the shipped expected output. A mismatch identifies the first differing line and column. Language editor

To run the window example as a workspace task, insert Run bundled Backorder Fill window example (one task). Its source and reference output are vendor/backorder_fill/window_example.blyx and window_example.expected.txt. The batch task also remains available.

Check Backorder Fill in VS Code

This editor includes the exact Blyx framework source and its installation checks. Open a trusted desktop workspace with the general Blyx CLI, its native toolchain and a host linker available. The command below uses the general CLI's native-run command. CLI installation

  1. Create an empty .vscode/tasks.json. Choose Snippets: Fill File with Snippet and select Verify Backorder Fill (workspace tasks). If you have a tasks array already, insert the Verify bundled Backorder Fill (one task) snippet there.
  2. Choose Tasks: Run Task → Blyx: Verify bundled Backorder Fill. On success the terminal prints backorder_fill: installation checks passed. On failure the command reports the failed check and exits with code 1.
  3. To check a project copy, run nest add backorder_fill@0.3.1 and choose the installed-package task matching your project's vendor or src/vendor directory.

The extension's starter directory is also a complete project. Copy it to a writable folder, open that folder in VS Code, and choose Tasks: Run Task → Blyx: Run supplied example. Compare the terminal output with expected.txt.

blyxc native-run vendor/backorder_fill/verify_install.blyx

In a Blyx test, import vendor::backorder_fill::verification and call backorder_fill_verify_install(). The result is zero on success or the number of the first failed check. Package and source files

Southern cassowary

Release a backordered line only after cumulative inbound receipts satisfy its shortage.

Commerce and fulfillment · framework · 0.1.2

Framework bird: Southern cassowary.

Drive the workflow

Start with backorder_fill_start(). For each event call backorder_fill_step(snapshot, event, value), persist the returned snapshot, and dispatch backorder_fill_command(snapshot) to your application’s adapter. The host owns I/O, event ordering, duplicate detection and durable command delivery. A matching event produces one command. Rejected events retain the phase and saved quantity. An invalid snapshot yields an empty vector.

The snapshot contains phase ID, saved quantity and last command ID. Event values are whole numbers from zero through one billion. In the table, x is the event value and r is the saved quantity. Rules match in listed order. To validate a whole history without running effects use backorder_fill_replay(events, values). It returns the final snapshot or an empty vector on rejection.

Current phase Event Guard Next phase Command New quantity
idle shortage x>0 waiting notify_wait x
waiting receive x>0 and x<r waiting reduce_shortage r-x
waiting receive x>=r ready allocate_line 0
ready ship always closed dispatch 0
waiting cancel always closed cancel_line r

Phase IDs in order from zero: idle, waiting, ready, closed.

Replay your own events

After installing the demo, run the following from its directory. Supply alternating event names and integer values. The command prints each requested action and exits with status 1 at the first rejected transition, or 2 for malformed arguments.

blyxc native-run main.blyx -- shortage 9 receive 3 receive 8 ship 0

Run this checkout

Run blyxc native-run main.blyx to reproduce expected.txt. Run blyxc native-run checks.blyx and compare the complete output with checks-expected.txt.

Try the published project

nest demo backorder_fill@0.1.2
blyxc native-run backorder_fill-demo/main.blyx

Install with nest add backorder_fill@0.1.2 and import vendor::backorder_fill::backorder_fill.

Maintained by Rahul Chaube. Blyx · GitHub · LinkedIn · Sponsor

Editor snippets

Use this extension with the Blyx Language extension. In a .blyx file, type one of the following prefixes and invoke editor completion.

  • backorder_fill_start
  • backorder_fill_step
  • backorder_fill_command
  • backorder_fill_replay
  • use_backorder_fill
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft