Barcode scanner
INTEGRATE WITH BARCODE SCANNERS
Each Shop floor viewer client that is set in "Execution mode" listens to messages of a specific topic sent on the global AVIX message bus.
The topic structure is as follows:
cmd/<workspaceid>/<lineNumber>/<workstationNumber>/open_sos
or if a resource work instruction is chosen
cmd/<workspaceid>/<lineNumber>/<workstationNumber>/<workresourceNumber>/open_sos
workspaceId
The id of the workspace the is opened on the workstation. If an id is not configured in the load_storage.xml file, a random unique Id is chosen when a storage is opened.
To resolve the correct the workspaceId a function can be invoked:
${workspace.findFirstByStorage('*industrialMetals*')
This will resolved to the workspaceId that the AVIX file (storage) that contains the string "industrialMetals" in the name.
workstationNumber
The number of the workstation
workresourceNumber
The number of the work resource
The format that expected message:
{
"type": "scannedProductInformation:v1",
"location": "", // adress of the workstation or work resource
"serialNumber": "", // serial number of the scanned product
"orderNumber": "", // order number of the scanned product
"productNumber": "", // product number
"variantString": "", // variant string
"scannedString": "" // original scanned string
}
There are multiple ways of posting a message to the AVIX message bus
JSON-RPC
There is a web service available to publish messages on the AVIX message bus
http://<server>:<port>/services/jsonrpc/eventBusServices
the method name isĀ publishMessage
Example in curl to post a message to the AVIX message bus
curl -X POST http://localhost:45500/services/jsonrpc/eventBusServices -H "Content-Type: application/json" -d "{\"jsonrpc\":\"2.0\",\"method\":\"publishMessage\",\"id\":\"\",\"params\":[\"avix-message-bus:global-message-bus:cmd/${workspace.findFirstByStorage('*industrialMetals*')}/00002/10/R1/open_sos\",{\"type\":\"scannedProductInformation:v1\",\"location\":\"\",\"serialNumber\":\"\",\"orderNumber\":\"\",\"productNumber\":\"\",\"variantString\":\"\",\"scannedString\":\"\"},\"JSONObject\"]}"
Configured Apache camel route
AVIX hosts an internal apache camel infrastructure that enable you to configure routes from many other systems and protocols
Examples are:
- MQTT
- Watch folder on disk
- JMS
A AVIX 5 client is needed to set up apache camel routes