You are currently reviewing an older revision of this page.

DRAFT KB-XXXX

Symptoms

When casting a Custom Data Type to a new type, the cast CDT contains different data than the original CDT. In addition, the application in question has more than one process variable with the same name, and this process variable is used to cast the CDT.

For example, imagine that this process variable is named 'pv!sameName', and a process report is constructed with one column definition expression =pv!sameName and the next column definition expression =cast('type!{urn:com:appian:types}CDT_Casted_Type', pv!sameName). These columns should display the same data (as the cast should only alter the data type). However, some of the rows in this report shows that these column definition expressions are returning completely different data.

Cause

Appian has scalar and list versions for all types. For example, INTEGER would be 1, LIST_OF_INTEGER would be 101. In process analytics, Appian also has the concept of BULK versions of these types, which are evaluated by taking the negative value of the original type value. For example, BULK_INTEGER would be -1, BULK_LIST_OF_INTEGER would be -101. These BULK types allow Appian to perform a single evaluation of the column definition expression, rather than evaluate it once per row.

In the case described above, the process variable pv!sameName exists as the BULK version of its CDT type. However, the cast is enforcing that it must be converted to the regular, non-BULK type.

In the case of the process report, the column definition expressions are only evaluate once, and the result of a single evaluation of a non-BULK list is a pointer to the head of that list. This results in repeated data values.