# Dataflow Instance Context (DFIC)

The **Dataflow Instance Context** (DFIC) is the set of information of a dataflow instance. Data Mover creates the DFIC when the dataflow instance starts.

The Dataflow Instance Context (DFIC) is an entity containing these fundamental elements:

* **System attributes**: set by the system, they can be read within the workflow templates used in the contract actions of a COA chain. They include:
  * **Dataflow Instance Identifier (DFIID)**: the unique identifier assigned to every dataflow instance within Data Mover. It is the primary reference point for identifying and tracking all integration flows across the system. It can be read within the workflow templates used in the contract actions of a COA chain.
  * **Log Correlation Identifier (LCID)**: unique identifier for a Data Mover work session.
  * **\<original> fields**: additional information about the file and the dataflow.
* **User attributes**: they can be enriched by the user. They can be read within the workflow templates used in the contract actions of a COA chain.

The DFIC is enriched as the flow progresses through the contract actions of a COA chain.

## **System attributes**

When a new dataflow instance is created, the DFIC is initialized with only the Dataflow Instance Identifier (DFIID) and Log Correlation ID (LCID) attributes.&#x20;

As the dataflow proceeds through its lifecycle along the contract actions of a COA chain, **other system attributes may be set automatically** (e.g., file provenance information for pull and upload actions for SFTP, FTP, FTPS, HTTP and HTTPS).

System attributes are preserved with the republish action.

| System attribute              | Description                                                                                                                                                                                                                                                                                                                 |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| DFIID                         | Dataflow Instance ID. Unique identifier to identify all Data Mover integration flows.                                                                                                                                                                                                                                       |
| LCID                          | Log Correlation ID. Unique identifier for a Data Mover work session.                                                                                                                                                                                                                                                        |
| original\_action              | The name of the Contract Action, when Data Mover role is client.                                                                                                                                                                                                                                                            |
| original\_actor               | The name of the Actor.                                                                                                                                                                                                                                                                                                      |
| original\_actor-filename      | File name on the Actor's system this is the name of the file in the source system; it might differ from the original\_filename. For example, when pulling a file "foo" from an SFTP server of an Actor and writing it into Data Mover with a different name "bar".                                                          |
| original\_actor-path          | Remote path on the Actor's system.                                                                                                                                                                                                                                                                                          |
| original\_cd\_external-path   | Pathname of the folder shared between Data Mover and ConnectDirect. It is configured in the **Shared folder with C:D server** field. See the [Server Connection: IBM Sterling Connect:Direct](/data-mover-1.21/transfer-protocols-and-connectors/server-connections/server-connection-ibm-sterling-connect-direct.md) page. |
| original\_client-connection   | When Data Mover role is client, the name of the Client Connection.                                                                                                                                                                                                                                                          |
| original\_cluster             | Data Mover STENG cluster name.                                                                                                                                                                                                                                                                                              |
| original\_connection-contract | When Data Mover role is server, the name of the Connection Contract used to upload the file.                                                                                                                                                                                                                                |
| original\_contract            | The name of the Contract, when Data Mover  role is client.                                                                                                                                                                                                                                                                  |
| original\_corrid              | Optional logical label associated to the file for correlation or identification.                                                                                                                                                                                                                                            |
| original\_filename            | Name of the file.                                                                                                                                                                                                                                                                                                           |
| original\_ingestion-timestamp | <p>Time when the file has been fully uploaded to the VFS. The timestamp follows the ISO 8601 standard format: <code>YYYY-MM-DD'T'HH:mm:ss±HH:mm</code> (e.g., <code>2025-12-13T14:35:42+01:00</code>).<br>In the current version of Data Mover, this attribute applies only to Connect:Direct server transfers.</p>         |
| original\_peer                | Data Mover STENG peer.                                                                                                                                                                                                                                                                                                      |
| original\_protocol            | Transfer protocol, both for server and role scenarios.                                                                                                                                                                                                                                                                      |
| original\_role                | Transfer mode, it can be either "CLIENT" or "SERVER" depending on the role of Data Mover in the transfer.                                                                                                                                                                                                                   |
| original\_server              | The server name.                                                                                                                                                                                                                                                                                                            |
| original\_size                | Size of the file in bytes.                                                                                                                                                                                                                                                                                                  |
| original\_transferUser        | Transfer user name, both for server and role scenarios.                                                                                                                                                                                                                                                                     |
| original\_vfs                 | Original Virtual File System where the file has been stored. This is the Virtual File System in Data Mover where the file first landed, representing the initial point of contact with Data Mover.                                                                                                                          |
| original\_virtualpath         | Original Virtual Path where the file has been stored. This is the Virtual Path in Data Mover where the file first landed, representing the initial point of contact with Data Mover.                                                                                                                                        |

## **User attributes**

DFIC user attributes are contained in the usrAttrs attribute, which internally has a name/value pairs structure.

By default there are no user attributes. It is the user’s responsibility to define user attributes as needed and retrieve them from a **workflow template** within an action in a contract.

Since the DFIC lifecycle corresponds to the associated dataflow lifecycle, setting one or more user attributes in a contract and reading them in another contract executed later for the same dataflow, is an effective way of passing parameters between different contracts of the same COA chain.

For more information on how to read and write user attributes, please refer to the following chapter.

## **How to use DFIC**

DFIC information can be read, and new user attributes can be written in **Mediation workflows**.

User attributes are user-defined attributes that enrich the DFIC and are contained in a structure that enables users to write and read custom attributes.

Both user-defined and system attributes can be used within workflows to create logic for decision-making automations applicable to specific situations.

Get and Set actions are listed below.

### **Reading system attributes**

To read a system attribute, a specific function must be invoked:

| System Attribute           | Function                              |
| -------------------------- | ------------------------------------- |
| dfiid                      | DFIC.getDataFlowInstanceId();         |
| lcid                       | DFIC.getLCID();                       |
| modelId                    | DFIC.getDataflowModelId();            |
| modelName                  | DFIC.getDataflowModelName();          |
| modelVersion               | DFIC.getDataflowModelVersion();       |
| originalTransferUser       | DFIC.getOriginalTransferUser();       |
| originalPeer               | DFIC.getOriginalPeer();               |
| originalProtocol           | DFIC.getOriginalProtocol();           |
| originalServer             | DFIC.getOriginalServer();             |
| originalFilename           | DFIC.getOriginalFilename();           |
| originalSize               | DFIC.getOriginalSize();               |
| originalActorFilename      | DFIC.getOriginalActorFilename();      |
| originalCluster            | DFIC.getOriginalCluster();            |
| originalCorrId             | DFIC.getOriginalCorrId();             |
| originalVirtualpath        | DFIC.getOriginalVirtualpath();        |
| originalVfs                | DFIC.getOriginalVfs();                |
| originalRole               | DFIC.getOriginalRole();               |
| originalActor              | DFIC.getOriginalActor();              |
| originalClientConnection   | DFIC.getOriginalClientConnection();   |
| originalActorPath          | DFIC.getOriginalActorPath();          |
| originalContract           | DFIC.getOriginalContract();           |
| originalContractAction     | DFIC.getOriginalContractAction();     |
| originalConnectionContract | DFIC.getOriginalConnectionContract(); |

### **Reading and writing user attributes**

In order to **create a new user attribute** or **update an existing user attribute** you must set a workflow variable with the prefix `"DFIC_userAttrs_"` using this workflow script task function:

`execution.setVariable("DFIC_userAttrs_<user_attribute_name>", "<user_attribute_value>");`

Please notice that user attributes can only have a String data type.

Conversely, when you need to read a previously set user attribute, you must use this script task function:

`${DFIC.getUserAttr("<user_attribute_name")}`

## **Example**

Let's suppose that you need to logically tag a dataflow with its owner department, early in the COA chain, and use this logical tag later in the chain.

This is how you would initially establish a `dataflow_owner_department` user attribute and set it to `"ACCOUNTING"`

`execution.setVariable("DFIC_userAttrs_dataflow_owner_department", "ACCOUNTING");`

and this is how you would retrieve its value when required:

`${DFIC.getUserAttr("dataflow_owner_department")}`&#x20;

## Accessing DFIC information

DFIC information is available in:

* **Job Manager**: among the attributes of a job execution instance, there is also a section related to the DFIC of the dataflow where the job was executed. A mediation job has its own attributes (ID, execution variables, etc.) as well as information related to the dataflow instance (including *originals*).
* **Workflows**: in various workflows, you can:
  * Insert user attributes to implement custom logic.
  * Access *originals*, which are set during the creation of the dataflow instance.


---

# 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.primeur.com/data-mover-1.21/workflow-templates/dataflow-instance-context-dfic.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.
