> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Reference types in resources usage

> Understanding how Reference Type values are determined in the Resource Usage Overview and why certain values appear based on the underlying resource model.

## Overview

The **Resource Usage Overview** in FlowX.AI tracks where and how resources (such as enumerations, media files, processes, and workflows) are referenced throughout your projects. A key column in this overview is the **Reference Type**, which indicates the type of element that directly contains the reference to a resource.

<Frame>
  ![Resource Usage Overview showing Reference Type column](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/4.6/Screenshot%202025-02-24%20at%2011.42.52.png)
</Frame>

### Why reference type matters

Understanding Reference Type helps you:

* **Identify the exact location** of resource references within your project
* **Understand dependency chains** before modifying or deleting resources
* **Navigate directly** to the element containing the reference
* **Plan impact analysis** when updating shared resources

### How FlowX.AI identifies references

FlowX.AI identifies resource references through **sub-resources**—the actual elements that contain references, rather than their parent containers. This distinction is crucial for understanding why certain Reference Type values appear.

For example, when an enumeration is used in a User Task node, the reference is technically stored inside the **UI Template** attached to that User Task—not in the User Task node itself. Therefore, the Reference Type displays **UI Template**, not "User Task".

***

## Reference type values

Reference type values are derived from two sources in the FlowX data model:

1. **Element Types** — The type of element within a service that contains the reference
2. **Element Path Types** — The specific path or context within that element

### Element types

Element types identify the owner service, source resource, and the element containing the reference:

| Element Type         | Owner Service          | Source Resource    | Description                                                         |
| :------------------- | :--------------------- | :----------------- | :------------------------------------------------------------------ |
| `uiTemplate`         | admin                  | process            | UI Templates attached to nodes or defined as Reusable UI components |
| `action`             | admin                  | process            | Node actions (business rules, Kafka sends, subprocess starts, etc.) |
| `dataModel`          | admin                  | process            | Data model attributes and entity definitions                        |
| `view`               | task-management-plugin | view               | Task management views                                               |
| `hook`               | task-management-plugin | hook               | Task management hooks                                               |
| `allocation-setting` | task-management-plugin | allocation-setting | Task allocation rules                                               |
| `endpoint`           | integration-designer   | system             | System endpoints                                                    |
| `workflowNode`       | integration-designer   | workflow           | Workflow nodes within integration workflows                         |

### Element path types

Element path types provide more granular context about where within an element the reference exists.

#### Process node path types

| Element Type        | Element Description     | Path Type (Reference Type) |
| :------------------ | :---------------------- | :------------------------- |
| `action`            | Start subprocess action | `StartSubProcessHandler`   |
| `uiTemplate/action` | User Task node          | `USER_TASK`                |
| `action/node`       | Service Task node       | `TASK`                     |
| `action`            | Call subprocess node    | `SUBPROCESS_RUN`           |
| `node`              | Embed process node      | `SUBPROCESS_EMBED`         |

#### Task management path types

| Element Type | Element Description | Path Type (Reference Type) |
| :----------- | :------------------ | :------------------------- |
| (none)       | Allocation rule     | `allocation-setting`       |
| (none)       | View                | `view`                     |
| (none)       | Hook                | `hook`                     |

#### Integration Designer path types

| Element Type   | Element Description | Path Type (Reference Type) |
| :------------- | :------------------ | :------------------------- |
| (none)         | System              | `system`                   |
| (none)         | Endpoint            | `endpoint`                 |
| `workflowNode` | Workflow node       | `workflowNode`             |

#### Data model path types

When a resource (like an enumeration) is referenced in a data model attribute, the Reference Type shows the attribute's data type:

| Element Type | Element Description     | Path Type (Reference Type) |
| :----------- | :---------------------- | :------------------------- |
| `dataModel`  | Data model entity       | `entity`                   |
| `dataModel`  | String attribute        | `STRING`                   |
| `dataModel`  | Integer attribute       | `INTEGER`                  |
| `dataModel`  | Float attribute         | `FLOAT`                    |
| `dataModel`  | DateTime attribute      | `DATE_TIME`                |
| `dataModel`  | ZonedDateTime attribute | `ZONE_DATE_TIME`           |
| `dataModel`  | Boolean attribute       | `BOOLEAN`                  |
| `dataModel`  | Object attribute        | `OBJECT`                   |
| `dataModel`  | Enum attribute          | `ENUM`                     |
| `dataModel`  | Currency attribute      | `CURRENCY`                 |

#### UI Template element path types

When a resource is referenced inside a UI Template, the Reference Type shows the specific UI element type:

| Element Type | Element Description  | Path Type (Reference Type) |
| :----------- | :------------------- | :------------------------- |
| `uiTemplate` | Page component       | `PAGE`                     |
| `uiTemplate` | Container component  | `CONTAINER`                |
| `uiTemplate` | Card component       | `CARD`                     |
| `uiTemplate` | Form component       | `FORM`                     |
| `uiTemplate` | Modal component      | `MODAL`                    |
| `uiTemplate` | Stepper component    | `STEPPER`                  |
| `uiTemplate` | Step component       | `STEP`                     |
| `uiTemplate` | Tab component        | `TAB`                      |
| `uiTemplate` | Zone component       | `ZONE`                     |
| `uiTemplate` | Collection component | `COLLECTION`               |
| `uiTemplate` | Table component      | `TABLE`                    |
| `uiTemplate` | Input field          | `INPUT`                    |
| `uiTemplate` | Text area            | `TEXTAREA`                 |
| `uiTemplate` | Select dropdown      | `SELECT`                   |
| `uiTemplate` | Checkbox             | `CHECKBOX`                 |
| `uiTemplate` | Radio button         | `RADIO`                    |
| `uiTemplate` | Switch toggle        | `SWITCH`                   |
| `uiTemplate` | Slider               | `SLIDER`                   |
| `uiTemplate` | Datepicker           | `DATEPICKER`               |
| `uiTemplate` | Button               | `BUTTON`                   |
| `uiTemplate` | Link                 | `LINK`                     |
| `uiTemplate` | Text element         | `TEXT`                     |
| `uiTemplate` | Image element        | `IMAGE`                    |
| `uiTemplate` | Message element      | `MESSAGE`                  |

***

## Why UI element types appear as Reference Types

One of the most common questions about the Resource Usage Overview is:

> "Why does the Reference Type show 'SELECT' or 'IMAGE' instead of 'User Task' when using resources in a User Task?"

### The technical explanation

In FlowX.AI's architecture, **UI Templates contain UI elements** that hold references to resources like enumerations, media files, and substitution tags. The Reference Type shows the **specific UI element type** that contains the reference, not the parent node:

```mermaid theme={"system"}
flowchart TB
    subgraph UserTask["User Task Node"]
        subgraph UITemplate["UI Template"]
            Select["Select Component<br/>(type: SELECT)"]
        end
    end
    
    Enum[("Countries" Enumeration)]
    
    Select -. "Data Source" .-> Enum
    
    Select -.-> RefType["Reference Type = SELECT"]
    
    style RefType fill:#ffd700,stroke:#333,stroke-width:2px
    style Select fill:#e1f5fe,stroke:#0288d1
    style Enum fill:#f3e5f5,stroke:#7b1fa2
```

### The rule

<Warning>
  **Reference Type always reflects the specific element holding the reference, not the process node containing it.**
</Warning>

This means:

| Scenario                       | What contains the reference     | Reference type shown                         |
| :----------------------------- | :------------------------------ | :------------------------------------------- |
| Enumeration in Select dropdown | Select component in UI Template | `SELECT`                                     |
| Enumeration in Radio buttons   | Radio component in UI Template  | `RADIO`                                      |
| Enumeration in Data Model      | Data model attribute            | `ENUM`                                       |
| Media file in Image component  | Image element in UI Template    | `IMAGE`                                      |
| Substitution tag in Text       | Text element in UI Template     | `TEXT`                                       |
| Process called from action     | Action on the node              | `StartSubProcessHandler` or `SUBPROCESS_RUN` |
| Workflow in integration node   | Workflow node                   | `workflowNode`                               |

### Why this design?

This design reflects the actual data model and provides:

1. **Precision** — Shows the exact UI element type or data model attribute type that contains the reference
2. **Consistency** — The same UI element type (like `SELECT`) produces the same Reference Type regardless of whether it's in a User Task or Reusable UI
3. **Actionable information** — You know immediately what type of component needs to be modified if you want to change the reference

***

## Reference type by resource category

Different resource types generate different Reference Type values based on how they're used in the platform.

### Process references

Processes can be referenced from multiple contexts:

| Reference Context                        | Element            | Reference Type           |
| :--------------------------------------- | :----------------- | :----------------------- |
| Start subprocess action                  | Action             | `StartSubProcessHandler` |
| Call activity node                       | Action             | `SUBPROCESS_RUN`         |
| Embedded subprocess                      | Node               | `SUBPROCESS_EMBED`       |
| Task management view                     | View               | `view`                   |
| Task management hook (parent process)    | Hook               | `hook`                   |
| Task management hook (triggered process) | Hook               | `hook`                   |
| Allocation rule                          | Allocation Setting | `allocation-setting`     |

<Info>
  Hooks reference two processes: the **parent process** (which triggers the hook) and the **triggered process** (which runs when the hook fires). Both create separate resource usage entries with Reference Type `hook`.
</Info>

### Enumeration references

Enumerations are primarily referenced in UI components, data models, and integration systems:

| Reference Context                     | Element     | Reference Type |
| :------------------------------------ | :---------- | :------------- |
| Select dropdown                       | UI Template | `SELECT`       |
| Radio button group                    | UI Template | `RADIO`        |
| Checkbox group                        | UI Template | `CHECKBOX`     |
| Data model attribute (ENUM type)      | Data Model  | `ENUM`         |
| System endpoint (enumeration mapping) | Endpoint    | `endpoint`     |

<Tip>
  Enumerations used as data sources in UI components will show the specific UI element type (like `SELECT` or `RADIO`) as the Reference Type, not just "UI Template."
</Tip>

### Media file references

Media files (images, icons, documents) are referenced in UI Templates:

| Reference Context                  | Element     | Reference Type             |
| :--------------------------------- | :---------- | :------------------------- |
| Image component                    | UI Template | `IMAGE`                    |
| Button with icon                   | UI Template | `BUTTON`                   |
| Card component                     | UI Template | `CARD`                     |
| Container background               | UI Template | `CONTAINER`                |
| Any UI element with image property | UI Template | Corresponding element type |

### Substitution tag references

Substitution tags are used for dynamic text content and are only referenced in UI Templates:

| Reference Context           | Element     | Reference Type             |
| :-------------------------- | :---------- | :------------------------- |
| Text element                | UI Template | `TEXT`                     |
| Button label                | UI Template | `BUTTON`                   |
| Input placeholder           | UI Template | `INPUT`                    |
| Any text-containing element | UI Template | Corresponding element type |

<Info>
  Substitution tags are referenced using the format `@@path.to.SubstitutionTag` within UI Template text properties. The Reference Type will show the specific UI element type where the tag is used.
</Info>

### Workflow references

Integration workflows can be referenced from:

| Reference Context                    | Element       | Reference Type |
| :----------------------------------- | :------------ | :------------- |
| Start Integration Workflow action    | Action        | Action type    |
| Receive Message Task (From Workflow) | Node          | Node type      |
| Subworkflow node in another workflow | Workflow Node | `workflowNode` |

### System and endpoint references

Integration systems and their endpoints appear in workflow configurations:

| Reference Context                 | Element       | Reference Type |
| :-------------------------------- | :------------ | :------------- |
| Workflow node using endpoint      | Workflow Node | `workflowNode` |
| Enumeration mapping configuration | Endpoint      | `endpoint`     |

### Resources not tracked as usages

Some resource types are **not used by other resources** and therefore don't appear as Reference Types when viewing other resources:

| Resource Type            | Notes                                                                                 |
| :----------------------- | :------------------------------------------------------------------------------------ |
| View                     | Views use processes, but views themselves are not referenced by other resources       |
| Hook                     | Hooks reference processes, but hooks themselves are not referenced by other resources |
| Allocation Rule          | Allocation rules reference processes, but are not referenced by other resources       |
| Configuration Parameters | Not tracked as resources; used as string values in business rules                     |
| Document Templates       | Referenced by name in Kafka send actions, not by resource ID                          |
| Notification Templates   | Referenced by name in Kafka send actions, not by resource ID                          |

***

## Examples

### Example 1: enumeration used inside a User Task

**Scenario**: You have a "Country" enumeration used in a Select dropdown within a User Task node's UI.

**Resource**: `Countries` enumeration\
**Location**: User Task node → UI Template → Select component → Data Source

**Result in Usage Overview**:

| Resource  | Reference Type | Reference Path                                          |
| :-------- | :------------- | :------------------------------------------------------ |
| Countries | `SELECT`       | Process: Onboarding → Node: SelectCountry → UI Template |

<Tip>
  Even though you navigate through the User Task to find this enumeration, the **Reference Type is `SELECT`** because that's the specific UI element type that contains the data source reference.
</Tip>

### Example 2: enumeration used inside a Reusable UI

**Scenario**: You have a "Document Types" enumeration used in a Select component within a Reusable UI component.

**Resource**: `DocumentTypes` enumeration\
**Location**: Reusable UI → UI Template → Select component → Data Source

**Result in Usage Overview**:

| Resource      | Reference Type | Reference Path                              |
| :------------ | :------------- | :------------------------------------------ |
| DocumentTypes | `SELECT`       | Reusable UI: DocumentSelector → UI Template |

<Info>
  Notice that both User Task UI and Reusable UI show **`SELECT`** as the Reference Type. This is because the referencing element is a Select component in both cases, regardless of whether it's in a User Task or Reusable UI.
</Info>

### Example 3: workflow referenced in a workflow node

**Scenario**: An integration workflow "SendNotification" calls another workflow "EmailService" from one of its nodes.

**Resource**: `EmailService` workflow\
**Location**: Workflow: SendNotification → Workflow Node: CallEmail

**Result in Usage Overview**:

| Resource     | Reference Type | Reference Path                               |
| :----------- | :------------- | :------------------------------------------- |
| EmailService | workflowNode   | Workflow: SendNotification → Node: CallEmail |

### Example 4: data model attribute using ENUM type

**Scenario**: A data model has an attribute "accountType" with type ENUM referencing the "AccountTypes" enumeration.

**Resource**: `AccountTypes` enumeration\
**Location**: Process: AccountOpening → Data Model → accountType attribute

**Result in Usage Overview**:

| Resource     | Reference Type | Reference Path                                    |
| :----------- | :------------- | :------------------------------------------------ |
| AccountTypes | ENUM           | Process: AccountOpening → Data Model: accountType |

### Example 5: media file used in UI Template inside a node

**Scenario**: A company logo image is used in a Card component header within a User Task.

**Resource**: `company_logo.png` media file\
**Location**: User Task node → UI Template → Card → Image component

**Result in Usage Overview**:

| Resource          | Reference Type | Reference Path                                      |
| :---------------- | :------------- | :-------------------------------------------------- |
| company\_logo.png | `IMAGE`        | Process: Welcome → Node: ShowBranding → UI Template |

<Warning>
  The Reference Type is **`IMAGE`** (the UI element type), not "User Task" or the specific node type. The media file reference lives inside an Image component within the UI Template, regardless of which node contains that template.
</Warning>

***

## How resource usage tracking works

Understanding the technical architecture behind resource usage tracking helps explain why Reference Types appear the way they do.

### Resource usage data model

When a resource reference is detected, FlowX.AI stores the following information:

| Field                         | Description                                                |
| :---------------------------- | :--------------------------------------------------------- |
| Source Application Version    | The app version containing the reference                   |
| Source Resource Definition ID | The resource definition where the reference exists         |
| Source Resource Type          | Type of the containing resource (such as process)          |
| Source Element ID             | The specific sub-element ID (such as UI Template ID)       |
| Source Element Type           | The type of sub-element (such as `uiTemplate` or `action`) |
| Source Location               | The specific field path (such as `flowxProps.dataSource`)  |
| Target Resource Definition ID | The referenced resource's definition ID                    |
| Target Application ID         | The app containing the referenced resource                 |
| Target Resource Type          | Type of the referenced resource (such as enumeration)      |

### Operations that affect resource usages

Resource usage entries are created, updated, or deleted when you perform these operations:

**For UI Templates:**

* Update UI template properties
* Delete UI template
* Copy/paste UI templates or nodes
* Undo/redo operations
* Import/export processes

**For Actions:**

* Create, update, or delete actions
* Update node configurations
* Copy/paste nodes
* Import/export processes

**For Data Model:**

* Add or modify attributes with ENUM type
* Delete data model attributes

**For Task Management:**

* Create, update, or delete views
* Create, update, or delete hooks
* Create or delete allocation rules

**For Integration Designer:**

* Configure workflow nodes
* Set up endpoint enumeration mappings

***

## Understanding the resource hierarchy

To fully understand Reference Types, it helps to understand FlowX.AI's resource hierarchy:

### Resources vs sub-resources

| Category                                 | Examples                                                     | Can be a Reference Type?                                      |
| :--------------------------------------- | :----------------------------------------------------------- | :------------------------------------------------------------ |
| **Top-level resources**                  | Processes, Workflows, Enumerations, Media Files, Systems     | These are what get referenced, not reference types themselves |
| **Sub-resources (reference containers)** | UI Templates, Actions, Data Model attributes, Workflow Nodes | Yes, these appear as reference types                          |
| **Parent containers**                    | User Task nodes, Service Task nodes, Gateway nodes           | No, the parent node type is not the reference type            |

### Why parent node types never appear as reference types

Parent nodes (like User Task, Service Task, or Call Activity) are containers that **hold** sub-resources. The actual reference always lives inside a sub-resource:

* **User Task** → contains UI Template (reference is in UI Template)
* **Service Task** → contains Actions (reference is in Action)
* **Call Activity** → contains Action configuration (reference is in Action)

The parent node type provides **context** for navigation but is not the Reference Type itself.

***

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Why doesn't Reference Type show 'User Task'?">
    Reference Type reflects the **actual element containing the reference**, not the parent node. When you use an enumeration in a User Task's interface, the reference is stored in the **UI Template** attached to that User Task. Therefore, the Reference Type shows the specific UI element type (like `SELECT` or `RADIO`).

    The User Task is simply the container node—it doesn't directly hold the enumeration reference; the UI Template inside it does.
  </Accordion>

  <Accordion title="Why does everything look like a UI element type?">
    Many resources (enumerations, media files, substitution tags) are primarily used within user interfaces. Since all UI components are defined inside UI Templates—whether those templates are attached to User Tasks, Reusable UI components, or other UI-enabled nodes—the Reference Type shows the specific UI element type (like `SELECT`, `IMAGE`, `TEXT`, etc.).

    This is accurate and provides precise information about exactly which UI component contains the reference.
  </Accordion>

  <Accordion title="Can navigation areas create resource usages?">
    Navigation areas define the structure and routing of your application's UI. If a navigation area has an associated UI Template that references resources like enumerations or media files, those references will be tracked with the corresponding UI element type as the Reference Type.
  </Accordion>

  <Accordion title="Do configuration parameters appear as Reference Types?">
    No. Configuration parameters are not tracked as resources. They are used as string values within business rules and do not appear in the Resource Usage Overview. The usage of configuration parameters is not set explicitly—they are configured in business rules as strings.
  </Accordion>

  <Accordion title="Do substitution tag values appear as Reference Types?">
    Substitution tags are referenced in UI Templates using the format `@@path.to.SubstitutionTag`. When you view the usage of a substitution tag, the Reference Type will show the specific UI element type (like `TEXT` or `BUTTON`) where the tag is embedded.

    Note that substitution tags exist as a single resource per application version, and only their individual values are tracked for usage.
  </Accordion>

  <Accordion title="How do I find all usages of a resource in User Tasks specifically?">
    While the Reference Type shows the specific UI element type, the **Reference Path** column provides the full context including the parent node. You can use this path to identify which User Tasks contain UI elements that reference your resource.

    Look for paths like: `Process: [Name] → Node: [UserTaskName] → UI Template`
  </Accordion>

  <Accordion title="What's the difference between 'action' and specific handler types like 'StartSubProcessHandler'?">
    The Reference Type can show either the general element type (`action`) or a more specific path type depending on the context:

    * **`StartSubProcessHandler`** — Start subprocess action type
    * **`SUBPROCESS_RUN`** — Call activity (call subprocess) node
    * **`SUBPROCESS_EMBED`** — Embedded subprocess node
    * **`TASK`** — Service task node
    * **`USER_TASK`** — User task node

    The specific types provide more granular information about what kind of node or action holds the reference.
  </Accordion>

  <Accordion title="Why don't Document and Notification Templates appear in resource usages?">
    Document templates and notification templates are referenced **by name** in Kafka send action configurations, not by resource ID. The actual template resource ID is resolved at runtime by the document and notification services based on the template name and build ID. Because they're referenced by name (a string value) rather than by resource definition ID, they are not tracked in the Resource Usage Overview.
  </Accordion>

  <Accordion title="What happens to resource usages when I create a new application version?">
    When you create a new application version (WIP), the resource usages are cloned from the source version. This ensures that the new version has an accurate picture of all resource references. When you discard a WIP version, its resource usages are also discarded.
  </Accordion>

  <Accordion title="What happens to resource usages during import/export?">
    Resource usages are included when exporting applications and are restored during import. The resource definition IDs remain the same when exporting and importing an application, ensuring that the usage tracking remains accurate.
  </Accordion>

  <Accordion title="Can I see usages for resources from library dependencies?">
    Yes. When your project uses resources from library dependencies (like enumerations or media files from a shared library), those usages are tracked. The resource usage entry stores both the source location (where the reference exists in your project) and the target resource information (including the library's application ID).
  </Accordion>
</AccordionGroup>

***

## Summary

The Reference Type in the Resource Usage Overview accurately reflects FlowX.AI's internal resource model:

<Steps>
  <Step title="References live in sub-resources">
    Actual resource references are stored in sub-resources like UI Templates, Actions, and Data Model attributes—not in parent node types.
  </Step>

  <Step title="Reference Type shows the container">
    The Reference Type displays the type of element that directly contains the reference, providing accurate technical information.
  </Step>

  <Step title="Parent context is in the path">
    While the Reference Type shows "UI Template", the full Reference Path includes parent information like the node name and process for complete context.
  </Step>

  <Step title="Consistency across contexts">
    The same resource used in different contexts (User Task UI vs. Reusable UI) shows the same Reference Type because the referencing element is the same—a UI Template.
  </Step>
</Steps>

Understanding this model helps you:

* Correctly interpret the Resource Usage Overview
* Plan changes with accurate impact analysis
* Navigate efficiently to the actual location of resource references
