5. Exists API [ D_pxExists ]
Goal:
Use this D_pxExists API (When rule - pxExists) that evaluates if specified file or folder exists in repository or not. You may want to use this before Create file API or Delete API.
For D_pxExists API, pass in the following parameters:
Before Pega configuration, make sure you have some file in a repository. In this example, I have "EmployeeData.csv" in "parentfolder2/childfolder1/".
1. Create an activity as below. In the Step 1, I am setting required parameters for pxExists API.
2. In the Step 2 When condition, enter pxExists to evaluate if the file exists or not. pxExists return boolean.
3. Run this activity from Dev Studio. Since the file already exists, "File exists" is logged to the PegaRULES.log file.
And you can see it in Clipboard after runing in Data pages of clipboard.
**************************
0 Comments