I have a TF with 3 train stops.
On the last train stop I commit all modifications made so far.
For that I have a button.
The button has to programmatically open a popup with a dialog, asking if the user is sure to save changes.
If the answer is yes, It should go up on the ok control flow case in the diagram.
If the answer is no, I should pick up the cancel control flow case in the diagram.
Here is a print screen of the flow.

The ok task-flow-return has Behaviour: End Transaction = commit;
The cancel task-flow-return has Behaviour: End Transaction = rollback;
I have the following method:
public void navigate(String controlFlowCase){
NavigationHandler nvHndlr =
FacesContext.getCurrentInstance().getApplication().getNavigationHandler();
nvHndlr.handleNavigation(FacesContext.getCurrentInstance(), null, controlFlowCase);
}
When I press ok, i call navigate("ok");
When I press cancel, I call navigate("cancel");
However the error below is thrown:
ADF_FACES-60096:Server Exception during PPR, #1
javax.el.ELException: java.util.EmptyStackException
at javax.el.BeanELResolver.getValue(BeanELResolver.java:266)
at com.sun.faces.el.DemuxCompositeELResolver.\_getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at com.sun.el.parser.AstValue.getValue(Unknown Source)
at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:73)
Can you please advise me whether i'm doing something wrong?
Is there another way to achieve this?
Also, I want to mention that I manually set activity property of the button to either "ok" or "cancel" it works without fail.