Conditional attribute type calculation

The conditional calculation of attribute types allows attribute type calculation to be controlled. This control is based on the existence check for attribute types or the result of comparisons. The existence check distinguishes between the two cases of Attribute type exists (exists XML element) and Attribute type specified (filled XML element).

In the example below, the calculation element <if> returns the value Null, if there is no AT_B function attribute in the process instance. In this case, the set of results generated by the attribute XML element is empty.
If at least one AT_B attribute exists at any function in the process instance, the value of the filteredattribute XML element is transferred.

<if>

<exists>

<attribute name="AT_B" nodetype="OT_FUNC"/>

</exists>

<then>

<filteredattribute name="AT_C" nodetype="OT_FUNC"

filter="EARLY"/>

</then>

</if>

By linking conditions using logical operators, more complex conditions can also be formulated. The example shown is to be expanded to include a test for an existing attribute value.

<if>

<and>

<exists>

<attribute name="AT_B" nodetype="OT_FUNC"/>

</exists>

<filled>

<attribute name="AT_B" nodetype="OT_FUNC"/>

</filled>

</and>

<then>

<filteredattribute name="AT_C" nodetype="OT_FUNC"

filter="EARLY"/>

</then>

</if>

As the existence of the corresponding attribute type is a prerequisite for an existing attribute value, the check for existence can be skipped to optimize the condition.

In the following example, the <if> calculation element returns the value NULL if an attribute type with the name AT_G is not specified for any of the occurring functions.

<if>

<exists>

<filteredattribute name="AT_G" nodetype="OT_FUNC"

filter="LATEST"/>

</exists>

</if>