Page:
Code-Flow-&-Logic-Understanding
Pages
--How-OrderLineProduct-and-OrderLine-works-when-an-order-is-created.
--Setting-Up-eStack-using-Linux-Ubuntu-18.04
--Step-to-Push-Code-to-Production-and-Install-Packages
AMAZON-MULTI-CHANNEL-FULFILLMENT
Amazon-SP-API-Steps-involved-in-fetching-reports-and-persisting-orders-in-the-system-using-Job-Queues
Amazon-SP-API-integration-and-Reports-fetchings-and-persisting
Amazon-SPI-API-(Notes,-Links,-How-To)
Bulk-SKU-Creation-Upload-Bug-(UTF-8-csv-format)-and-Steps-to-fix-that-through-SQL-Commands
Code-Flow-&-Logic-Understanding
Composer-Noted-&-Troubleshooting
DHL-eCommerce-Asia-API-Integration
Database-Backup
Delete-eStack-Instance
GitLab-Updates
Inventory-Location-Table
Misc-Notes-Regarding-New-or-Updating-SSH-Keys
Order/Order-and-Shipment-LifeCycle
Order-Statuses-and-Shipping-Types-and-Statuses
Postage-Classes,-Shipping-Classes,-Your-Packaging,-and-Shipping-Rules
Query-for-fetching-Order-Tax-Details
Roadmap-to-SaaS-1.0-August-1,-2021-Meeting-of-the-Minds
Rotate-Login-with-Amazon-SP-API-credentials-(Client-Secret)
SSL-Certificate-&-Installation
Setting-Up-eStack-using-Windows-10
ShipStation-Integration
docs-infinite-inventory
double-entry-warehouse-management
eStack-Backend-Instance-&-Customer-Management-Console
eStack-Dashboard
improved-user-driven-background-tasks
product-sku-model
Clone
1
Code-Flow-&-Logic-Understanding
rob edited this page 2026-06-29 09:04:47 +00:00
Table of Contents
First let's try to understand how Pick and Pack flow works thoroughly
- Select shipments to Process through EasyPost and generate Labels
- After submission code executes one command-line bin/pms3 bg create print-job
- After executing the above command, the system tracks its Process ID, and code redirects users to another page where that Process ID is passed to page named bg-monitor where the progress bar displays, This page is only to display progress bar, nothing is happening in that page. That progress bar fetches the status of progress from Redis key/value pairs.
- The command which is executed on the second line mainly works behind the scene to create print-jobs and keeps updating the status in Redis which is displayed on the progress bar.
- When command executes in the background, it further calls a Background Task GeneratePickListTask and all required services are passed as parameters to that task. Following is the code snippet of same.
$task = new GeneratePickListTask($redis, $em, $shipmentLifecycle, $printService);
- Generate PickList has one Method name run, which executes and actually updates the status inside the Redis. This Run method further calls Services required for the specific task in this case it is calling makeLabelForShipment from labelGenerator Service.