Web Forms is one of the exciting new features of the recently released BPM 188.8.131.52. To really embrace the power of Web Forms, one must understand Forms Rules, which can give your forms dynamic behavior, such as showing a field or calculating a sum total. In this example, I'm going to show you how to use Form Rules to dynamically populate a dropdown (or list).
Step 1: Create the Web Form
Using Business Process Composer, create a new BPM Process calledDynamicDropdown. Then create a new Web Form calledDropdownForm. Add 2 dropdowns on the form:Country and City. Your form should look as follows:
Step 2: Add the Country Rule
If you're playing along at home, you are free to use the same public URL as it returns a list of 5 countries as JSON output (if you want your country added to the list, just let me know): https://javatrial0129-usoracletrial80797.java.us2.oraclecloudapps.com/LOVHelper/jersey/listvalues/countries. Just note that you will also need to add the Oracle Cloud's certificate to your WebLogic KeyStore See Calling an Oracle Cloud Service from Java for details.
Step 3: Add the City Rule
It's very common to have the results of one field determine the contents of another. In this case we only want to see cities that apply to the selected country. Create a second Form Rule as follows:
And that's all there is to it: