ADF: Using Save Point Restore Finalizer

In the previous blog post, we have created an explicit save point in Oracle ADF 12c (12.1.3), but this time I will use the Save Point Restore Finalizer to execute the removeSavePoint method after the task flow’s state has been restored. This way, everytime I restore a save point, it will be removed from database.

To do this, I will use the application of this post: ADF: Using Save Points (Explicit).
Download the sample application: ADFSavePointApp_v2.

Open the dept-flow task flow.
Go to Overview page and click the icon that appears near the Save Point Restore Finalizer property field.
Expand the nodes: ADF Controller Objects > controllerContext > savePointManager, and select removeSavePoint method.
Add sessionScope.savePointSelected as method parameter.

#{controllerContext.savePointManager.removeSavePoint(sessionScope.savePointSelected)}

adf-using-save-point-restore-finalizer1

Go back to Diagram page and remove the removeSavePoint Method Call.
Open the deptEditView page, remove the second Save Now button and the rendered property of the other buttons.

adf-using-save-point-restore-finalizer2

Deploy the application and enjoy!
Restore the save point, and it will be removed from database.

adf-using-save-point-restore-finalizer3

adf-using-save-point-restore-finalizer4

adf-using-save-point-restore-finalizer5

adf-using-save-point-restore-finalizer6

Waslley Souza

Author: Waslley Souza

Consultor Oracle com foco em tecnologias Oracle Fusion Middleware e SOA. Certificado Oracle WebCenter Portal, Oracle ADF e Java.

Leave a Reply

Your email address will not be published. Required fields are marked *