Skip to content

Get Mesh Record

The Get Mesh Record node is used to retrieve a specific record from an Elastic Search index using its Record Id. It is typically used in workflows that require fetching structured data from the Mesh system for further processing.

Overview

This node connects to the configured Elastic Search service and retrieves a document based on its ID. The document data is returned as a variable, making it available for use in downstream nodes.

Inputs

LabelTypeDescriptionRequiredExample
Record IdTextThe unique identifier of the record to fetchabc123-record

Outputs

This node stores the result in a variable called RecordData.

Output VariableDescription
RecordDataThe raw JSON document returned from Elastic Search, containing the matching record data.

Behavior

  • The node authenticates to Elastic Search using stored service credentials for Elastic Search.
  • Searches the _all index using the given Record Id.
  • If the record is found, the node sets RecordData in the workflow's data dictionary and marks the task as successful.
  • If the record is not found or an error occurs, the node will fail with an appropriate message.

Authentication

Note: While the class contains a method AuthenticateMesh, it is not used during execution of this task. Authentication with Elastic Search is handled via the service token (GetServiceAccountAsync("Elastic Search")).

Example Use Case

You can use GetMeshRecord at the beginning of a workflow to extract metadata or configuration stored in Elastic Search and then pass it to other nodes like document generation or conditional logic processors.

Error Handling

ConditionStatusMessage
Record Id is missing or emptyFailRequired Parameters not found
Elastic Search token retrieval failsFailFailed to Execute
Record not found in Elastic SearchFailFailed to get Record
Multiple or zero hits returned by searchFailUnable to get Record by id

Tentech 2024