GetRtEntitiesByWellKnownName@1
Node GetRtEntitiesByWellKnownName@1
is used to extract runtime entities by their well-known names from the OctoMesh Asset Repository.
Well-known names are unique identifiers that are assigned to runtime entities in the OctoMesh Asset Repository. These names can be used to retrieve specific entities from the repository based on their unique identifiers.
Adapter Prerequisites
Node Configuration
For fields path
see Overview. Fields targetPath
, targetValueWriteMode
, and targetValueKind
is not used in this node.
transformations:
- type: GetRtEntitiesByWellKnownName@1 # Get the runtime entities by well-known name
path: $.subPath # The path to an object or array of objects containing the well-known names as properties.
ckTypeId: "OctoSdkDemo/Customer" # The type of the runtime entities
skip: 0 # The number of records to skip
take: 10 # The number of records to take, the default is 10
wellKnownNamePath: $.wellKnownName # The path to the well-known name in the payload
rtIdTargetPath: $.rtId # The path where the runtime entity ID should be stored in the payload
ckTypeIdTargetPath: $.ckTypeId # The path where the CK type ID should be stored in the payload
modOperationPath: $.modOperation # The path where the mod operation should be stored in the payload
generateInsertOperation: true # Generate insert operation for the runtime entity if true otherwise false (that means entity not found in the repository)
Usage Example
Here's an example of how you might use the GetRtEntitiesByWellKnownName@1
node in a transformation pipeline. In this example, the node retrieves runtime entities by their well-known names and stores the runtime entity ID, CK type ID, and modification operation in the payload.
triggers:
- type: FromPipelineDataEvent@1
description: Retrieve from distributed event hub message
transformations:
# Create a unique string for order items
- type: Concat@1
path: $.orders[*]
concatSubPath: $.orderItemId
parts:
- valuePath: $.Header.OrderNumber
- value: _
- valuePath: $.Operation.SequenceNumber
# search for existing orders and order items
- type: GetRtEntitiesByWellKnownName@1
ckTypeId: "Demo/Order"
path: $.orders[*]
rtIdTargetPath: $.order.rtId
ckTypeIdTargetPath: $.order.ckTypeId
modOperationPath: $.order.modOperation
wellKnownNamePath: $.Header.OrderNumber
generateInsertOperation: true
- type: GetRtEntitiesByWellKnownName@1
ckTypeId: "Demo/OrderItem"
path: $.orders[*]
rtIdTargetPath: $.orderItem.rtId
ckTypeIdTargetPath: $.orderItem.ckTypeId
modOperationPath: $.orderItem.modOperation
wellKnownNamePath: $.orderItemId
generateInsertOperation: true