I have an Interface with Cancel and Submit button. This interface also has Rule Inputs defined for Cancel and Submit. I also had defined a process model for this Interface. I have kept the process model screenshot as well to this. When I am testing the Process Model, program always goes to "Import Excel to Database node", this happens even when I hit Cancel button the Interface. I feel the button clicks are not sending/capturing the correct values onto process model. Can you please let me what am I doing wrong here?
Discussion posts and replies are publicly visible
Buttons work differently then input fields. In Input fields you enter a value which gets saved in parameter passed in saveinto. Same value gets displayed when you pass that parameter in value part
For Buttons you pass the value which gets save into paramater set in saveinto,
In your case, you would only need one ruleinput, which is ri!cancel
code should look like this
a!buttonWidget( label: "submit", value: false, saveInto: ri!cancel, submit: true() ), a!buttonWidget( label: "cancel", value: true, saveInto: ri!cancel, submit: true(), //Validate as false so that you can avoid checking required fields validation/ validate:false )
This way in your xor gate you can use pv!cancel to determine which path to take.
Thank you Kumar, your suggestion worked.
if it has helped, please upvote the answer so that it can help others