Thursday, November 1, 2012

ADF Taskflow : Clean PageFlowScope

We used pageflowscope between pagefragment or other node in bounded taskflow. But when we exit the taskflow ,it does not get clear automatically. So in order to improve performance , we can clear the scope manually by calling the clear method.

Taskflow properties has two property Initializer and Finalizer which can be binded to method call . So we can write a method in managed bean which will clear pageflowscope variable while exiting taskflow.

Finalizer :-

public void cleanScope(){
    RequestContext.getCurrentInstance().getPageFlowScope().clear();
}

No comments:

Post a Comment