Additional information

This section provides additional information on methods, events, parameters and metadata.
  • You can set a specific target where to deploy the recipe. The structure of the target must be the same as the structure saved in the recipe schema.
  • You can use recipes with a ListView or by using NetLogic.
  • A recipe parameter is an Item or DataItem selected in the RecipeSchema editor. The recipe parameters represented in a ListView are always presented as read-only.
  • The recipes introduce an elevated number of insert/update/delete operations for certain tasks. This may increase the time needed to complete operations, especially for remote databases and high latency. To prevent data loss, minimal transaction management is supported. Transaction management is not customizable.
    IMPORTANT: To prevent data loss when working with DataLogger and EventLogger, it is highly recommended not to use the same database that is used for recipes.
  • You can use the legacy recipe schema and the new recipe schema in the same project but it may require manual adjustments.
  • Query to
    EmbeddedDatabase
    example:
    SELECT R.*, M.* FROM Recipes AS R LEFT JOIN "RecipeMetadata_RecipeSchema1" AS M ON R.Id = M.RecipeId WHERE R.RecipeSchemaName = 'RecipeSchema1' ORDER BY R.Name

Methods

The following tables describe methods and related parameters:
Method available from the IDE and through C# API
Method
Input arguments
Output arguments
CreateRecipe
  • RecipeId [RecipeId]
  • Result [CreateRecipeResultCode]
    • Success: the recipe has been created successfully
    • MissingRecipeId: the method was called with an empty RecipeId
    • RecipeAlreadyExist: a recipe with the same name and version already exists
    • StoreError: an error occurred while accessing the store
    • Error: an error occurred
DuplicateRecipe
  • RecipeId [RecipeId]
  • NewRecipeId [RecipeId]
  • Result [DuplicateRecipeResultCode]
    • Success: the recipe has been duplicated successfully
    • GenericError: a general error occurred during recipe duplication
    • StoreError: an error occurred while accessing the store (e.g., database error)
    • UnexpectedSourceEmptyRecipeName: the source recipe name provided is empty or null
    • UnexpectedTargetEmptyRecipeName: the target recipe name provided is empty or null
    • SourceRecipeDoesNotExist: the source recipe was not found in the store
    • TargetRecipeAlreadyExist: a recipe with the target name already exists
    • TargetNotFound: the target node for recipe duplication was not found
RenameRecipe
  • RecipeId [RecipeId]
  • NewName [String]
  • Result [RenameRecipeResultCode]
    • Success: the recipe has been renamed successfully
    • GenericError: a general error occurred during recipe renaming
    • StoreError: an error occurred while accessing the store (e.g., database error)
    • UnexpectedEmptyRecipeName: the recipe name provided is empty or null
    • SourceRecipeDoesNotExist: the source recipe was not found in the store
    • TargetRecipeAlreadyExist: a recipe with the target name already exists
DeleteRecipe
  • RecipeId [RecipeId]
  • Result [DeleteRecipeResultCode]
    • Success: the recipe has been deleted successfully
    • GenericError: a general error occurred during recipe deletion
    • StoreError: an error occurred while accessing the store (e.g., database error)
    • UnexpectedEmptyRecipeName: the recipe name provided is empty or null
    • RecipeDoesNotExist: the specified recipe was not found in the store
Refactor
  • None
None. This is the only async method. When the operation is completed, an event (RefactorCompleted) is dispatched.
GetDataItems
  • RecipeId [RecipeId]
  • Result [GetDataItemsResultCode]
    • Success: the data items have been retrieved successfully
    • RecipeNotFound: the specified recipe was not found in the store
    • StoreError: an error occurred while accessing the store (e.g., database error)
    • GenericError: a general error occurred while retrieving the data items
SetRecipeDataItemValue
  • RecipeId [RecipeId]
  • ItemRelativeBrowsePath [String]
  • DataItemRelativeBrowsePath [String]
  • ElementAccess [ElementAccess]
  • Value [BaseDataType]
  • Result [SetRecipeDataItemValueResultCode]
    • Success: the recipe data item value has been set successfully
    • GenericError: a general error occurred while setting the data item value
    • StoreError: an error occurred while accessing the store (e.g., database error)
    • DataItemNotFound: the specified data item was not found in the recipe
    • UnexpectedEmptyRecipeName: the recipe name provided is empty or null
    • RecipeNotFound: the specified recipe was not found in the store
SetRecipeMetadataValue
  • RecipeId [RecipeId]
  • MetadataName [String]
  • Value [BaseDataType]
  • Result [SetRecipeMetadataValueResultCode]
    • Success: the recipe metadata value has been set successfully
    • GenericError: a general error occurred while setting the metadata value
    • StoreError: an error occurred while accessing the store (e.g., database error)
    • UnexpectedEmptyRecipeName: the recipe name provided is empty or null
    • RecipeNotFound: the specified recipe was not found in the store
    • MetadataNotFound: the specified metadata field was not found in the recipe
TransferFromEditModelToStore
  • RequesterNodeId [NodeId]
  • RecipeId [RecipeId]
  • Result [TransferFromEditModelToStoreResultCode]
    • SuccessRecipeCreated: the recipe has been successfully created and transferred from edit model to store
    • SuccessRecipeUpdated: the recipe has been successfully updated and transferred from edit model to store
    • GenericError: a general error occurred during the transfer from edit model to store
    • StoreError: an error occurred while accessing the store (e.g., database error)
    • RequesterNodeNotFound: the requester node was not found
    • UnexpectedEmptyRecipeName: the recipe name provided is empty or null
    • TargetNotFound: the target node for the transfer was not found
    • EditModelNodeNotFound: the edit model node was not found
TransferFromEditModelToTarget
  • RequesterNodeId [NodeId]
  • TargetNodeId [NodeId]
  • ErrorPolicy [ErrorPolicyDataType]
  • Result [TransferFromEditModelToTargetResultCode]
    • Success: the recipe has been transferred from edit model to target successfully
    • GenericError: a general error occurred during the transfer from edit model to target
    • StoreError: an error occurred while accessing the store (e.g., database error)
    • RequesterNodeNotFound: the requester node was not found
    • TargetNotFound: the target node for the transfer was not found
    • EditModelNodeNotFound: the edit model node was not found
    • DataMismatch: there is a mismatch between the edit model data and target structure
TransferFromStoreToEditModel
  • RequesterNodeId [NodeId]
  • RecipeId [RecipeId]
  • Result [TransferFromEditModelToTargetResultCode]
    • Success: the recipe has been transferred from edit model to target successfully
    • GenericError: a general error occurred during the transfer from edit model to target
    • StoreError: an error occurred while accessing the store (e.g., database error)
    • RequesterNodeNotFound: the requester node was not found
    • TargetNotFound: the target node for the transfer was not found
    • EditModelNodeNotFound: the edit model node was not found
    • DataMismatch: there is a mismatch between the edit model data and target structure
TransferFromStoreToTarget
  • RecipeId [RecipeId]
  • TargetNodeId [NodeId]
  • ErrorPolicy [ErrorPolicyDataType]
  • Result [TransferFromStoreToTargetResultCode]
    • Success: the recipe has been transferred from store to target successfully
    • GenericError: a general error occurred during the transfer from store to target
    • StoreError: an error occurred while accessing the store (e.g., database error)
    • UnexpectedEmptyRecipeName: the recipe name provided is empty or null
    • RecipeNotFound: the specified recipe was not found in the store
    • TargetNotFound: the target node for the transfer was not found
    • DataMismatch: there is a mismatch between the recipe data and target structure
TransferFromTargetToEditModel
  • RequesterNodeId [NodeId]
  • TargetNodeId [NodeId]
  • ErrorPolicy [ErrorPolicyDataType]
  • Result [TransferFromTargetToEditModelResultCode]
    • Success: the recipe has been transferred from target to edit model successfully
    • GenericError: a general error occurred during the transfer from target to edit model
    • StoreError: an error occurred while accessing the store (e.g., database error)
    • RequesterNodeNotFound: the requester node was not found
    • TargetNotFound: the target node for the transfer was not found
    • EditModelNodeNotFound: the edit model node was not found
    • DataMismatch: there is a mismatch between the target data and edit model structure
TransferFromTargetToStore
  • RecipeId [RecipeId]
  • TargetNodeId [NodeId]
  • Overwrite [Bool]
  • ErrorPolicy [ErrorPolicyDataType]
  • Result [TransferFromTargetToStoreResultCode]
    • SuccessRecipeCreated: the recipe has been successfully created and transferred from target to store
    • SuccessRecipeUpdated: the recipe has been successfully updated and transferred from target to store
    • GenericError: a general error occurred during the transfer from target to store
    • StoreError: an error occurred while accessing the store (e.g., database error)
    • UnexpectedEmptyRecipeName: the recipe name provided is empty or null
    • RecipeAlreadyExists: a recipe with the same name already exists in the store
    • TargetNotFound: the target node for the transfer was not found
    • DataMismatch: there is a mismatch between the target data and store structure
Methods available only through C# API
Method
Input arguments
Output arguments
GetRecipes
No input arguments
  • Result [GetRecipesResult] (Array)
    • Success: the recipes have been retrieved successfully
    • StoreError: an error occurred while accessing the store
    • GenericError: a general error occurred while retrieving the recipes
GetRecipeMetadataValue
  • RecipeId [RecipeId]
  • MetadataName [String]
  • Result [GetRecipeMetadataValueResult]
    • Success: the recipe metadata value has been retrieved successfully
    • GenericError: a general error occurred while retrieving the metadata value
    • StoreError: an error occurred while accessing the store
    • UnexpectedEmptyRecipeName: the recipe name provided is empty or null
    • RecipeNotFound: the specified recipe was not found in the store
    • MetadataNotFound: the specified metadata field was not found in the recipe
GetRecipeMetadataValues
RecipeId [RecipeId]
  • Result [GetRecipeMetadataValuesResult]
    • Success: the recipe metadata values have been retrieved successfully
    • GenericError: a general error occurred while retrieving the metadata values
    • StoreError: an error occurred while accessing the store
    • UnexpectedEmptyRecipeName: the recipe name provided is empty or null
    • RecipeNotFound: the specified recipe was not found in the store
GetRecipeDataItemValue
  • RecipeId [RecipeId]
  • ItemRelativeBrowsePath [String] (Array)
  • DataItemRelativeBrowsePath [String] (Array)
  • ElementAccess [ElementAccess]
  • Result [GetRecipeDataItemValueResult]
    • Success: the recipe data item value has been retrieved successfully
    • GenericError: a general error occurred while retrieving the data item value
    • StoreError: an error occurred while accessing the store
    • DataItemNotFound: the specified data item was not found in the recipe
    • UnexpectedEmptyRecipeName: the recipe name provided is empty or null
    • RecipeNotFound: the specified recipe was not found in the store
CreateEditModel
  • ParentNodeId [NodeId]
  • RequesterNodeId [NodeId]
  • TargetNodeId [NodeId]
  • RecipeId [RecipeId]
  • Result [CreateEditModelResultCode]
    • Success: the edit model has been created successfully
    • GenericError: a general error occurred while creating the edit model
    • StoreError: an error occurred while accessing the store
    • ParentNodeNotFound: the parent node for the edit model was not found
    • RequesterNodeNotFound: the requester node was not found
TransferFromStores
RecipeId [RecipeId]
  • Result [TransferFromStoreResultCode]
    • Success: the recipe has been transferred from store successfully
    • GenericError: a general error occurred during the transfer from store
    • StoreError: an error occurred while accessing the store
    • RecipeNotFound: the specified recipe was not found in the store
    • TargetNotFound: the target node for the transfer was not found
TransferToStore
  • RecipeId [RecipeId]
  • Result [TransferToStoreResultCode]
    • Success: the recipe has been transferred to store successfully
    • GenericError: a general error occurred during the transfer to store
    • StoreError: an error occurred while accessing the store
TransferToTarget
  • TargetNodeId [NodeId]
  • ErrorPolicy [ErrorPolicy]
  • Result [TransferToTargetResultCode]
    • Success: the recipe has been transferred to target successfully
    • GenericError: a general error occurred during the transfer to target
    • StoreError: an error occurred while accessing the store
    • TargetNotFound: the target node for the transfer was not found
    • DataMismatch: there is a mismatch between the recipe data and target structure
TransferFromTarget
  • TargetNodeId [NodeId]
  • ErrorPolicy [ErrorPolicy]
  • Result [TransferFromTargetResultCode]
    • Success: the recipe has been transferred from target successfully
    • GenericError: a general error occurred during the transfer from target
    • StoreError: an error occurred while accessing the store
    • TargetNotFound: the target node for the transfer was not found
    • DataMismatch: there is a mismatch between the target data and recipe structure
SetDataItemValue
  • ItemId [NodeId]
  • DataItemRelativeBrowsePath [String] (Array)
  • ElementAccess [ElementAccess]
  • DataTypeId [NodeId]
  • Value [BaseDataType]
  • Result [SetDataItemValueResultCode]
    • Success: the data item value has been set successfully
    • GenericError: a general error occurred while setting the data item value
    • StoreError: an error occurred while accessing the store
    • DataItemNotFound: the specified data item was not found

Events

The Recipe schema includes the following events:
RefactorCompleted
Fired when the method Refactor is completed.
RecipeApplicationEvent
Fired when TransferFromStoreToTarget or TransferEditModelToTarget are completed.

Parameters and metadata

You can create, edit, and store recipe schemas with unlimited parameters and metadata.You can define and store custom metadata, such as author or creation date or an associated image, which enhances traceability and contextual understanding of recipes.

Database Tables

Recipe schema model structure can be stored in the database, preserving the information if a variable stands alone or is part of an object. Recipe parameters are displayed in rows organized as follows:
  • Recipes:
    • Id (Primary key) [UInt32]
    • Name [String]
    • Version [String]
    • RecipeSchemaName [String]
    • RecipeSchemaNamespaceUri [String]
    • RecipeSchemaTimestamp [DateTime]
    • CreatedAt [DateTime]
    • ModifiedAt [DateTime]
  • RecipeItems:
    • Id (Primary key) [UInt32]
    • RecipeId [UInt32]
    • RelativeBrowsePath [String]
    • TypeId [String]
  • RecipeDataItems:
    • Id (Primary key) [UInt32]
    • RecipeItemId [UInt32]
    • RelativeBrowsePath [String]
    • ElementAccess [String]
    • DataTypeId [String]
    • Value [String]
  • RecipeMetadata:
    • Metadata1 [UserDefined]
    • Metadata2 [UserDefined]
    • Metadata_n [UserDefined]
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal