Skip to content

Entity Instance#

The Entity Instance task loads the MES instance associated and makes it possible to access all its attributes.

image61

Details#

Fields Details
Scope Connect IoT
Data Platform
Enterprise Integration
Factory Automation
Workflow Data flow
Control flow
IsProtocol flag

Inputs#

Name Data Type Description
Activate any Activates the task

Outputs#

Name Data Type Description
instance Resource The Resource instance
<custom list> <custom> Selected list of Resource attributes
Error Error Error that occurred during the processing of this task

Settings#

On the General Tab, there are the following settings:

Name Data Type Default Description
Auto Activate Boolean false Determines if the activation should be done when the entity is received
Load all attributes Boolean false Loads all the attributes for the Entity
Reload in every change Boolean true Flag indicates if the Entity is to be updated every time the tasks receives an Activate input
Levels to load Integer 0 Levels to load from the Entity associated

And the following retries settings:

Setting Data Type Default Description
Number of Retries integer 30 The maximum number of attempts the IoT process (client) makes to call the MES backend if the connection or execution fails.
Sleep Time between retries (ms) integer 1000 Number of milliseconds to wait between retries. It only applies when the previous call fails
Number of System Retries integer 10 The maximum number of attempts the MES backend makes to call the target service if the execution fails.

Multiplicative Retry Effect

Retry limits are cumulative. In the event of a persistent target service failure, the total number of requests generated will be the product of the Client Retries (N) and the Backend Retries (M). For example, if both are set to 10, a single IoT request could result in up to 100 total attempts (N x M), which may lead to system congestion or high latency.

Entity Instance task general settings

On the Attributes Tab, you have all the attributes of the Entity. The selected attributes will be the one's available for outputs.

image63

Behavior#

In a typical configuration, the Entity Instance is used along with the Driver Event OnInitialize, Equipment Configuration and Driver Command Connect tasks.

  • The Driver Event OnInitialize task signals that the driver process has started, activating the Entity Instance task, which resolves the target equipment entity and retrieves its attributes.
  • These attributes usually contain connection-specific parameters (such as IP addresses, ports, or protocol settings). Once resolved, they are passed to the Driver Command Connect task, which uses them to establish the connection between the driver and the equipment.
  • The Equipment Configuration task defines the static driver setup. This configuration is independent of the equipment instance and remains constant across executions.

This design allows for controller reuse. Since parameters needed for the driver connection are stored as an attribute of an entity, by externalizing them into equipment attributes and resolving them through the Entity Instance task, the same controller can be applied to multiple equipment instances of the same type.

Entity Instance task typical usage

Remarks#

In scenarios with multiple drivers, a single Entity Instance task can be shared. The initialization output of one Driver Event OnInitialize task activates the entity resolution, and its output can be used to trigger multiple Driver Command Connect tasks (assuming that they rely on the same equipment attributes).