Remove all instances of Editable data page with parameters in Pega 8.7.x

Hi Team,

I am trying to remove Data Page instances from clipboard using Activity. Data Page mode is editable and it is having parameters to fetch the data. I tried using below approaches, still it didn’t work. Can someone please help in implementing this.

Approach 1: Did obj-open for declare rule and calling java step pega.getDeclarativePageUtils().flushPage(tools.getStepPage());

Approach 2: Did Page Remove with Param

Approach 3: Load Data Page with Param

Approach 4: Calling Call Rule-Declare-Pages.FlushDeclarativePage for flushing the Page

None of the above approaches worked.

Added images for code for all the 4 approaches

@UadayTarunKumarY Can you try this java step?

https://support.pega.com/question/how-can-i-flush-all-datapage-instance-without-passing-any-parameter

@Anoop Krishna Page-Remove is working.