Ingredients

The root entity "Ingredient" can be used to maintain information about ingredients. This data can be viewed and maintained in the perspective "Ingredients":

images/download/attachments/84541727/image2016-3-24_11_58_55.png

The header data can be maintained in the main table view "Ingredients". For each ingredient several "Organic ingredients" can be added in the corresponding detail table view (see screenshot). All this data is importable, versionable and exportable.

The ingredients are currently only referenced by items (see perspective "Food and beverage", view "Ingredient component").

Please note, that when having many ingredients, each server startup may take several seconds up to one minute for the steps "Init IngredientEnumProvider for locale ..." (depending on the number of Ingredients in the system), where for each configured language the entries of the Ingredient EnumProvider will be cached.

Import of Ingredients

Ingredient information can be imported standalone like any other root entity (like "Item", "Product", "Structure Group", ...) or together with Items in a hierarchical way.

Import Ingredients standalone

In case of a standalone import, the identifier of the Ingredient has to be assigned in the import mapping:

images/download/attachments/85199533/image2016-3-31_15_31_39.png

As for all other root entities, if an ingredient with a certain identifer already exists, this ingredient is updated.

Import Ingredients together with Items

Therefore in the import perspective the ingredient information also appears as part of the Item, as if it were an Item subentity:

images/download/attachments/84541727/image2016-3-24_12_24_34.png

Ingredient identifier is provided

If an ingredient identifier is provided in the import data, it can simply be assigned in the import mapping. If an ingredient identifier is not provided in the import data, probably the identifier can be calculated through an import function (e.g. Prefix + "Ingredient name"). If during the import process an ingredient with the given identifier already exists, the ingredient is updated. If such an ingredient does not exist, a new Ingredient is created.

The item is linked to the ingredient automatically.

Ingredient identifier is not provided

If it is not possible or desired to assign the Ingredient identifier, the identifier field assignment can be left empty. During import process, it is checked if an Ingredient with the same content is existing, using a duplicate finding logic (see section below). If it exists, then it will be reused and automatically linked to the item. If it does not exist, then a new ingredient is created and the identifier is generated via the standard identifier generator (that is also used, when creating new ingredients via the Ingredient view) .

Duplicate finding logic for Ingredients

When an Ingredient is saved, a so called "Internal lookup key" is generated, which contains a MD5 hash code of the complete Ingredient data (including all sub entity information, excl. the Ingredient identifier). This "Internal lookup key" is used, to find duplicates during the import process (see last section above).

Import Items with link to ingredients

Only the Identifier field of the Ingredient has to be mapped:

images/download/attachments/85199533/image2016-3-31_16_25_5.png

Performance hint

Benchmarks show, that a standalone Ingredient import (see section "Import Ingredients standalone" above) together with a standalone item Import (see section "Import Items with link to ingredients" above) is 20% faster than an hierarchical import of Ingredients together with Items (see section "Import Ingredients together with Items" above).

Export of ingredients

New data sources are available for the export for root entity 'Ingredients':

  • All ingredients

  • Changed and new ingredients

The ingredient information can be exported as sub entity of an item as well.

Customizing

The extension point com.heiler.ppm.ingredient.sever.ingredientStatementProvider is provided where the computation logic for the computed field 'Ingredient Statement' (ArticleIngredientLang.IngredientStatement) can be customized. As per default the provider generates a simple statement which is concatenated by the sequence number order. For more information see documentation in the customization guide.