Customizing import options during data import
You can configure the data import wizard to import data in the background or outside the Data Designer.
Importing data in the background
Beginning with Pega 7.2.2, you can skip the screen that shows the data import progress after you click Import records step of the data import process. You can return to the Data Designer while the data import process runs in the background. This action also skips the addition of the data import item to your worklist, which prevents your worklist from getting crowded.
in the- Override the pyPreProcessDataImport activity.
- Set the value of the pySkipImportStatusUiAndAssignment property in the activity to true.
Skipping the import progress screen
You can see the data import progress on the D_pxDataImportProgress data page.
Importing data outside the Data Designer
Beginning with Pega 7.2.2, you can import data from anywhere in your application without navigating to the Data Designer.
- Run the pxImportRecordsAPI activity to import data outside the Data Designer with the following parameters:
- dataImportPage – Page that contains all the details required to upload data records for import. This page has the following information:
- pyImportPurpose – Data import purpose
- pyDataImportClass –Class for which records are imported
- pyClassName –Class for which records are imported (same as pyDataImportClass)
- pyDataImportFilePath –Location of the .csv file from which records are imported
- pyFieldMappingsForAPI –Page List property of Embed-FieldMapping class that holds the mapping between the .csv file and the class property
- pyListSeparator –List separator that is used to split the records in the .csv file
- pyLocale – The locale that is used to show the messages
- pyID –Unique ID of the data import process
- isAsynchronous – Boolean value that identifies whether the data import process is asynchronous or synchronous
- processID –Unique ID that allows you to check the data import progress details. If you want to pass this ID, its value should appear in the dataImportPage as pyID'; otherwisethe pxImportRecordsAPI activity creates a new ID.
- errorFile – Name of the .csv file containing the erroneous records that were encountered while processing data for import
- dataImportPage – Page that contains all the details required to upload data records for import. This page has the following information:
The pxImportRecordsAPI activity for data import outside the Data Designer
To see the progress of the data import, you can call the D_pxDataImportProgress data page by passing the value of processID for your data import.
Configuring a data import link
Beginning with Pega 7.2.2, you can include the link for data import anywhere in your application and call it in the background from a service or agent.
- On the properties panel of a cell, click Actions.
- Add an action set, and specify the Flow in Modal Dialog action with the pxDataRecordsImport flow.
Configuring the data import link