APL - PCC Mapper Support - Buckets

The mapper support is used for accessing a table in the products database containing references to the products that are applicable for the specified service.

The mapper support functions include:

Note!

These functions can be used to create and use a PCC flexible mapper object.

pccMapperCreate

This function creates a mapper object.

any pccMapperCreate ( string area , string typename [, string argumentsField , string targetField ] ) 

Parameters

Parameter

Description

Parameter

Description

area

The name of the area which the mapper is operating against.

typename

The fully qualified UDR typename to be used for the mapper configuration information.

argumentsField

The field name of the field that contains the argument list to be used for matching. This field must be a list of strings. Either null or the string "*" can be used to signify a wildcard matching. This field is optional.

targetField

The field name of the field that contains the target value. This is the value that should be returned from the pccMapperGet function. This field is optional.

Returns:

A mapper object that can be used in pccMapperGet.



Example



productMapping = pccMapperCreate ("PROD", "PCC.Products.Provisioning.ProductMapping");

will create a mapper object named productMapping that will use the PCC.Products.Provisioning.ProductMapping UDR type and operate against the PROD area.

pccMapperGet

This function will return a list of matching targets from PCC mapper objects, where the targets will be returned in priority order.

list<any> pccMapperGet ( [any mapper,] any argument1 [, any argument2, ... ) 

Parameters

Parameter

Description

Parameter

Description

mapper

The mapper table in which you want to find matching targets. This field is optional. If no mapper is stated, the mapper last used by the workflow will be used for the lookup.

argument...n

Any number of arguments that you want the targets to match to match using the mapper object. The number of arguments must match the mapper configuration.

Returns:

A list with the matching target(s), or null if the mapper did not find any matching targets.



Example



will return targets matching argument 55 in the productMapping mapper object.

If there are five targets with the same priority; A, B, C, D, and E, and D and E matches argument 55, a list containing [D,E] will be returned.

If there are three targets with priority 2; A, B, C, and three targets with priority 1; D, E and F, and targets B-E matches argument 55, a list containing lists for each priority will be returned displaying the matches in priority order; [[D,E],[B,C]].

pccMapperGetFlat

This function will return a list of matching targets from PCC mapper objects, where the priority is not taken into consideration.

Parameters

Parameter

Description

Parameter

Description

mapper

The mapper table in which you want to find matching targets. This field is optional. If no mapper is stated, the mapper last used by the workflow will be used for the lookup.

argument...n

Any number of arguments that you want the targets to match to match using the mapper object. The number of arguments must match the mapper configuration.

Returns:

A list with the matching target(s), or null if the mapper did not find any matching targets.



pccMapperGetIndex

This function will provide a list of all matching products with an index for each matching. This index may then be used by the pccMapperGetFromIndex function below for retrieving the products applicable for the actual object.

Parameters

Parameter

Description

Parameter

Description

mapper

The mapper object to be used for matching the arguments. This field is optional. If no mapper is stated, the mapper last used by the workflow will be used for the lookup.

argument...n

Any number of arguments to match using the mapper object. The number of arguments must match the mapper configuration.

Returns:

A list of the matching products with an index for each matching object, or null if the mapper did not match any data.



pccMapperGetFromIndex

This function will provide a list of products applicable for the stated object.

Parameters

Parameter

Description

Parameter

Description

mapper

The mapper object to be used for matching the arguments. This field is optional. If no mapper is stated, the mapper last used by the workflow will be used for the lookup.

index

The index for the object that you want to retrieve products for.

Returns:

A list of products applicable for the object with the stated index.