Generate barcode image for the text

Use this step to generate a barcode image for the text provided.

Last published at: February 13th, 2025

generateBarCode Step

Description:

The Generate Barcode workflow step generates a barcode from the supplied Barcode text. The step supports selecting a barcode type and file format, optionally adding a barcode label, positioning the text, specifying barcode dimensions, and selecting barcode and text colors. The generated barcode file path and relative file path are stored in the configured Variable or Global variables.

The Barcodes category defines this step as a Process step with two incoming and two outgoing connections.

The step supports:

  • Generating a barcode from text.
  • Selecting the barcode encoding type.
  • Optionally specifying a barcode label.
  • Selecting the generated barcode file format.
  • Controlling the barcode text location.
  • Specifying barcode height and width in pixels.
  • Storing the generated barcode file path in a Variable or Global variable.
  • Storing the generated barcode relative file path in a Variable or Global variable.
  • Selecting a barcode color.
  • Selecting a barcode text color.
  • Returning a True or False result for subsequent workflow processing.

 

Inputs

  • barCodeText – The Barcode text property specifies the text or value to encode in the barcode.
  • barCodeType – The Select barcode type property specifies the barcode encoding type to use.
  • barCodeLabel - The Barcode label property specifies optional text associated with the generated barcode.
  • fileFormat – The Select file format property specifies the file format in which the barcode image is generated.
  • textLocation – The Text location property controls the location of the barcode text.
  • height – The Barcode height (Pixels) property specifies the barcode height in pixels.
  • width – The Barcode width (Pixels) property specifies the barcode width in pixels.
  • textVarGlobal – The Variable/Global to hold barcode file path property specifies the Variable or Global variable in which the barcode file path is stored.
  • relativeVarGlobal – The Variable/Global to hold the barcode relative file path. Property specifies the Variable or Global variable in which the barcode's relative file path is stored.
  • barCodeColor - The Barcode color, default:Black property specifies the color of the generated barcode.
  • barCodeTextColor -  The Barcode text color, default:Black property specifies the color of the text associated with the barcode.
 

 

Returns

  • True – The True return path can be connected to the next workflow activity after barcode generation succeeds.
  • False – The False return path can be used for error handling or an alternate workflow path if the barcode-generation operation does not succeed.
 

 

Usage:

The Generate Barcode step is typically placed after the workflow has obtained or generated the value that needs to be encoded.

The workflow supplies the barcode text, optionally configures the barcode appearance and output format, and specifies Variables or Globals to store the resulting file paths.

A typical workflow pattern is:

Get/Build Barcode Value → Generate Barcode → Use Barcode File

The resulting file path information can then be used by later workflow steps to:

  • Process the generated barcode.
  • Include the barcode in documents.
  • Store or distribute the barcode file.
  • Associate the barcode with a workflow record.
  • Include the barcode in a notification or generated output.
  • Pass the barcode file to another workflow activity.
  • Use the barcode in document-processing automation.

 

Typical Workflow Suggestions:

Generate a Barcode from a Request ID

Use Generate Barcode when a workflow needs to create a scannable representation of a request identifier.

Example:

Get Request ID
      ↓
Generate Barcode
      ↓
Store Barcode Path
      ↓
Continue Process
The Request ID can be supplied as the Barcode text.

 

Generate a Barcode for an Order Number

An order-processing workflow can generate a barcode representing the order number.

Example:

Receive Order
      ↓
Get Order Number
      ↓
Generate Barcode
      ↓
Process Order
The generated file path can be stored in a Variable or Global for later use.

 

Generate a Barcode for a Document

Generate Barcode can be used when a workflow needs to associate a barcode with a generated or processed document.

Example:

Process Document
      ↓
Get Document ID
      ↓
Generate Barcode
      ↓
Store Barcode Path
      ↓
Document Processing
The barcode can represent an identifier associated with the document.

 

Generate a Barcode from Form Data

A workflow can use a value collected from a form as the barcode text.

Example:

Form Submission
      ↓
Retrieve Form Value
      ↓
Generate Barcode
      ↓
Create Output
This can be useful for forms containing request numbers, asset identifiers, tracking numbers, or other business references.

 

Generate a Barcode Before Document Generation

You can place Generate Barcode before a document-generation step when the barcode needs to be part of the generated output.

Example:

Get Business Data
      ↓
Generate Barcode
      ↓
Generate Document
      ↓
Store/Distribute Document
The generated barcode file path can be used by the subsequent document-processing workflow.

 

Generate a Barcode for Labels

A workflow that creates physical or electronic labels can generate barcode images from workflow data.

Example:

Retrieve Item Data
      ↓
Generate Barcode
      ↓
Generate Label
You can use the Barcode label property when accompanying text is required.

 

Generate a Barcode for Inventory Processing

An inventory workflow can generate a barcode representing an item or inventory reference.

Example:

Create Inventory Item
       ↓
Generate Barcode
       ↓
Store Barcode File
       ↓
Complete Item Setup
The generated barcode can provide an image corresponding to the workflow-generated inventory value.

 

Generate a Barcode for Asset Tracking

You can incorporate barcode generation into an asset-registration workflow.

Example:

Register Asset
      ↓
Generate Asset ID
      ↓
Generate Barcode
      ↓
Store Asset Information
The generated barcode can represent the asset identifier.

 

Generate a Barcode for Shipment Processing

A shipping workflow can generate a barcode from a shipment or tracking reference.

Example:

Prepare Shipment
      ↓
Get Shipment Reference
      ↓
Generate Barcode
      ↓
Generate Shipping Output
The resulting barcode file can then be used by downstream document or shipment-processing activities.

 

Select the Required Barcode Type

Use the Select barcode type property when the consuming scanner or business process requires a particular barcode encoding type.

A typical pattern is:

Prepare Value
      ↓
Select Barcode Type
      ↓
Generate Barcode
Verify the exact barcode type choices in the FlowWright designer because the supplied XML does not enumerate them.

 

Select the Output File Format

The Select file format property allows the generated barcode file format to be configured. The supplied definition specifies Jpeg as the default value.

Example:

Barcode Text
      ↓
Generate Barcode
      ↓
JPEG Barcode File
Select another supported format when required by the downstream process.

 

Position the Barcode Text

When a human-readable value should accompany the barcode, configure Text location.

The supplied definition specifies Below as the default text location.

Example:

Generate Barcode
      ↓
Barcode
Barcode Text
The exact available text-location options should be confirmed in the designer.

 

Configure Barcode Dimensions

Use the Barcode height (Pixels) and Barcode width (Pixels) properties when a specific image size is required.

Example:

Prepare Barcode Value
       ↓
Configure Width/Height
       ↓
Generate Barcode
Both properties are optional and have a default value of 0 in the supplied definition.

 

Customize Barcode Appearance

The step provides separate color properties for the barcode and its associated text.

Example:

Barcode Text
     ↓
Generate Barcode
     ├── Barcode Color
     └── Barcode Text Color
The XML identifies Black as the default for both color properties.

 

Store the Barcode File Path for Reuse

The generated barcode file path is stored in the configured Variable or Global variable.

Example:

Generate Barcode
       ↓
BarcodeFilePath
       ↓
Use in Subsequent Step
The step also provides a separate output for the barcode's relative file path.

 

Store Both Absolute and Relative File Information

When downstream workflow processing needs both file path forms, configure separate Variables or Globals.

Example:

Generate Barcode
       ↓
 ┌───────────────┐
 ↓               ↓
File Path     Relative Path
This allows subsequent activities to use the appropriate stored path.

 

Generate a Barcode for Notifications

A workflow can generate a barcode before creating a notification or message that references the generated file.

Example:

Process Request
      ↓
Generate Barcode
      ↓
Prepare Notification
      ↓
Send Notification
The barcode file path can be used by the downstream notification process where supported.

 

Generate Barcodes for Multiple Workflow Items

You can place Generate Barcode inside a repeated-processing pattern when each processed item needs its own barcode.

Example:

Process Item
     ↓
Generate Barcode
     ↓
Store Barcode
     ↓
Next Item
The exact workflow structure should ensure that each generated barcode uses the intended item-specific value.

 

Generate a Barcode Conditionally

You can place Generate Barcode on a conditional branch when a barcode is required only under certain business conditions.

Example:

                  ┌─ Barcode Required → Generate Barcode
Decision ─────────┤
                  └─ Barcode Not Required → Continue
This prevents unnecessary barcode generation when the business process does not require it.

 

Example:

Let’s build and execute the “generateBarCodeDef” example.          

  • Create a new definition named “generateBarCodeDef” and open it in Designer mode. 
  • Drag a “generateBarCode” step to the canvas. 
  • Connect the dots between the “Start” and “generateBarCode” steps, as shown above. 
  • Select the line between the steps to configure the “Connection Properties”. The default property values are “None, True, False, Error, and Evaluate”. Depending on the step’s purpose, you can configure additional values.
  • Define a variable or a global to store the file paths.
  • Click the "generateBarCode" step to configure its "Required" properties. Provide a name for the step, barcode text, and a variable or global to store the absolute and relative file paths of the barcode file. Click the Save button. Note: Click the "AI Predict" button to have Copilot add new process steps that match your process description. 

 

  • Click the "GenerateBarcode" step to configure its "Optional" properties. Select a barcode type from the drop-down list. Enter the barcode label. Select the file format from the drop-down list. Select the text location from the drop-down list. Enter the barcode height and width in pixels. Select the barcode and text colors. Click the Save button. 

 

  • The “Logging” configuration is necessary for documentation and to measure workflow progress and percent complete. This is done by configuring the step state and percent fields individually, as shown below. Configure the “Logging” using the following properties.

 

  • Save the process definition, create a new instance, and execute it. Render the process instance and click the Generate Barcode step to view its properties. When the workflow reaches the Generate Barcode step, FlowWright processes the supplied barcode text using the configured barcode options. The resulting barcode file path and relative file path are stored in the specified Variable or Global variables. The workflow can then continue through the appropriate True or False path.

 

  • Click the process step to view its properties. The step should generate a new barcode image file. Use the file path to download and view the image. 

 

Tips:

  • Provide a valid Barcode text value before the step executes.
  • The Barcode text property is required. 
  • Select a barcode type appropriate for the data being encoded and the consuming scanner or application.
  • Verify the available barcode encoding types in the FlowWright designer because they are not enumerated in the supplied XML.
  • Use a meaningful Barcode label when human-readable context is required.
  • The Barcode label property is optional. 
  • Verify the required output file format before generating the barcode.
  • The supplied definition uses JPEG as the default file format. 
  • Verify the text location when the barcode label must appear in a specific position.
  • The supplied definition uses Below as the default text location. 
  • Specify barcode dimensions when the downstream document or application requires a particular image size.
  • Both height and width are optional and have a default value of 0. 
  • Use meaningful Variables or Globals for the barcode file path and relative file path.
  • Both barcode path destination properties are required. 
  • Keep separate Variables or Globals for the full barcode file path and relative file path.
  • Test generated barcodes using the actual scanner or consuming application where possible.
  • Test representative barcode values before deploying the workflow.
  • Verify that the generated file exists at the expected location before using it downstream.
  • Test values containing different lengths and character combinations appropriate to the selected barcode type.
  • Use barcode and text colors that maintain sufficient readability for the intended scanning environment.
  • The supplied XML identifies Black as the default for both barcode and barcode text colors. 
  • Reuse the generated file path in downstream activities rather than regenerating the same barcode unnecessarily.
  • Consider connecting the False return path to appropriate error handling.
  • Connect the True return path to the normal workflow continuation.
  • Test the workflow after changing the barcode type, dimensions, file format, or text location.
  • If the barcode is incorporated into generated documents, test the complete document rather than only the barcode image.
  • Keep barcode-generation configuration consistent when the same barcode convention is used across multiple workflows.
  • Do not assume specific barcode symbologies, supported file formats, character restrictions, sizing behavior, or scanner compatibility beyond what the FlowWright implementation confirms.
  • Do not assume that every barcode type supports every possible input value; validate the selected type with the intended barcode data.
  • Keep sensitive information out of logs when the barcode represents confidential business data.

 

Definition Sample:

You may download the sample definition(s) from the link provided and later import them (drag-and-drop) into your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.

Before executing a workflow containing the Generate Barcode step, verify:

  1. The Generate Barcode step has been added to the Process Definition.
  2. Barcode text has been configured.
  3. A barcode type has been selected when the workflow requires a specific encoding.
  4. A barcode label has been configured if human-readable labeling is required.
  5. The required output file format has been selected or the default JPEG format has been retained.
  6. The text location has been reviewed.
  7. Barcode dimensions have been configured when specific dimensions are required.
  8. A Variable or Global has been defined to hold the barcode file path.
  9. A Variable or Global has been defined to hold the barcode relative file path.
  10. Barcode and text colors have been configured when required.
  11. The upstream workflow activity is connected to the Generate Barcode step.
  12. The True path is connected to the normal continuation path.
  13. The False path is connected to appropriate alternate or error handling where required.
  14. The generated barcode has been tested with representative values.
  15. The generated file path and relative file path have been verified.
  16. Downstream activities reference the correct Variables or Globals.

Click here to download the sample file.