# File Read Task

The **File Read Task** is used to read data from external files as part of a business process.\
It is represented by a **rectangular BPMN activity node**, as shown below.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FAK24DGTh7lH4v1i26ljN%2F0?alt=media" alt=""><figcaption></figcaption></figure>

This task is commonly used when a process needs to **ingest data from files**, such as batch jobs, integrations, or import workflows.

***

### Purpose

The **File Read Task** enables a process to retrieve and process information from files stored in various locations and formats.

It supports:

* Multiple **file sources**
* Multiple **file formats**
* Data filtering, sorting, transformation
* Post‑processing actions such as file movement

This makes it suitable for **data ingestion, ETL‑style flows, and system integrations**.

***

### File Read Task Configuration Overview

The File Read Task configuration panel consists of **three main tabs**:

1. **General**
2. **Business Object**
3. **File Read Parameter**

Each tab is described in detail below.

***

### General Tab

The **General** tab contains basic task metadata, including:

* Task name
* Task ID
* Description

These properties help identify the File Read Task within the process flow.

> **Important**\
> Always click **Save Panel** to persist changes.

***

### Business Object Tab

The **Business Object** tab is used to configure and map **input and output parameters** for the File Read Task.

This mapping allows:

* Passing parameters into the task
* Storing file data into process Business Objects
* Sharing file‑derived data with downstream activities

Business Object mapping is required if file data is used later in the process.

***

### File Read Parameter Tab

This tab defines **how and from where the file is read**.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FyCc8k5YynzdeJ8adis9V%2F1?alt=media" alt=""><figcaption></figcaption></figure>

#### Core Properties

| Property                   | Mandatory | Description                                       |
| -------------------------- | --------- | ------------------------------------------------- |
| File Source                | Yes       | Source of the file (File System, FTP, SFTP, FTPS) |
| File Type                  | Yes       | File format (FIXWIDTH, XLS, DELIMITED, XML)       |
| Skip 1st Row               | No        | Skip header row                                   |
| Remove Duplicate Records   | No        | Remove duplicate records                          |
| Apply Filter               | No        | Apply data filter                                 |
| Apply Sort                 | No        | Sort data                                         |
| Transform Fields           | No        | Convert data types                                |
| Move File After Completion | No        | Move file after success/failure                   |

***

### File Source Configuration

#### File System

Used to read files from a local or mounted directory.

| Property       | Mandatory | Description                   |
| -------------- | --------- | ----------------------------- |
| Path Directory | Yes       | Directory containing the file |
| File Name      | Yes       | Name of the file              |

***

#### FTP

Standard FTP for file transfer.

| Property            | Mandatory | Description             |
| ------------------- | --------- | ----------------------- |
| IP Host             | Yes       | FTP host address        |
| Port                | Yes       | FTP port                |
| Passive Mode        | No        | Enable passive mode     |
| Username / Password | Yes       | Login credentials       |
| FTP Repository      | Yes       | Backup directory        |
| Expression          | Yes       | File matching condition |
| Suffix              | No        | File extension          |

***

#### SFTP

Secure File Transfer Protocol over SSH.

Properties are similar to FTP but operate over a secure channel.

***

#### FTPS

FTP with SSL/TLS encryption.

Includes additional option:

* **Implicit SSL**

***

### File Type Configuration

#### FIXWIDTH

Used when each field has a defined width.

* Supports **uniform** and **non‑uniform rows**
* When non‑uniform rows are enabled, configure:
  * HR (Header)
  * TR (Splitter)
  * TD (Data)
  * LR (Footer)

***

#### XLS

Used for Microsoft Excel files.

| Property   | Mandatory | Description         |
| ---------- | --------- | ------------------- |
| Sheet Name | Yes       | Excel sheet to read |

***

#### DELIMITED

Used for delimited text files.

| Property  | Mandatory | Description         |
| --------- | --------- | ------------------- |
| Delimiter | Yes       | Delimiter character |

***

#### XML

Used for structured XML files.

| Property            | Mandatory | Description         |
| ------------------- | --------- | ------------------- |
| Required Field Name | Yes       | XML field           |
| Element Type        | Yes       | element / attribute |
| Path in XML File    | Yes       | XPath               |
| End Tag Name        | Yes       | Stop parsing tag    |
| Type Field Name     | Yes       | Data type           |

***

### 🔄 Optional Processing Features

#### Remove Duplicate Records

Removes duplicates based on a selected field.

#### Apply Filter

Filters records using an expression.

#### Apply Sort

Sorts records by field (ASC/DESC).

#### Transform Fields

Converts data types.

#### Move File After Completion

Moves file to success or error directory after processing.

***

### 🔗 Mapping Parameters

Click **Open Mapping Parameter** to map:

* File output → Process Business Object
* Process input → File Read task

The mapping UI adapts automatically based on selected **File Type**.

***

### ✅ Summary

The **File Read Task** is a powerful data ingestion component in Process Designer.

Key features:

* Supports multiple file sources and formats
* Provides filtering, sorting, and transformation
* Integrates seamlessly with Business Objects
* Enables robust batch and integration workflows

Proper configuration of the File Read Task allows processes to handle **real‑world file‑based data flows** reliably and flexibly.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onewebstack.com/oneweb-platform-th/designer-reference/process-designer/process-designer-component/activity-nodes/file-read-task.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
