I currently have a c# process detailed below
- User places item on scale (sees weight through UI)
- User clicks print on UI.
- Webservice is called. 3a. Webservice inserts into db (transaction). 3b. Connects to zebra printer checks the printer status and sends zpl data string. 3c. Closes the connection to the printer. 3d. Persist to DB if no errors and returns from Webservice call.
The issues is that this is a face paced environment and this process needs to take less than a few seconds (which it was doing). Also there are times were the connection to printer fails.
I am thinking of changing the code so that the UI opens a connection to the printer when the application is run (in the morning) and change the process such that:
- User starts application and a connection to the printer is established. (TCP/IP) 2 User places item on scale (sees weight through UI)
- User clicks print on UI.
- UI uses connection in step one and prints. If print is successful.
- Webservice is called. 3a. Webservice inserts into db (transaction).
- At end of shift close the connection to the printer and clean up.
Note the printer is only connected to this scale and not used by another process.