Applies to version: 2021.1.x and above; author: Konrad Wojtycza
Electronic documents often contain barcodes that allow you to find the appropriate document in the system using a barcode scanner. The “Read a barcode” action is used to decrypt information saved in the barcode and transfer it to the WEBCON BPS form. The action supports a wide range of numeric and alphanumerical barcode standards such as Code 128, EAN-13, QR Code, UPC-E.
The operation of this action was presented on a simple “Barcode” workflow that contains two steps – Read a barcode and Archive.
Fig. 1. The Barcode workflow form
We have added the action to the “Read a barcode” path. The “WEBCON code” file visible on the form contains a barcode written in the Code-128 standard.
Fig. 2. Barcode in the Code-128 standard
After following the path, the barcode content was entered into the "Barcode content" text field.
Fig. 3. The form view after following the "Read a barcode" path
QR codes can also be read by the action. QR (2D) codes allow you to save more information and, unlike 1D codes, it can be read even after partial damage.
Fig. 4. Barcode read by the action
The link in the QR code form was entered into the barcode content field after following the “Read a barcode” path.
Fig. 5. The form with the barcode content read
The action was configured in the "Read a barcode" step on the "Read a barcode” path.
Fig.6. The configuration of the "Read a barcode" action
The configuration of the action is shown below:
Fig. 7. The configuration of the action
Read options
a) First run, second run, third run – set the methods for reading the barcode during subsequent steps. All these options are digital image processing methods that increase the probability of recognizing a barcode. There are several possible options:
b) Barcode read DPI – specify the resolution with which the barcode was written; correct entering a resolution increases the probability of code recognition.
c) Code template (regex) – define a regular expression based on which the selected barcodes that match the created expression will be matched from the document – e.g. the ^. * WEBCON *. $ expression will limit the reading of barcodes only to those containing the “WEBCON” text.
d) Number of starting pages to look for barcode – limiting the number of pages on which the barcodes are scanned. When a value is set to 0, the entire document is scanned.
e) Read test (using selection for the first run) – using this button allows you to test the correctness of the barcode reading. Indicate a file from which you want to read the code.
Barcode types
Select the barcode standards to be supported by the action.
Attachments:
a) Search all attachments – after selecting this field, all attachments added to the instance will be scanned.
b) Attachment name template (regex) – set the name template in the form of a regular expression based on which the appropriate attachments will be selected and scanned.
c) Field to be set – select the form field which will be filled in by the action.
d) Text to be filled in with barcode content – an additional expression that will be added to the barcode content and entered into the selected form field – e.g. Code: {CODE}.
e) Execute outside the transaction – after selecting this field, the action of reading a barcode will be executed only after the completion of the transaction including other actions defined at the same path, on the most recent version of the attachment. If the checkbox is not selected, the action will be executed on the attachment version before the modification. This option is especially important for HotMailBoxes and HotFolders if the “Add a barcode” action is defined at the start step. If the "Execution outside the transaction" field is unchecked, the system will try to execute the action on attachments that do not yet exist in the database. However, if the field is checked, the action will execute after adding the attachment to the database.
The “Read a barcode” action allows you to read the barcode content from the attachment added to the process instance and enter it on the form. The wide range of barcode standards supported by the action makes it a universal tool.