Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

CONNECT flows

OMF 2โ€‹.0 Writer module

  • Last UpdatedAug 06, 2026
  • 11 minute read

This module receives messages from upstream modules and processes them by writing OMF 2.0 messages to an OMF endpoint.

Settings

The following table provides a detailed list of module settings.

Name

Requirements

Purpose

Default

Source Property

Length: 1-64

Optional property that contains the input data the module will use. If not provided, the entire incoming flow message will be used as the source.

data

Target Property

Length: 1-64

The property to write the results into.

data

Selection Resource File (Resource)

Selection

The resource file that contains mappings between data in the incoming messages.

Timestamp Mode

Dropdown

Where to read the timestamp from for streaming data. Does not apply to event or entity data. Options: Current Time (use current time), From Data Item (read from each data item), From Message (read one timestamp from the Timestamp Property).

CurrentTime

Timestamp Property

Length: 0-64

The property that contains the timestamp to use for the OMF data. Used when Timestamp Mode is From Message. If this property is specified in any other Timestamp Mode, the module will fail to start. This is to avoid accidental misconfiguration.

Keep Properties

true/false

If true, all properties not renamed or removed will be included in the output. If false, only properties that are renamed or added will be included.

Credentials

Selection

The credentials to use for authentication.

Credentials setting details

The Credentials settings is a custom credential designed to handle all OMF endpoints supported by the module. Most fields will be optional at the credential level to handle the different authentication options. The module will be responsible for verifying the fields. The following table provides a list of the Credential settings.

Name

Requirements

Purpose

Default

Endpoint (Required)

URI

OMF Endpoint URL to write data to.

Username (Optional)

Length: 1-255

Basic authentication username. Required for PI Web API Basic authentication.

Password (Optional)

Length: 1-255

Basic authentication password. Required for PI Web API Basic authentication.

DisableEndpointCertificateValidation (Optional)

Boolean

Allow untrusted certificates if checked.

Warning: Disabling certificate validation is against AVEVA best practices and only recommended in test environments.

false

ClientId (Optional)

String

OIDC Client ID. Required for any OIDC authentication (PI Web API OIDC, CONNECT Classic, and CONNECT.)

ClientSecret (Optional)

String

OIDC Client Secret. Required for any OIDC authentication (PI Web API OIDC, CONNECT Classic, and CONNECT.)

TokenEndpoint (Optional)

URI

Retrieves a token from an alternative endpoint. Optional for Connect OIDC authentication. Required for PI Web API OIDC authentication.

Selection Resource File setting details

The Selection Resource File can include one or more selection item types depending on whether you are writing streaming data, entities, or events. At least one selection item must be included in the resource file for the module to start successfully.

DataSelectionItem settings (streaming data)

The following table provides a list of the DataSelectionItem settings for streaming data.

Name

Requirements

Purpose

Default

name

Optional

Friendly name for the selection item.

streamId

Required

OMF stream identifier to write data values to.

indexProperty

Optional

Property in the input data that provides the timestamp when Timestamp Mode uses data-item timestamps.

referenceProperty

Required

Property name used to find the input item to match.

referenceValue

Required

Expected value at referenceProperty to match an input item. Use "*" as a wildcard to match any value.

dataType

Required

OMF data type for the value. Valid data types: BOOLEAN, INT64, INT32, INT16, UINT32, UINT16, STRING, DATETIME, FLOAT64, FLOAT32

valueProperty

Required

Property containing the value to send to the OMF stream.

relatedEntityId

Optional

Entity identifier to associate with the stream value.

RelationshipLabel

Optional, but if supplied, relatedEntityId must also be supplied.

Entity property name used when relating data to an entity property. If this property is omitted, the default label will be applied.

Has Property Of

EntitySelectionItem settings (entity data)

The following table provides a list of the EventSelectionItem settings for entity data.

Name

Requirements

Purpose

Default

selectionItemName

Optional

Friendly name for the selection item.

referenceProperty

Required

Property name used to locate the entity source data to match.

referenceValue

Required

Expected value at referenceProperty used to select matching source entities.

dataSource

Optional

Optional source identifier if entity data comes from a named source.

The name of the Flow the module is running in. For example, if your Flow is named "MyFlow", this would default to "MyFlow".

idProperty

Required

Property containing the entity identifier.

idPrefix

Optional

Prefix applied to generated entity identifiers.

nameProperty

Optional

Property containing the entity display name.

descriptionProperty

Optional

Property containing the entity description.

relatedEntityIdProperties

Optional

List of source properties as strings containing related entity identifiers.

Empty list

relatedStreamIdProperties

Optional

List of stream relationship mappings between the entity and stream IDs. See RelatedStreamIdProperties table below for more information.

Empty list

extendedProperties

Optional

List of additional ad hoc entity properties to include when writing entities. See ExtendedProperties table below for more information.

Empty list

EventSelectionItem settings (event data)

The following table provides a list of the EventSelectionItem settings for event data.

Name

Requirements

Purpose

Default

selectionItemName

Optional

Friendly name for the selection item.

referenceProperty

Required

Property name used to locate the event source data to match.

referenceValue

Required

Expected value at referenceProperty used to select matching source events.

dataSource

Optional

Optional source identifier if event data comes from a named source.

The name of the Flow the module is running in. For example, if your Flow is named "MyFlow", this would default to "MyFlow".

idProperty

Required

Property containing the event identifier.

idPrefix

Optional

Prefix applied to generated event identifiers.

nameProperty

Optional

Property containing the event display name.

startTimeProperty

Required

Property containing the event start time.

endTimeProperty

Optional

Property containing the event end time.

descriptionProperty

Optional

Property containing the event description.

relatedEntityIdProperty

Optional

Property containing the related entity identifier for the event.

extendedProperties

Optional

List of additional ad hoc event properties to include when writing events. See ExtendedProperties table below for more information.

Empty list

RelatedStreamIdProperties settings (entity data)

The following table provides a list of the RelatedStreamIdProperties settings for entity data.

Name

Requirements

Purpose

Default

RelatedStreamIdProperty

Required

Property name in the source data that contains the related stream identifier.

RelationshipLabel

Optional

Label for the relationship between the entity and stream. If this property is omitted, the default label will be applied.

Has Property Of

ExtendedProperties settings (entity or event data)

The following table provides a list of the ExtendedProperties settings for entity or event data.

Name

Requirements

Purpose

Default

Name

Required

Name of the extended property to include in the entity or event.

ValueProperty

Required

Property name in the source data that contains the value for the extended property.

DataType

Optional

OMF data type for the extended property value. Valid data types: BOOLEAN, INT64, INT32, INT16, UINT32, UINT16, STRING, DATETIME, FLOAT64, FLOAT32. If omitted, the data type will be inferred.

Code examples - Streaming Data

Example: Send a simple, incoming flow message with streaming data to an OMF Endpoint

This example shows how the module processes an incoming flow message with streaming data by transforming and then sending the flow message to an OMF endpoint.

Configuration

  • Source Property = data

  • Target Property = data

  • Selection Resource File (Resource) = "Existing data selection file of type Resource"

  • Credentials = "Existing credentials object of type Credentials"

    • OMF Endpoint = "Valid OMF Endpoint"

Data selection array example 1

Incoming message

"data": {

"id": "tag1",

"name": "temp1",

"value": 25.853235

}

Data Selection Array

{

"DataSelectionItems":

[

{

"name": "temp1",

"streamId": "AutoCreatedStream",

"indexProperty": null,

"referenceProperty": "name",

"referenceValue": "temp1",

"dataType": "Float64",

"valueProperty": "value"

}

]

}

Module output

The module output includes an object that contains the status of the write call for the incoming message. The resulting OMF data message is sent to a predefined OMF endpoint and is not visible in Flow Studio.

{

"crosser": {

"success": true

},

"data": {

"statusCode": "Accepted"

{

}

Example: Wildcard Reference Value

When referenceValue is set to "*" (wildcard), the module matches any value found at the referenceProperty key, effectively treating the property name itself as the identifier rather than requiring a specific value to match against.

This approach is useful when the incoming data is a flat set of key-value pairs. For example, "temperature": 25.8 rather than objects with a shared identifier field such as "name": "temp1".

Configuration

  • Source Property = data

  • Target Property = data

  • Selection Resource File (Resource) = "Existing data selection file of type Resource"

  • Credentials = "Existing credentials object of type Credentials"

Data Selection item example 2

How it works

Field

Meaning in this example

referenceProperty

The key in the incoming data to look for ("temperature", "pressure").

referenceValue

"*" means "match regardless of the value found at that key."

valueProperty

The key whose value is sent to OMF (same key here, since the value is the reading).

streamId

The OMF stream the value is written to.

Contrast with a non-wildcard selection

In the non-wildcard examples, data items contain an identifier field -- for example, "name": "temp1" -- and referenceValue is set to "temp1" to match only items where name == "temp1".

Example - Timestamp Mode: Current Time

The module uses the current system time as the timestamp for all OMF data values. The indexProperty in the Data Selection must be null.

Configuration

  • Source Property = data

  • Target Property = data

  • Timestamp Mode = Current Time

  • Selection Resource File(Resource) = "Existing data selection file of type Resource"

  • Credentials = "Existing credentials object of type Credentials"

OMF 2.0 Example 3

The OMF data message is sent with the current UTC system time as the timestamp.

Example - Timestamp Mode: From Data Item

The module reads the timestamp from each individual data item using the indexProperty specified in the Data Selection.

Configuration

  • Source Property = data

  • Target Property = data

  • Timestamp Mode = From Data Item

  • Selection Resource File(Resource) = "Existing data selection file of type Resource"

  • Credentials = "Existing credentials object of type Credentials"

OMF Writer from data example

The OMF data message uses the timestamp value from each data item (2024-01-15T12:30:00Z in this case).

Example - Timestamp Mode: From Message

The module reads a single timestamp from a top-level property on the incoming flow message, specified by the Timestamp Property setting. The indexProperty in the Data Selection must be null.

Configuration

  • Source Property = data

  • Target Property = data

  • Timestamp Mode = From Message

  • Timestamp Property = timestamp

  • Selection Resource File (Resource) = "Existing data selection file of type Resource"

  • Credentials = "Existing credentials object of type Credentials"

    OMF Example from message

The OMF data message uses the timestamp property from the message (2024-01-15T12:30:00Z) as the timestamp for all data values.

Configuration

  • Source Property = data

  • Target Property = data

  • Selection Resource File(Resource) = "Existing data selection file of type Resource"

  • Credentials = "Existing credentials object of type Credentials"

    Example - Streaming data with related entity

This configuration and input results in a stream being created in the OMF endpoint with the data value and a relationship to the entity with ID "Sensor1". 

Important: The entity with ID "Sensor1" must already exist in the OMF endpoint for the relationship to be valid.

Code examples - Event Data

Example: Send a simple, incoming flow message with event data to an OMF endpoint

This example shows how the module processes an incoming flow message with simple event data for two events, one closed and one active, by transforming and then sending the flow message to an OMF endpoint.

Configuration

  • Source Property = data

  • Target Property = data

  • Selection Resource File (Resource) = "Existing event selection file of type Resource"

  • Credentials = "Existing credentials object of type Credentials"

    Example: Send a simple, incoming flow message with event data to an OMF endpoint

This configuration and input results in two events being created in the OMF endpoint: Event 123 that is still active because no EndTime was provided, and Event 456 that is closed because it contained an EndTime. The event Ids will be include the prefix specified, resulting in Flows1.123 and Flows1.456, and both events will have a Related type relationship between the event and the MyEntity1 entity in CONNECT. Both events will have a DataSource value matching the name of the flow because the DataSource property was not specified in the Event Selection Item.

When the Flows1.123 event closes in the future, another flow message can be sent containing the event information and the EndTime, and it will update the event in CONNECT.

Example: Send an event with additional properties to an OMF endpoint

This example shows how the module processes an incoming flow message with event data that contains additional adhoc properties by transforming and then sending the flow message to an OMF endpoint. One property has its data type specified while the other does not.

Configuration

  • Source Property = data

  • Target Property = data

  • Selection Resource File (Resource) = "Existing event selection file of type Resource"

  • Credentials = "Existing credentials object of type Credentials"

    Example: Send an event with additional properties to an OMF endpoint

This configuration and input results in one event being created in the OMF endpoint with two adhoc properties added to it. The first is called temperature with a value of 253 and a data type of int32 since this was specified in the configuration. The second is called pressure with a value of 156247.5 and a data type of float32; this data type is not specified in the configuration, so the module infers it based on the value in the flow message.

Code examples - Entity Data

Example: Send a simple, incoming flow message with entity data to an OMF endpoint

This example shows how the module processes an incoming flow message with simple entity data with a parent-child relationship by transforming and then sending the flow message to an OMF endpoint.

Configuration

  • Source Property = data

  • Target Property = data

  • Selection Resource File (Resource) = "Existing entity selection file of type Resource"

  • Credentials = "Existing credentials object of type Credentials"

    Example: Send a simple, incoming flow message with entity data to an OMF endpoint

This configuration and input results in two entities being created in the OMF endpoint: one for the facility and one for the pump, with the pump being related to the facility as its parent entity. The extended properties would also be included in the entity definitions.

This example shows how the module processes an incoming flow message with entity data that has a related stream by transforming and then sending the flow message to an OMF endpoint.

Configuration

  • Source Property = data

  • Target Property = data

  • Selection Resource File (Resource) = "Existing entity selection file of type Resource"

  • Credentials = "Existing credentials object of type Credentials"

Example: Send an entity with a related stream to an OMF endpoint

This configuration and input results in an entity being created for the tank, with a related stream for the tank level data. The stream is associated with the entity through the RelatedStreamId property with a label of "TankLevel".

Example: Send an entity with a related entity to an OMF endpoint

This example shows how the module processes an incoming flow message with entity data that has a related entity by transforming and then sending the flow message to an OMF endpoint.

Configuration

  • Source Property = data

  • Target Property = data

  • Selection Resource File (Resource) = "Existing entity selection file of type Resource"

  • Credentials = "Existing credentials object of type Credentials"

Example: Send an entity with a related entity to an OMF endpoint

This configuration and input results in two entities being created in the OMF endpoint: one for the pump and one for the vat, with the pump being related to the vat as its related entity.

Example File

  • OMF 2.0 Writer code samples file.

In This Topic