Skip to main content
May 31, 2022
Question

How to submit a form after the invoke of rule which in the saveInto of submitButton?

  • May 31, 2022
  • 6 replies
  • 0 views

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.

6 replies

mikes0011
Brainy
May 31, 2022

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.

The Expression Guru
linl6549Author
June 1, 2022

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?

stefanhelzle0001
Brainy
June 1, 2022

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?