Product Download
The product download flow defines the sequence used by the daemon to retrieve products from Talk2Sync and insert or update them in the external system.
The process continues until there are no additional products to insert or update. Each product is transformed and stored, and the result of the storage operation is reported back to Talk2Sync.
Download Flow
flowchart TD
A([Pull down products]) --> B{More products to insert or update?}
B -->|Yes| C[Get next product]
C --> D[Transformation and store implementation]
D --> E{Store succeeded?}
E -->|Yes| F[Notify Talk2Sync of store success]
E -->|No| G[Notify Talk2Sync of store failure]
F --> B
G --> B
B -->|No| H([End])
Process
The daemon follows these steps:
- Start the product download process.
- Check whether more products need to be inserted or updated.
- If products remain, retrieve the next product from Talk2Sync.
- Transform and store the product in the external system.
- Check whether the storage operation succeeded.
- If successful, notify Talk2Sync of the successful operation.
- If the operation fails, notify Talk2Sync of the storage failure.
- Return to the product availability check and continue processing.
- When no products remain, end the product download process.
Handling Storage Results
Each product must be processed independently. After attempting to store a product, the daemon reports the result to Talk2Sync before requesting the next product.
This allows the synchronization process to distinguish successfully stored products from products whose storage operation failed.
Next Steps
- Review Pull Products Page to retrieve products pending synchronization.
- Review Notify Product Success to report successful product storage.
- Review Notify Product Failure to report storage failures.
- Review Product Store Implementation for the transformation and storage implementation.