TaskFlows can be launched as a Popup in a couple of ways in ADF. The most common, I think, is through a taskflow control-case with the following settings:
Then there is the obvious, region in a popup where we drop a fragment taskflow directly inside a popup. I'll show the two common case using a direct popup and a dialog.
The limitation of using it as a direct region though is that the close button is outside the controls of the taskflow, basically, the taskflow itself does not call the close unlike the use of an inline popup as described in the first example. So what happens if we just call the taskflow return from the taskflow? As described in F. Nimphius Fusion Dev Guide, the taskflow itself will close thus closing the binding itself. Here's an example.
For the fragment, we'll have the return button but this time, it will call an actionListener instead of the controlcase for the return.
Presto. Hope that helps.