The Data Search service enables you to find specific data across process instances within your FlowX.AI platform. It uses Elasticsearch to perform fast, indexed searches across process data.

Prerequisites

Before using the Data Search service, ensure you have:


Quick start

1

Set up your data process

Create a process that stores searchable data and configure field indexing.

2

Create a search process

Build a process with Kafka Send/Receive actions for search functionality.

3

Configure search parameters

Define your search criteria using simple or advanced syntax.

4

Handle search results

Process the returned data and display results to users.

1. Set up your data process

First, create a process that contains searchable data. Add a Service Task with a business rule:

output.put("application", {
  "client": {
    "personalInfo": {
      "firstName": "Sarah",
      "lastName": "Johnson", 
      "email": "sarah.johnson@techcorp.com",
      "phone": "+1-555-0101"
    },
    "address": {
      "country": "USA",
      "city": "San Francisco", 
      "state": "California",
      "zipCode": "94102"
    },
    "business": {
      "company": "TechCorp Inc",
      "industry": "Technology",
      "position": "CTO"
    },
    "account": {
      "type": "Premium",
      "status": "Active",
      "riskLevel": "Low"
    }
  }
});

Critical Step: After creating your data structure, you must configure field indexing in Process Settings → Data Search for the search to work.

Configure Field Indexing

Navigate to Process Settings → Data Search and add the field paths you want to search:

Fields that we indexed in our example:

  • application.client.personalInfo.firstName
  • application.client.personalInfo.lastName
  • application.client.personalInfo.email

2. Create your search process

Create a new process with a Send Message Task:

Configuration:

  • Action Type: Kafka Send Action
  • Topic: KAFKA_TOPIC_DATA_SEARCH_IN

3. Configure search parameters

Choose your search approach based on your needs:

4. Handle search results

Add a Receive Message Task with:

  • Data Stream: KAFKA_TOPIC_DATA_SEARCH_OUT

Success response example:

{
  "result": [
    {
      "processInstanceUUID": "b743ac99-4029-4b93-9ac3-4a45b4a62673",
      "state": "FINISHED",
      "processStartDate": "2025-05-28T12:18:50.532Z",
      "data": {
        "application": {
          "client": {
            "personalInfo": {
              "firstName": "Sarah",
              "lastName": "Johnson"
            }
          }
        }
      }
    }
  ],
  "tooManyResults": false,
  "success": true
}

Search parameters reference

Quick reference table

ParameterTypeMandatoryDescriptionExample
searchKeyStringYesSingle field path to search"application.client.personalInfo.lastName"
valueStringYesValue to search for (with searchKey)"Johnson"
searchKeysArrayYes (if multiple fields)Multiple field-value pairs (AND logic)[{"key": "field1", "value": "val1"}]
processDefinitionNamesArrayYesLimit to specific processes["client_onboarding"]
applicationIdsArrayNoSearch across applications["uuid-1", "uuid-2"]
statesArrayNoFilter by process states["FINISHED", "STARTED"]
processStartDateAfterStringNoInclude processes after date"2024-01-01T00:00:00Z"
processStartDateBeforeStringNoInclude processes before date"2024-12-31T23:59:59Z"

Basic search parameters

Filtering parameters

Date range parameters

Process states explained

Understanding process states is crucial for effective searching:

StateDescriptionWhen to Use
CREATEDProcess instance exists but hasn’t started executionRarely used for business searches
STARTEDProcess is actively runningFind ongoing processes, current workload
FINISHEDProcess completed successfullyMost common for business data searches
FAILEDProcess encountered an errorError analysis, troubleshooting
TERMINATEDProcess was manually cancelledAudit trails, cancelled applications
ONHOLDProcess is paused/waitingActive cases needing attention

Recommendation: Use ["FINISHED"] for most business searches to ensure you’re getting complete, reliable data.

Response structure

The search returns a JSON object with these fields:

  • result (Array): List of matching process instances, automatically sorted by processStartDate in descending order (newest first)
    • processInstanceUUID: Unique process identifier
    • state: Current process state
    • processStartDate: When the process started
    • data: The actual process data with your searchable fields
  • tooManyResults (Boolean): True if more than 50 results found (limit applied)
  • success (Boolean): Whether the search completed successfully
  • errorMessage (String): Error details if search failed

Use cases & examples

HR employee lookup

Search for employees by department, position, or location across HR systems.

Compliance Auditing

Locate specific transactions or approvals for regulatory compliance.

Business Intelligence

Analyze process data patterns and generate reports.

1

Customer calls with issue

Support agent needs to find customer’s account quickly.

2

Search by multiple criteria

{
  "searchKeys": [
    {"key": "customer.email", "value": "customer@email.com"},
    {"key": "customer.status", "value": "Active"}
  ],
  "processDefinitionNames": ["customer_onboarding"],
  "states": ["FINISHED"]
}
3

Get comprehensive results

Receive full customer profile with account details, order history, and support tickets.

4

Resolve customer issue

Use the retrieved data to address the customer’s concern effectively.


Best practices


Troubleshooting


Configuration templates

{
  "searchKey": "your.field.path",
  "value": "search_value",
  "processDefinitionNames": ["your_process"],
  "states": ["FINISHED"]
}