Auto-Assignment of Ports to Fields

Introduction

Mapping DQ mapplet rule ports to PIM fields in the configuration view can be very tedious. Sometimes the field is already known in the context of a certain DQ rule. F.e. if the german short description of an article should be checked the field would be ArticleLang.DescriptionShort(7).
Also the description of a configuration won't differ that much from the one already provided by a mapplet. So, as an additional feature besides port auto assignment, if a mapplet is selected via mapplet selection dialog and the configuration has no description text yet, the description will be taken from the one in the mapplet.

Mapplet setup

In order for the Auto Assignment to take place, the mapplet rules have to be enriched with additional data when it is designed in IDQ Developer (example screenshots are taken from there). This is done by adding the entity and field identifiers to the description of the mapplet and the ports. To differ between this "meta" data and the real description the values are separated by the "|" symbol.

For the mapplet description the first of these tokens is the identifier of the input ports entity, the second one is the output ports entity and the last one is the actual description:

<Input Ports Entity identifier>|<Output Ports Entity identifier>|<Actual Real Mapplet Description>

So for the auto assignment of the input and output entities the description of the mapplet could look like this:

ArticleStructureMap | Article | Rule performs the following structure check to ensure all attributes defined at structure group are represented at item level. 
Returns: [No error; OK] if not or [List of missing attributes per item; Failed].

images/download/attachments/513738781/AutoAssignment_01.png
Properties definition of a mapplet

For the ports, the first token is the PIM field and the last one is the actual description:

<PIM Field> | <Actual Real Port Description>

So the description of the input ports could look like this:

ArticleStructureMap.StructureGroup | Structure Group Identifier for the item.

images/download/attachments/513738781/AutoAssignment_02.png
Port properties definition

Special fields which are also valid for auto assignment:

Logical keys (speration via ":") - f.e. ArticleStructureMap:structureId

"Object_ID" - this means the internal id of an object (database id)

Fields starting with "QualityStatusEntry" like "QualityStatusEntry.Status" - the QualityStatus entity is an own entity not being a subentity of another entity. So it has to be treated specially in the context of auto assignment.

Preconditions

There are cases when auto assignment won't be done although the rule meta data provides enough information. Check the logic below to see when auto assignment of fields will be done and when not. Note that in cases auto assignment is not done for any reason (f.e. missing data) there won't be any ui feedback in order not to overload the ui here.

  • The mapplet rule description meta data must contain entity identfiers for BOTH input and output ports. If not, NONE of the entities and fields are auto assigned

  • Both entities must be valid PIM entities and be either the same entity as in the configuration group defined in PIM or be a subentity of that one. If not NONE of the entities and fields are auto assigned

If these requirements are met each port is auto assigned seperately

  • the field must be a valid entity supporting dataquality

  • the field's entity must match the one of the actual ports entity (f.e. if the input ports entity is "Article" the field must be part of the "Article" entity either directly or as a subentity field f.e. like "ArticleLang")
    The exceptions are the virtual "Object_ID" field and the "QualityStatusEntry" fields as described above.

Auto Assigning Root Entities

The Auto Assignment also considers the Root Entity Feature which allows mapping a port to a root entity field.

For example one may define "Purchasing data" as subentity of Item. The mapplet description would look something like this:

ArticlePurchase | Article | <Actual Real Mapplet Description>

and the field in the port description may now be from the root entity:

ArticleLang.Remarks(7) | Remarks of the item with that purchasing data