March 5 2013

Every process needs an initiator, these come in all sorts of possibilities.  One of the most common is an Input Form.  An end user will have to fill out a form to initiate the process.  The problem with BPM is that you don't want to have to create an instance until the actual form is submitted.  One option is to build an ADF form that is available to anyone, and have that initiate the process.

Once you get your business components detailed, and the page designed, there a small trick to create a blank entry for the user to input.  ADF is designed such that it displays the values from within a database (or other data source).  The problem here is we don't want to display these values, we want to input blank ones.

The trick that I've learned to assist ADF in creating a blank form is to initialize your view objects and create a blank row when they get instantiated. 


private boolean initialized = false; . . . protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams) { super.executeQueryForCollection(qc, params, noUserParams); if(!initialized){ initFirstRow(); initialized=true; } } private void initFirstRow(){ Row r = this.createRow(); this.insertRow(r); }

Now when the page loads, all the fields are blank and the user can enter their data and submit as needed!

About the Author

Bio

Kevin has over 9 years experience in enterprise scale implementations. Kevin is very experienced in architecting, modeling and developing BPM processes, particularly those requiring advanced ADF UI screens, as well as setting up the infrastructure for the BPM solutions, which have integrated with multiple external systems.

Join the Conversation

Enter your first name. It will only be used to display with your comment.
Enter your email. This will be used to validate you as a real user but will NOT be displayed with the comment.
By submitting this form, you accept the Mollom privacy policy.