Created
January 15, 2022 00:54
-
-
Save nidri/46c7a7ef48feb27830d51cab111f68d7 to your computer and use it in GitHub Desktop.
Pega - Get instances from DeferredOps into Pagelist - SAVE operations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a Code-Pega-List page | |
tools.createPage("Code-Pega-List", "Instances"); | |
// Connect to Pega DB and get deferred operations | |
PegaDatabase db = (PegaDatabase) tools.getDatabase(); | |
java.util.Iterator deferredOps = db.getDeferredOps().iterator(); | |
while (deferredOps.hasNext()) { | |
ClipboardPage instancePage = null; | |
DeferredOperation op = (DeferredOperation) deferredOps.next(); | |
// Getting instances only for SAVE operations | |
if (op instanceof DeferredOperation.SaveInstance) { | |
DeferredOperation.SaveInstance saveInstance = (DeferredOperation.SaveInstance) op; | |
instancePage = saveInstance.getInstance(); | |
tools.findPage("Instances").getProperty("pxResults").add(instancePage); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment