Building and Using Converter Flows
  • 27 Jun 2023
  • 2 Minutes to read
  • Dark
    Light

Building and Using Converter Flows

  • Dark
    Light

Article Summary

Overview

Converter Flows are a valuable component within a Flow that enables the conversion of input data from one data type to another. They improve data handling by cleansing and refining data, ensuring data integrity, facilitating the presentation of data in a desired format, and contributing to process efficiency. By leveraging Converter Flows, organizations can achieve more elegant and streamlined data processing and presentation within their business processes.


Default Converter Flows

The default Converter Flows are displayed in the table below. These options can be found by navigating to System > Designers > Catalog > System Defaults > Converter Flows

Warning
It is highly recommended not to edit the default converter Flows; for additional assistance and questions, please contact support@decisions.com
Converter FlowFunction
Convert String to BoolConverts String input to Boolean output
Convert String to Byte ArrayConverts String input to ByteArray output

Convert String to Date

Converts String input to Date output

Convert String to Decimal

Converts String input to Decimal output
Convert String to Int32Converts String input to Int32 output

Convert String to Int64

Converts String input to Int64 output

Get Unique Strings from List

Searches List input for duplicate String inputs

Merge String List to Single String

Converts a list of Strings into a single String

Set Decimal Places on Number

Collects number values in a String input and then adds a specified number of decimal places

Trim String Flow

Shortens the String input to a specified length

Building a Converter Flow

The following example will demonstrate how to use a Converter Flow to convert a String into a DateTime value. 

Sample Project 
The following sample project can be imported and serve as a visual guide.
  1. From a Designer Project, select the CREATE FLOW button. Then, CREATE a new Converter Flow by selecting Converter Flow under the Converters category. 
  2. In the Flow Designer, attach a Parse Date step from the Toolbox panel by navigating to DATA > DATES to the Start and End steps.
  3. Select the Start step. Under the FLOW INPUTS category, click SHOW EDITOR under the Flow Input Data field.

  4. From the Flow Inputs window, enter "DateAsString" and select String [Text] from TYPE. Click Save and close the window.
  5. Select the Parse Date step, and on the Properties panel, map DateAsString to the Date field.
     
  6. Select the End step. Click SHOW EDITOR under Output.
  7. From the Output Data window, enter "ParsedDate" under NAME and select Date Time as the TYPE. Click the pencil icon under INPUT and map it to ParseDate1_Output. Click Save and close the window.
  8. Click Save and close the Flow Designer.

Using a Converter Flow

  1. In a Flow, on an Input of a step, select Unknown to open the action menu for the various mapping options. 
  2. In the action menu, there are two converter options. Run Converter and Converters; Run Converters will pull up the Create or Pick Flow dialog will appear allowing designers to create a new converter Flow or pick an existing. Converters will open a second menu displaying all the available Converter Flows for that Data Type. 

Optimizing Converter Flows

Converter Flows can be optimized by caching their outcomes. This can be done by navigating to the Properties panel for the Flow and expanding the Outcomes header. 

From here, users can configure the Cache Outcomes for the Flow, though there are some limitations:

  • If the Converter Flow fetches from a database, the values must match the input values to the Flow.
  • If the Converter Flow fetches data through an API call, the values must match the input values to the Flow.

For example, if the Converter Flow fetches a string input and its value matches the input to the Flow, then caching can be used. The only major change can be the data types between the two values. 



Was this article helpful?