Import of Quantities
Referenced resources and buckets must be imported first. If a bucket or resource does not exist, a warning message is logged, and the corresponding quantity record is rejected.
These mapping types are applicable for importing quantities:
Mapped field | Description |
---|---|
Class.name | Resource references is required to identify the resource to be updated. |
Class.property | Property Reference |
bucket | Bucket reference date |
Component Class.name | Allocation Resource References |
These options can be used when importing quantities:
- Accumulate Mode
- Indicates if the import process accumulates multiple quantity values for the same resource, bucket, and property combination. Else, each quantity value for the same resource, bucket, and property combination overrides the previous value.
- Stop On First Error
- Indicate that a warning or error related to the quantity must stop the import process. All the changes are discarded.
Process
The target import class is identified from the specified Class.property
references in the mapping.
For each row specified for the import process, these steps are performed:
- Resolve the resource for the import class, using the specified
Class.name
resource references. Resources for Allocation classes must be resolved using resource references of the component classes in the Allocation classes. - Resolve the import bucket reference. The import bucket is resolved for the buckets for which the imported date is between the start date and end date of buckets
- For the resolved resource and bucket, set the quantity values for each of the specified
property references. Possible scenarios:
- If the Accumulate mode is enabled for an import process, the total of all quantity values for the same resource, bucket and property combination is accumulated into one final result for import.
- If the Accumulate mode is not enabled, only the last value for each resource, bucket and property combination is imported.
Validation rules
These validation rules are applicable for importing quantities:
- All Class names specified in the mapping must be valid. Else, this error message is
displayed:
Where, {0} Class name.APACS110=There is no class defined with name "{0}".
- All
Class.property
references provided must be valid. Else, this error message is displayed:
Where {0} = Property name, {1} = Class name.APACS109=There is no property with name "{0}" defined for class "{1}".
Class.property
reference cannot be a calculated property. Else, this error message is displayed:
Where, {0} = Class.propertyAPACS207=Cannot update calculated property "{0}"
- All
Class.property
references must be applicable for the same class. Else, this error message is displayed:
Where {0} = List of classes from the specifiedAPACS178=All properties in a quantity import must refer to the same class. Classes used: {0}
Class.property
references. - Resource reference must be valid. Else, this error message is
displayed:
Where, {0} = Class.resource name.APACS143=Resource not resolved for resource reference: {0}.
- Resource reference must be resolved for an Allocation class. Else, this error message is
displayed:
APACS144=Allocation Resource not found for "{0}" with components "{1}" and "{2}"
Where, {0} = Allocation class name
{1} = First component resource reference in ‘Class Name.Resource Name’ form
{2} = Second component resource reference in ‘Class Name.Resource Name’ form
-
Bucket specified for importing must be valid. Else, this error message is displayed:
APACS141=Bucket "{0}" not valid
Where, {0} = bucket name.
-
If an Allocation class is provided as a resource reference, this error is reported and the interface fails.
APACS266=Allocation class "{0}" is provided as a resource reference. Allocation classes can only be referenced via the classes components.
Where, {0} = Allocation class name.
Validation messages
If quantity values are rejected in the validation process, a summary of rejection is reported at the end of execution. For example:
APACS104=Rejected quantities for {0} resources/buckets for class "{1}".
Where, {0} = Number of resources rejected by import.
{1} = Class name of import, for which the resources are rejected.
A final message is logged to indicate the number of resources that are successfully imported. The duration of the process is also logged. For example:
APACS103=Imported {0} quantities for class "{1}" (duration {2}).
Where, {0} = Number of resources successfully imported.
{1} = Class name for which resources were imported
{2} = Duration of import, in format H:mm:ss