The ZAttributeCalculatorConvertMillisecondDuration class is a parameterized attribute calculator class to be used for converting time spans in the internal Software AG format MillisecondDurationType into a PPM time span format. The MillisecondDurationType format consists of a value in float format (no unit) containing a time span number in milliseconds.
Example of a time span output in PPM event format
<attribute type="DURATION_IN_MS">12618.0</attribute>
Example of the use of an attribute calculator class
<calcattr name="AT_KI_DURATION" type="OT_FUNC\" >
<calcclass name="com.idsscheer.ppm.server.keyindicator.attributecalculator.
ZAttributeCalculatorConvertMillisecondDuration">
<calcparam key="ATTRIBUTE_MILLISECOND_DURATION" value="AT_DURATION_IN_MS"/>.
</calcclass>
</calcattr>"
In this example, the attribute calculator identifies at all functions of a process instance the value of the AT_DURATION_IN_MS attribute, interprets the value as a value in milliseconds, and converts it into seconds. The result is rounded to full seconds and written to the AT_KI_DURATION attribute.
A precondition for using the calculator class is that the source attribute (in the example: AT_DURATION_IN_MS) be of the TEXT or DOUBLE type and the target attribute (in the example: AT_KI_DURATION) be of the TIMESPAN type.