Calculate dangerous goods points

Resolver – Abstract

Purpose: Evaluates the dangerous goods attributes contained in the reference object to determine an overall score in conjunction with the ADR details of the respective dangerous goods substance.

images/download/attachments/78258647/image2020-1-21_10-38-50-version-1-modificationdate-1629800712780-api-v2.png

The Calculate dangerous goods points resolver evaluates dangerous goods attributes in the context of the reference object, in order to calculate dangerous goods points based on the ADR details of the dangerous goods substance.

Manifests, Shipments, Orders or a Common business object are suitable input objects for this evaluation.

Besides, the resolver also accepts individual line items of these business object types as input objects. In this case, only dangerous goods attributes linked immediately to the line item (via a 'product') are evaluated. Sub-items must be evaluated individually, as they are not part of the data structure of the parent line item.

The evaluation applies the following calculation for each relevant dangerous goods attribute:

  1. The relevant quantities are derived from property Outer quantity (outerQuantity), which combine indications of Outer quantity value (value) and Outer quantity unit (unit), featuring choices for the unit based on dynamic enumerations Weight & mass units and Volume unit. Selected units are converted to one of the base units for dangerous goods points, which are predefined as 'Litres' (l) for volume units or 'Kilograms' (kg) for units of mass. Valid definitions for these conversions must be provided in the definitions of the respective dynamic enumerations.

  2. The relevant quantity is rounded down to an integer number of base units (l or kg) for each individual dangerous goods attribute.

    images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/warning.svg CAUTIONimages/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/warning.svg As decimals are 'implicitly truncated' as part of the evaluation, each affected dangerous goods attribute will contribute less dangerous goods points to the total than it would according to different calculation/rounding rules. Whether this practice is acceptable for a given application context of the resolver, should be subject to careful consideration. In case of doubt or to meet specific requirements, the calculation process should be designed explicitly (e.g. involving a For each loop in an event handler).

  3. The integer value for the relevant quantity of a dangerous goods attribute is multiplied by the Multiplier (multiplier) defined as part of the master data indicated as ADR details for the relevant dangerous substance. The product of these factors defines the dangerous goods points of the dangerous goods attribute.

  4. The value returned by the resolver is the total of all dangerous goods points evaluated from individual dangerous goods attributes. As this return value is defined to be of type Long, a value of 0 is also returned, if no dangerous goods attributes are found at all.

Configuration

The Calculate dangerous goods points value resolver expects a reference object that contains or can contain dangerous goods attributes.

It does not use parameters.

Example

An association criterion is designed to discriminate, whether or not the total of dangerous goods points evaluated for shipments joined by a manifest exceeds a certain limit (here: 1000 points).

Configuration:

The association criterion is configured as shown on the right:

  • Within an AND junction, a Check type first ensures that an entity of the 'Manifest' type (see Manifests) is present as the reference object.

  • If a 'Manifest' exists as a reference object, the Entity property rule arranged below is evaluated. This determines the sum of the dangerous goods points for the manifest via the Calculate dangerous goods points value resolver. The result is compared with the statically defined limit of 1000 points. The rule is only considered 'passed' if this is exceeded (see Compare with (Form designer)).

►IMPORTANT◄ Observe the warning regarding rounding effects (item 2 in the calculation procedure above), if operative decisions depend on this type of association criterion.

images/download/attachments/78258647/image2020-1-21_11-34-9-version-1-modificationdate-1629800712774-api-v2.png