Contains one of the strings

Use this step to verify the search item is contained in the list of strings.

Last published at: September 5th, 2025

Contains Step

Description:

The Contains workflow step searches specified text against a list of search items and provides a conditional workflow result.

The step supports:

  • Providing text to search.
  • Defining multiple search items.
  • Processing a multiline list of search items.
  • Using workflow values as the search text.
  • Using workflow values to construct search items.
  • Branching the workflow based on the True or False result.
  • Using the result to control subsequent workflow processing.

 

Inputs

  • stringText: The stringText property specifies the text that should be searched.
  • listOfStrings: The listOfStrings property specifies the list of strings to search for within the supplied text.
 

 

Returns

  • True – The True return path can be connected to the workflow activity that should execute when the Contains condition is satisfied.
  • False – The False return path can be connected to an alternative workflow path when the condition is not satisfied.
 

 

Usage:

The Contains step is typically placed after a workflow has collected, generated, or retrieved text.

The supplied text is evaluated against the configured list of search items. The resulting True or False path can then control the next stage of workflow processing.

A typical workflow pattern is:

Get/Build Text → Contains → Process Result

The result can then be used by later workflow activities to:

  • Route the workflow.
  • Identify specific text conditions.
  • Validate expected text.
  • Classify workflow input.
  • Trigger notifications.
  • Select different processing paths.
  • Perform additional text processing.

 

 

Typical Workflow Suggestions:

Check for an Approval Status

Use the Contains step to determine whether workflow text contains an approval-related value.

Example:

Get Request Status
        ↓
      Contains
        ↓
Approved / Not Approved
Text to search:
The request has been approved by the manager.
List of search items:
approved
approval
The True and False paths can then be connected to the appropriate workflow activities.

 

Check for Multiple Status Values

Use the multiline search list when the workflow needs to look for one of several possible strings.

Example:

Process Status
      ↓
    Contains
   ↙       ↘
 True      False
List of search items:
Approved
Completed
Processed
This can provide a convenient conditional step before additional processing.

 

Route a Workflow Based on Text

Use Contains to determine which workflow path should execute based on text received during processing.

Example:

Retrieve Message
       ↓
     Contains
    ↙       ↘
 True       False
  ↓           ↓
Process A   Process B
For example, a workflow can evaluate a message for configured keywords and route the workflow accordingly.

 

Check Form-Supplied Text

Use text collected from a form as the input to the Contains step.

Example:

Form Submission
       ↓
    Contains
       ↓
Process Request
For example, a form field containing:
Customer requested expedited delivery.
can be evaluated against configured search items such as:
expedited
urgent
priority
The resulting workflow path can then determine subsequent processing.

 

Check an Email or Notification Message

Use Contains to evaluate workflow-generated or retrieved message text.

Example:

Get Message
    ↓
 Contains
  ↙     ↘
True   False
 ↓       ↓
Action  Ignore
The search list can contain terms that indicate the type of message requiring additional processing.

 

Identify Error Messages

Use the Contains step to check text for configured error-related strings.

Example:

Get Processing Result
        ↓
      Contains
       ↙    ↘
     True   False
       ↓      ↓
 Log Error  Continue
List of search items:
Error
Failed
Failure
Exception
The True path can then be connected to the workflow's error-handling process.

 

Check Generated Text Before Further Processing

Use Contains as a validation or decision point before passing text to another workflow activity.

Example:

Generate Text
      ↓
    Contains
      ↓
Further Processing
This allows the workflow to make a decision based on whether the generated text contains one of the configured search items.

 

Detect Keywords in Workflow Content

Use a list of keywords to determine whether a particular category of information is present.

Example:

Retrieve Content
      ↓
    Contains
      ↓
Categorize / Route
List of search items:
invoice
payment
purchase
order
The True and False workflow paths can then be used for subsequent processing.

 

Validate Expected Text

Use Contains to check whether expected text is present before continuing.

Example:

Generate Response
       ↓
     Contains
       ↓
Validate Result
For example, the search list could contain expected confirmation text.

 

Route Customer Requests

Use the step to identify configured terms in customer-submitted text.

Example:

Customer Request
       ↓
     Contains
    ↙       ↘
 True       False
  ↓           ↓
Special     Standard
Process     Process
For example, the search list could contain:
refund
return
replacement

 

Detect Completion Messages

Use Contains to determine whether a returned message contains an expected completion value.

Example:

Get Process Response
        ↓
      Contains
        ↓
Continue / Wait
The search items can contain configured completion terms such as:
Completed
Finished
Successful

 

Check Multiple Keywords in Multiline Search Input

The List of search items property supports multiline text, making it suitable for maintaining a collection of search values.

For example:

urgent
priority
escalate
manager
The workflow can use this list as the configured search input for the Contains step.

 

Use Dynamic Workflow Values

Use Variables or Globals to provide the text being evaluated or to construct search values.

Example:

Get Workflow Data
       ↓
Build Text
       ↓
Contains
       ↓
Route Workflow
This allows the same process definition to evaluate different text values across workflow instances.

 

Handle the False Path

Use the False return path when the workflow needs an explicit alternate path.

Example:

Contains
   ├── True  → Matching Process
   │
   └── False → No Match Process
The False path can connect to logging, notification, alternate processing, or the next normal workflow activity, depending on the process design.

 

Example:

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

  • Create a new definition named “containsStepDef” and open it in Designer mode. 
  • Drag a "contains" step to the canvas.
  • Connect the dots between the “Start” and "contains" 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.
  • Click the “contains” step to configure its “Required” properties. Provide a name for the step, the search text, and the list of items to search in. Then click the Save button. Note: Click the "AI Predict" button for Copilot to add new process steps that match your process description. 

 

  • The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. Configure 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 process step to view its properties. When the workflow reaches the Contains step, verify that:
    • The text to search is correctly supplied.
    • The search-item list is correctly configured.
    • The workflow follows the expected True or False path.
    • The subsequent workflow activity executes as expected.

 

Tips:

  • Provide a valid value for Text to search for.
  • Provide the required List of search items.
  • Use separate lines to organize multiple search items.
  • Use meaningful search values that clearly represent the condition being evaluated.
  • Use Variables or Globals when the text being evaluated is generated dynamically.
  • Use Variables or Globals when search values need to be constructed dynamically.
  • Test the search list with representative input text before deploying the workflow.
  • Test both the True and False workflow paths.
  • Consider connecting the False path to appropriate alternate processing.
  • Use descriptive names for workflow Variables containing the text being evaluated.
  • Keep commonly used search-item lists consistent across workflows.
  • Review the search-item list when business terminology changes.
  • Avoid ambiguous search values when they could result in unintended matches.
  • Test text containing multiple potential search values.
  • Test empty or unexpected input values.
  • Test text containing multiline content.
  • Verify the workflow result before allowing a downstream activity to perform an important operation.
  • When processing user-supplied content, test unexpected characters and formatting.
  • Do not assume matching behavior such as case sensitivity, partial matching, exact matching, regular-expression support, or search ordering unless confirmed by the FlowWright implementation.
  • Consider connecting the False return path to logging or notification when the absence of a match requires attention.
  • Keep search lists maintainable when the workflow evolves.
  • Test the workflow after changing the search-item list.
  • Avoid placing sensitive information in workflow configuration or logging unless necessary.

 

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 the imported definition, verify:

  • Text to search for
  • List of search items
  • Workflow Variable references
  • Environment-specific settings
  • Downstream True workflow path
  • Downstream False workflow path
  • Representative input text
  • Expected search values

After verifying the configuration, save the Process Definition before execution.

Click here to download the sample file.