APL - PCC Provisioning Plugins - Buckets (3.2)

The provisioning functions include:


Note!

These functions can be used to interact with the PCC provisioning interface from APL.

pccGetData

Retrieves a specific UDR from the provisioning interface based on the stated UDR type and key.

drudr pccGetData( string 
        typename, string
        key )

Parameters

ParameterDescription

typename

The fully qualified typename of the requested UDR.

key

The primary key value of the requested UDR, which is unique.

Returns:

The matching UDR or null, if no matching UDR was found.

Example

drudr notification = pccGetData
("PCC.Products.Provisioning.Notification", "70");

will retrieve a UDR of the type PCC.Products.Provisioning.Notification with the key 70 .

pccListData

Retrieves a list with all the UDRs from the provisioning interface with the stated UDR type.

list<drudr> pccListData( string typename

Parameters

ParameterDescription

typename

The fully qualified typename of the requested UDRs.

Returns:

A list containing all the UDRs of the requested type.

Example

list<drudr> notificationsList = pccListData
("PCC.Products.Provisioning.Notification");

will return a list named notificationsList with all the UDRs that have the type PCC.Products.Provisioning.Notification .

pccCreateData

This function inserts a new UDR through the provisioning interface.

drudr pccCreateData( drudr udr )

Parameters

ParameterDescription

udr

The new UDR to insert.

Returns:

The created UDR or null if there was an error.

Example

drudr created = pccCreateData(input);

will insert a new UDR named created through the provisioning interface.

pccUpdateData

This function updates a UDR through the provisioning interface.

drudr pccUpdateData( drudr udr )

Parameters

ParameterDescription

udr

The UDR to update.

Returns:

The updated UDR or null if there was an error.

Example

drudr udr = pccUpdateData(created);

will update the UDR named created through the provisioning interface.

pccDeleteData

This function deletes a UDR in the provisioning interface.

drudr pccDeleteData( drudr udr )

Parameters

ParameterDescription

udr

The UDR to delete.

Returns:

The deleted UDR or null if there was an error.

Example

drudr udr = pccDeleteData(created);

will delete the UDR named created through the provisioning interface.

pccLastErrorCode

If any of the create, delete or update operations should fail, the error code can be retrieved with this method.

int pccLastErrorCode()

Parameters

Return code

Explanation

200

Will be returned if the last operation was successful.

400

Will be returned if the object just created/updated is referring to one or more objects that are missing.

401

Will be returned if the delete operation failed because the object contains references from other objects.

402

This error code is only applicable for the pccCreateData function, and will be returned if the object already exists.

403

Will be returned if any of the functions pccGetData, pccUpdateData, or pccDeleteData are referring to a missing object.

500

Will be returned if there was an error trying to read/write to storage.

Example

If the last error code was 500.

int errorCode = pccLastErrorCode();

will return 500.

pccLastErrorMessage

If any of the create, delete or update operations should fail, a more detailed description of the error can be retrieved with this method.

string pccLastErrorMessage()

Parameters

ParameterDescription

Returns:

A description of the last error.

Example

If the last error code was 500.

string errorMsg = pccLastErrorMessage();

will return a description of error code 500.

pccSetProvisioningArea

Sets a provisioning working area for the workflow. There are two areas available, TEST and PROD.

void pccSetProvisioningArea( string area )

Parameters

ParameterDescription

area

The name of the area to work against. All delete, update, get and create operations will use this area. Must be one of the either TEST or PROD.

Returns:Nothing

Example

pccSetProvisioningArea("TEST");

will set area TEST as working area for the workflow.

pccGetProvisioningArea

Retrieves the currently active area for the workflow.

string pccGetProvisioningArea()

Parameters


ParameterDescription

Returns:

The name of the currently active provisioning area.


Example

If the currently active area for the workflow is TEST,

string area = pccGetProvisioningArea();

will return "TEST".

pccCopyAreaData

Copies configurations from one area to another.


Warning!

This function will also clear the target area from all previous configurations before the new configurations are inserted.

string pccCopyAreaData
                    ( string  source ,
                      string  destination ,
                      string  configurations  )

Parameters


ParameterDescription

source

The name of the source area.

destination

The name of the destination area.

configurations

The configurations that you want to copy, e g PCC (for all PCC configurations), PCC.Products (for only Product configurations), PCC.Periods (for only Periods configurations), etc.

Returns:

Null if the command succeeded or the error message if there was an error.

Example

pccCopyAreaData("TEST","PROD","PCC.Products");

will copy all the provisioned products data from the area TEST to the area PROD.

If you want to copy all PCC related data, you can enter ("TEST","PROD","PCC").

pccClearArea

Clears an area. All content in the area will be deleted.

string pccClearArea( string  area  )

Parameters

ParameterDescription

area

The name of the area to clear.

Returns:

Null if the command succeeded or the error message if there was an error.

Example

pccClearArea("TEST", "PCC.Periods");

will clear the area TEST from old PCC configurations for periods.

If you want to delete all PCC related data, you can enter ("TEST","PCC").