Hi All,
I have a form interface, when the button is clicked, i want to invoke the rule!xxx and if submit depends on the rule result, and i only have one button.
Discussion posts and replies are publicly visible
From past experimentation on my end, I can tell you with pretty high confidence that the "submit" behavior can't be evaluated dynamically at "click time".
The way I'd recommend you do this is to have a Refresh Variable that evaluates "rule!xyz" live (depending on whatever variable changes effect its output) and just set the "refresh" value of your button to its current state. Thus anytime you change something on-form that would affect the "submit" value, it'll already be set for you as soon as the user clicks the button.
Thank you, but i use "rule!xyz" to invoke a java application which will save the data , I tried your method,it will invoke the save api when the variable refresh and i dont want to save a form twice or more,can you give me some suggestions?
So you call an integration to persist the data on submit of the form?
Do you need to display any validation messages returned by your Java app? If no, why not just call the integration in the process after the form is submitted?
yes, i want to display on the form interface if java app return some error message
OK, then I suggest to still submit into the process and in case of any error, loop back to the user input task.
thank you.