ADF https://www.avioconsulting.com/blog/categories/adf en Documentation - You'll Thank Yourself Later https://www.avioconsulting.com/blog/documentation-youll-thank-yourself-later <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/documentation-youll-thank-yourself-later" hreflang="en">Documentation - You&#039;ll Thank Yourself Later</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><p>Documentation. Hardly anybody wants to write it, but it is one of the most important deliverables in a software project. Without documentation, it becomes very difficult to understand why things were done the way they were and if the project is operating as expected. </p> <p>I have joined several projects where there was a lack of documentation. Sometimes you’ll be blessed with comments, but, in my experience, the only comments to be found are commented-out code. In Oracle SOA/BPM projects and Mulesoft projects, documentation is even rarer than in other projects. I’m not perfect - I’ve contributed to this problem as well. I’ve completed some code for a project and then, a month later, had to come back to the same code and figure out what the code is supposed to be doing in order to make modifications. Many developers will tell you the “code is self-documenting”, but the code doesn't show you the intent. In order to ascertain intent, one must consult documentation or requirements, and it isn’t always clear which code fulfills which requirements.</p> <p><img alt="Commented Code" data-entity-type="file" data-entity-uuid="43364b49-d141-484b-b9f0-16cc483e2808" height="131" src="/sites/default/files/inline-images/Screen%20Shot%202019-01-07%20at%201.20.40%20PM.png" width="655" class="align-left" /></p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p>We are all better than this!</p> <p> </p> <p><img alt="Mulesoft Notes Field" data-entity-type="file" data-entity-uuid="c0233439-8a75-4080-9dba-1d4fc57a2f2e" height="330" src="/sites/default/files/inline-images/Screen%20Shot%202019-01-04%20at%203.47.00%20PM.png" width="652" /><img alt="Oracle Documentation" data-entity-type="file" data-entity-uuid="99c29f98-1b67-41ac-a57a-955eb78665b5" height="256" src="/sites/default/files/inline-images/Screen%20Shot%202019-01-04%20at%203.44.24%20PM.png" width="505" /></p> <p>Save your colleagues and yourself some unnecessary time and document your code. It is possible to figure out what a chunk of code is supposed to do, but it takes much less time to read a sentence that says what the code is meant to do. The comment doesn’t have to be extremely detailed, it just needs to express the general idea. Put a comment in your Java code, fill in the Description field in your BPMN or BPEL activities, or write something in that Notes attribute on your Mulesoft message processors. Don’t leave the comments blank - you will thank yourself later!</p> </div> </div> </div> </div> </div><div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=738&amp;2=comment_node_blog&amp;3=comment_node_blog" token="Xxgpqfan-pc6CC8yR5FIbxX217LJ64swBJCwEYY6THI"></drupal-render-placeholder> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-12 blog-tags"> <div> <div><a href="/blog/categories/adf" hreflang="en">ADF</a></div> <div><a href="/blog%3Fbid%3D332" hreflang="en">MuleSoft</a></div> <div><a href="/taxonomy/term/365" hreflang="en">Oracle</a></div> <div><a href="/blog/categories/bpm" hreflang="en">BPM</a></div> <div><a href="/blog/categories/soa" hreflang="en">SOA</a></div> <div><a href="/blog/categories/other" hreflang="en">Other</a></div> </div> </div> </div> </div> <div><drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=views_block__blogs_block_4&amp;1=default&amp;2=en" token="jBjf0n8iki9sjPwElNYA4B92vVETYVFMv7O9pm9FdHQ"></drupal-render-placeholder></div> <div> <div>About the Author</div> <div></div> </div> </div> </div> Mon, 07 Jan 2019 19:38:32 +0000 Adam Mead 738 at https://www.avioconsulting.com https://www.avioconsulting.com/blog/documentation-youll-thank-yourself-later#comments ADF Autogeneration from Oracle BPM Human Tasks https://www.avioconsulting.com/blog/adf-autogeneration-oracle-bpm-human-tasks <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/adf-autogeneration-oracle-bpm-human-tasks" hreflang="en">ADF Autogeneration from Oracle BPM Human Tasks</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><p>Something we typically have to learn on our own is how to (1) auto-generate an ADF form and project from an Oracle BPM project and (2) how to reuse the ADF project when subsequently generating more ADF forms.</p> <p>This has changed slightly in 12.2.1, and this provides step-by-step instructions on how to do this.  This is an excerpt from Lesson 3 of AVIO's new <a href="http://www.avioconsulting.com/avio-academy/oracle-bpm-self-paced-developer-workshop">Oracle BPM Developer Training for 12.2.1</a>.</p> <p><strong>Create an ADF Project and Form from a Human Task</strong></p> <p>Because human tasks in Oracle BPM projects are associated with the interactive activities, ADF forms can be automatically generated from the information flowing into and out of the human  tasks.</p> <p>1. Inside the <em>Applications</em> tab, expand the <strong>SOA </strong>folder -&gt; expand the <strong>Human Tasks</strong> folder. <br /><img alt="Human Task - expand folder" data-entity-type="file" data-entity-uuid="12cc8dbf-02c4-4809-973c-d3c7e26a07ff" src="/sites/default/files/inline-images/1_0.jpg" /></p> <p>2. Double click <strong>ApproveCandidate.task</strong>.</p> <p>3. As shown below, click the <strong>Form</strong> dropdown -&gt; <strong>Launch Task Form Wizard</strong>.</p> <p><img alt="Launch Task form Wizard to Auto-generate and ADF form" data-entity-type="file" data-entity-uuid="1a7b666c-fd76-4ef9-934a-ca1040d93f20" src="/sites/default/files/inline-images/2_0.jpg" /></p> <p>4. Give the new ADF project a name.<br /><img alt="Name the ADF project" data-entity-type="file" data-entity-uuid="570039f7-dcb2-4040-ac35-630aeb6c2c28" src="/sites/default/files/inline-images/3_0.jpg" /></p> <p>Be patient as the ADF wizard is working.  The speed that it is created depends on the speed of the machine you are using and its available memory.  This might take anywhere from just a minute to over 3 minutes. </p> <p>5. For step 1 of the wizard, leave the dialog set to the default values -&gt; click <strong>Next</strong>.</p> <p><img alt="Name the new ADF form" data-entity-type="file" data-entity-uuid="a12236f2-b2a1-49dd-9075-32158af85e49" src="/sites/default/files/inline-images/Name%20the%20Form.jpg" /></p> <p>6. For step 2, leave the defaults set to the default values.  Once the form is created, the <em>Other actions (menu) </em>and <em>Outcomes </em>checkbox selections will become apparent -&gt; click <strong>Next</strong>.</p> <p><img alt="step 2 of wizard" data-entity-type="file" data-entity-uuid="4281ed97-ed92-43a7-9f97-301f16565768" src="/sites/default/files/inline-images/5.jpg" /></p> <p>7. For step 3, change the number of columns to 2 to display the fields on the form in multiple columns -&gt; click <strong>Next</strong>.</p> <p> <img alt="Show fields in multiple columns" data-entity-type="file" data-entity-uuid="03d3868c-26b9-40df-b161-0c5d68b49372" src="/sites/default/files/inline-images/6.jpg" /></p> <p>8. Step 4 defines the fields that will be on the left column (assuming 2 columns were selected previously) of the generated user interface.  Select the root element in the left panel (or the individual fields) -&gt; click the &gt; button.</p> <p><img alt="Select fields to display on the form" data-entity-type="file" data-entity-uuid="56511c89-3869-4bde-805d-bca491c487c3" src="/sites/default/files/inline-images/8.jpg" /></p> <p>Click <strong>Next</strong>.</p> <p>9. Step 5 defines the fields that will be on the right side of the generated user interface.  </p> <p><img alt="Select fields for second column on the form" data-entity-type="file" data-entity-uuid="ad2474a4-1b75-4061-8420-f4dd0d5a11aa" src="/sites/default/files/inline-images/9.jpg" /></p> <p>Click the &gt; button to add them to the second column in the form in the next step -&gt; click <strong>Next</strong>.</p> <p>10. For step 6, leave the <em>Comments, Attachments, </em>and <em>History </em>checkboxes checked and click <strong>Next</strong>.</p> <p>11. Click <strong>Finish.  </strong>Wait a few minutes for the generated form to appear.</p> <p><img alt="The generated ADF form" data-entity-type="file" data-entity-uuid="41bce710-de60-425d-99e0-c88844a7c43e" src="/sites/default/files/inline-images/12_0.jpg" /></p> <p>Due to the selections made in the wizard, note the fields in the two columns, and the buttons in the upper right corner.  Scroll down in the form and note the <em>Comment</em>, <em>History</em> and <em>Related Link </em>(attachment) sections.</p> <p>12. Save your application.</p> <p><strong>Add an ADF Form and Task Flow into an Existing ADF Project</strong></p> <p>A new ADF project was just created and an ADF form was automatically generated at the same time.  Here you will see how a new ADF form can be created and placed inside the existing ADF project using another human task in a BPM project. While this was useful to create the ADF project and to create ADF user interface form very quickly and easily, this task steps you through the common requirement to simplify the application’s structure by having several ADF forms and their task flows reside in a single project.</p> <p>1. Right mouse click the ADF<strong> </strong>project that was just created in the Application Navigator tab -&gt; click <strong>New</strong> -&gt; <strong>From Gallery</strong>.</p> <p><img alt="Right mouse click the ADF project" data-entity-type="file" data-entity-uuid="ecda0c99-5ece-48b0-8369-4228c5a7af34" src="/sites/default/files/inline-images/1b.jpg" /></p> <p>2. Type “<strong>human</strong>” in the search tab -&gt; select <strong>ADF Task Flow Based on Human Task (JSF) </strong>-&gt; <strong>OK</strong>.</p> <p><img alt="Select &quot;ADF Task Flow Based on Human Task...&quot;" data-entity-type="file" data-entity-uuid="cc8e636b-8f2e-4e85-b9ca-5ddadd72c858" src="/sites/default/files/inline-images/2b.jpg" /></p> <p>3. As shown below, open the <em>HumanTasks </em>folder under the <em>SOA </em>folder in the <em>EmployeeOnboardingProject</em> composite project under the <em>EmployeeOnboarding </em>application (click the up folder icon in the dialog’s toolbar -&gt; double click the existing BPM project's<strong> </strong>folder -&gt; double click the -&gt; <strong>SOA </strong>folder).</p> <p> </p> <p>Double click the <strong>HumanTasks </strong>folder.  If the correct directory has been selected, the BPM composite project’s two human tasks should be listed. </p> <p><img alt="Select the human tasks folder in the BPM project" data-entity-type="file" data-entity-uuid="320ffcd2-dc16-4627-ba6e-920221f37a6f" src="/sites/default/files/inline-images/ht.jpg" /></p> <p>As shown above, select the human task -&gt; click <strong>OK</strong>.  </p> <p>4. Wait a minute for the next dialog to appear.  In the <strong>Create Task Flow </strong>dialog, leave the default entries settings as they are and simply click <strong>OK</strong>.</p> <p><img alt="Task Flow name" data-entity-type="file" data-entity-uuid="4a10bf33-a0de-4ed8-90f2-132842f9d42b" src="/sites/default/files/inline-images/4b.jpg" /></p> <p>Having done this, the generated task flow should now appear.  Before creating the new Create Candidate form, give the automatically created view activity in the task flow a more meaningful name by scrolling down in the diagram and right mouse clicking the <strong>jspx </strong>activity in the task flow -&gt; <strong>Refactor </strong>-&gt; <strong>Rename. </strong></p> <p><img alt="Refactor to change name" data-entity-type="file" data-entity-uuid="714f56a0-cdf5-4f06-9941-db443130bc4f" src="/sites/default/files/inline-images/10b.jpg" /></p> <p>Rename the view to a more accurate name -&gt; <strong>OK</strong>.</p> <p>13. Create the new user interface page by double clicking jspx view that was just renamed -&gt; name the JSF page form<strong> </strong>-&gt; <strong>OK</strong>.</p> <p><img alt="Name the page" data-entity-type="file" data-entity-uuid="8bc654ab-7987-47f5-950e-6885161fdde9" src="/sites/default/files/inline-images/13b.jpg" /></p> <p>14. An empty form is now created and opened.  Add the buttons and input fields into the empty form by first expanding the <strong>Data Controls </strong>accordion tab in the <em>Applications</em> tab on the left -&gt; initially the tab will be empty so to refresh the tab, click the refresh icon as shown below.</p> <p><img alt="Refresh Data Control Tab" data-entity-type="file" data-entity-uuid="c2dbec1c-d8da-45fc-bd6e-21d1688949c7" src="/sites/default/files/inline-images/Refresh%20Data%20Control.jpg" /></p> <p>15. Expand the ADF project in the data control tab -&gt; expand <strong>getTaskDetails…</strong> -&gt; expand <strong>Return.</strong></p> <p>To populate the form, drag <strong>Task </strong>into the form.</p> <p><img alt="Task onto the form" data-entity-type="file" data-entity-uuid="dfa7f0ad-8f51-4acd-834d-32e2ddc3434b" src="/sites/default/files/inline-images/Task%20onto%20the%20form.jpg" /></p> <p>From the popup, select <strong>Human Task </strong>-&gt; <strong>Complete Task with Payload.</strong></p> <p><img alt="Add Human Task onto the form" data-entity-type="file" data-entity-uuid="09dd51c2-dde2-4ef0-90f8-852e0b024afb" src="/sites/default/files/inline-images/14b.jpg" /></p> <p>Click <strong>OK</strong>.  Give JDeveloper a few minutes to generate the form.</p> <p>Having done this, the default auto-generated form based on the human task has been created.</p> <p><img alt="Generated Form" data-entity-type="file" data-entity-uuid="450a06b0-c8b5-472e-b9cf-fad9a8e9ca58" src="/sites/default/files/inline-images/15_0.jpg" /></p> <p>16. Save the project and application. </p> <p>There are two bugs in Oracle BPM 12.2.1 automatic ADF form generation that today require manually editing the source.  The ADF forms automatically generated based on human tasks should be able to be created without having to edit the source of the jspx file in the ADF project each time as shown below.  Until this issue is corrected, continue to edit the jspx files generated after creating them.  How to correct these issues is described in this blog post <a href="http://www.avioconsulting.com/blog/oracle-bpm-1221-adf-auto-generation-issue-solutions">Oracle BPM 12.2.1 ADF Auto-Generation Issue Solutions</a>.</p> <p> </p></div> </div> </div> </div> </div><div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=615&amp;2=comment_node_blog&amp;3=comment_node_blog" token="sUjNiDuR4mfljrCtqGr6-7-CFMxivbi4ZxguOshC_vQ"></drupal-render-placeholder> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-12 blog-tags"> <div> <div><a href="/blog/categories/adf" hreflang="en">ADF</a></div> <div><a href="/blog/categories/bpm" hreflang="en">BPM</a></div> </div> </div> </div> </div> <div><drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=views_block__blogs_block_4&amp;1=default&amp;2=en" token="jBjf0n8iki9sjPwElNYA4B92vVETYVFMv7O9pm9FdHQ"></drupal-render-placeholder></div> <div> <div>About the Author</div> <div></div> </div> </div> </div> Fri, 06 Jan 2017 15:25:22 +0000 Dan Atwood 615 at https://www.avioconsulting.com https://www.avioconsulting.com/blog/adf-autogeneration-oracle-bpm-human-tasks#comments Oracle BPM 12.2.1 ADF Auto-Generation Issue Solutions https://www.avioconsulting.com/blog/oracle-bpm-1221-adf-auto-generation-issue-solutions <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/oracle-bpm-1221-adf-auto-generation-issue-solutions" hreflang="en">Oracle BPM 12.2.1 ADF Auto-Generation Issue Solutions</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><p>Others may disagree, but I am a fan of creating the first cut of ADF forms for Oracle BPM using the human task's auto-generation feature.  While this worked well in previous releases, in 12.2.1.1, 12.2.1.2 and 12.2.1.3 small manual edits are now needed to eliminate the errors on the generated form.</p> <p>There are now two types of errors caused by 12.2.1.x auto-generation - edAttTy errors and duplicate ID errors. </p> <h3><strong>Patches</strong></h3> <p>While this blog describes the manual edits you can make to the auto-generated .jspx files to correct the issues:</p> <ul><li>If you are on 12.2.1.1, you can request a backport against bug 24683218 and then apply the patch provided.  Until this patch is provided, continue to manually edit the generated .jspx files as described below.</li> <li>If you are on 12.2.1.2, you can apply patch 25333619 to prevent auto-generation errors from occurring.</li> <li>If you are on 12.2.1.3, you should only get the "duplicate ID" errors described below.  I have not tried it yet, but Support suggested applying patch <span>26317255 </span> to prevent these auto-generation errors from occurring.  If this does not work, manually edit the generated .jspx files as described below.</li> </ul><h3><strong>edAttTy Errors</strong></h3> <p>The first type of error on the generated page causes "Referenced id edAttTy does not exist" errors throughout the form:</p> <p><img alt="edAttTy Error on Auto-Generated ADF Forms" data-entity-type="file" data-entity-uuid="306ae52f-e19c-4dd9-bec7-f63dc0f6dba7" height="290" src="/sites/default/files/inline-images/edAttTy%20error.jpg" width="697" /></p> <p>Although customer support document Doc ID 2192543.1 describes the issue, this describes how the forms can be fixed.  </p> <p>1. In JDeveloper, click the <strong>Source </strong>tab at the lower left corner of the form that has the error. </p> <p><img alt="ADF Form's Source Tab" data-entity-type="file" data-entity-uuid="fc44e774-9263-4fc8-8844-dfffebe3220c" src="/sites/default/files/inline-images/sourceTab.jpg" /></p> <p>2. Scroll down and note the errors on the page.</p> <p><img alt="Form Errors" data-entity-type="file" data-entity-uuid="85299275-4a2a-454c-a8c0-cb4c87a6aaf7" height="474" src="/sites/default/files/inline-images/form%20errors.jpg" width="706" /></p> <p>All of the errors are caused by the auto-generation bug that did not create an element on the form with the id <em>edAttTy</em>.  To work around this issue, this text will be added to the ADF form:</p> <p>                       &lt;af:selectOneRadio label="#{resources.ATTACH_TYPE}"<br />                                          value="#{pageFlowScope.readAttachmentBean.selectedAttachmentType}"<br />                                          valueChangeListener="#{pageFlowScope.readAttachmentBean.toggle}"<br />                                          autoSubmit="true" id="edAttTy"<br />                                          layout="horizontal" immediate="true"&gt;<br />                         &lt;af:selectItem label="#{resources.DESKTOP_FILE}"<br />                                        value="file" id="si1a"/&gt;<br />                         &lt;af:selectItem label="#{resources.URL}" value="url"<br />                                        id="si2a"/&gt;<br />                         &lt;/af:selectOneRadio&gt;</p> <p>3. In the search field on the form, search for the text <strong>UPLOAD_TO_PROCESS</strong>.</p> <p><img alt="Search for the text &quot;UPLOAD_TO_PROCESS&quot;" data-entity-type="file" data-entity-uuid="5c1b2e63-6fcc-4058-aaa6-a630ac51b3c5" height="249" src="/sites/default/files/inline-images/upload%20to%20process.jpg" width="620" /></p> <p>4. As shown below, add a blank line above this element’s <em>&lt;af:selectOneRadio …</em></p> <p><img alt="Insert blank line into the source" data-entity-type="file" data-entity-uuid="fc54af8e-a014-43c5-bf65-eaa82b4ad8ca" src="/sites/default/files/inline-images/insert%20line.jpg" /></p> <p>5. Insert the text copied from step 2 into the blank line.</p> <p>6. Save the jspx page.  This should have fixed almost all of the errors in the jspx. </p> <h3><strong>Duplicate ID Errors</strong></h3> <p>You will note that in 12.2.1, one or more errors will still exist on the page because elements have been given same id when the form was automatically generated.  The error message is:</p> <p><em>While JSF allows duplicate IDs isolated by naming containers, ADF Faces requires IDs to be unique across the document.</em></p> <p>1. To fix these, first go to the line with the error by double clicking the error in the <em>Live Issues… </em>tab.</p> <p><img alt="Live issues tab" data-entity-type="file" data-entity-uuid="320d80a8-7b18-4f91-be98-7fb6f6f05f37" height="294" src="/sites/default/files/inline-images/Live%20issues.jpg" width="626" /></p> <p>2. Fix the issue by adding the text “dup” at the end of the <em>id </em>name.  For example, after double clicking an error change this text:</p> <p><img alt="Duplicate IDs in the auto-generated form" data-entity-type="file" data-entity-uuid="a6e08535-076d-4152-b555-a9d19b7cb38e" src="/sites/default/files/inline-images/duplicate%20IDs.jpg" /></p> <p>To this:</p> <p><img alt="Fix for Duplicate ID error" data-entity-type="file" data-entity-uuid="f4f5e7bd-93bc-4db5-a50f-f6782691f364" src="/sites/default/files/inline-images/duplicate%20IDs%20fix.jpg" /></p> <p>If there is more than one of these errors, repeat this step until all of the duplicate ids have been corrected on the form.  </p> <p>3. Save the jspx page.  There should now be no errors on the page.</p> <p>The ADF forms automatically generated based on human tasks should be able to be created without having to edit the source of the jspx file in the ADF project each time.  The patches suggested above will be of some help, but until this issue is corrected for all 12.2.1.x releases we will need to edit the auto-generated ADF forms. </p></div> </div> </div> </div> </div><div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"> <div>Bill Hodson</div> </div> <div class="comment-date"> <div>February 3, 2017</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>Thanks for the information, Dan.  </p> <p>Hard to believe these errors are getting worse with each release. </p> <p> </p> <p> </p></div> </div> </div> </div> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"> <div>Miguel</div> </div> <div class="comment-date"> <div>January 15, 2018</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>Awesome. Thanks.</p></div> </div> </div> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=619&amp;2=comment_node_blog&amp;3=comment_node_blog" token="tujtbSkq4n4TSsZ7E3uN8iyZoMxfvGpmskj6Se1ZOpo"></drupal-render-placeholder> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-12 blog-tags"> <div> <div><a href="/blog/categories/adf" hreflang="en">ADF</a></div> <div><a href="/blog/categories/bpm" hreflang="en">BPM</a></div> </div> </div> </div> </div> <div><drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=views_block__blogs_block_4&amp;1=default&amp;2=en" token="jBjf0n8iki9sjPwElNYA4B92vVETYVFMv7O9pm9FdHQ"></drupal-render-placeholder></div> <div> <div>About the Author</div> <div></div> </div> </div> </div> Sun, 18 Dec 2016 17:11:55 +0000 Dan Atwood 619 at https://www.avioconsulting.com https://www.avioconsulting.com/blog/oracle-bpm-1221-adf-auto-generation-issue-solutions#comments Creating Cascading Dropdowns in ADFbc Driven ADF Forms https://www.avioconsulting.com/blog/creating-cascading-dropdowns-adfbc-driven-adf-forms <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/creating-cascading-dropdowns-adfbc-driven-adf-forms" hreflang="und">Creating Cascading Dropdowns in ADFbc Driven ADF Forms</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><p>The purpose of this post is to document, step-by-step, how to create cascading dropdowns in an ADF form's user interface when ADFbc is used.  A cascading dropdown frequently occurs in forms and occurs when a selection made in one field's dropdown automatically and dynamically changes the list of valid values in another field's dropdown.  This topic uses address fields for this example.  After selecting a country from the country field's dropdown list, the state field's list of valid states or provinces is changed to show the list of states / provinces for the country selected.</p> <p>Although there are videos that describe how this is done, it is invariable done with an unnecessarily complex database or the online lesson is missing key steps.  The steps documented here use a simple database with three tables, it is written with the assumption that you are not an expert with ADF and most importantly - it has been thoroughly tested and it works.</p> <h2 id="CreatingCascadingDropdownsinADFbcDrivenADFForms-CascadingDropdownsinaUserInterface">Cascading Dropdowns in a User Interface</h2> <p>These are the two interdependent dropdowns that will be built following the steps listed in this topic. </p> <p><img src="/sites/default/files/page-images/u70/1.jpg" style="border-width: 0px; border-style: solid; width: 364px; height: 198px;" /></p> <p>Once the Country is changed, the list of States/Provices is automatically updated to reflect the states or provinces for the country picked</p> <p><img src="/sites/default/files/page-images/u70/2a%20cascade.jpg" style="border-width: 0px; border-style: solid; width: 581px; height: 597px;" /></p> <h2 id="CreatingCascadingDropdownsinADFbcDrivenADFForms-TheDatabase">The Database</h2> <p>The purpose of this post is to explain how cascading dropdowns work.  As a result, the database tables used were kept very simple.  Click <a href="/sites/default/files/page-images/u70/stateCountry.zip"><strong>here</strong></a> to download the SQL that creates three tables and inserts the rows needed. </p> <p><img src="/sites/default/files/page-images/u70/3%20db.jpg" style="border-width: 0px; border-style: solid; width: 787px; height: 313px;" /> </p> <p>There is a one to many relationship between the COUNTRY and the STATE_PROVINCE tables (countries can have many states/provinces).  These two tables will be used to create the two list of values (LOV) that will be used by the CANDIDATE table.  The CANDIDATE table has a STATE attribute that will use a read-only view object called StateProvinceLOV for its dropdown list and the COUNTRY attribute in the CANDIDATE table will use a country view object called CountryLOV for its dropdown.</p> <p>Before starting to follow the steps listed below, first run this SQL in an Oracle database schema that you have access to (e.g., if you have Oracle XE, you might want to run this using the existing HR schema that comes with it). </p> <h2 id="CreatingCascadingDropdownsinADFbcDrivenADFForms-CreatetheModelADFProject">Create the Model ADF Project</h2> <p>After having run the SQL that creates and loads the three tables, you will create the ADF project that will use the database tables in this step.</p> <p>Open JDeveloper and close your application if one is already open. </p> <p>Click <strong>New Application -&gt; </strong>Select <strong>Fusion Web Application (ADF) -&gt; </strong>Name the Application <strong>CascadingLovExample -&gt; </strong>click <strong>Finish.</strong></p> <p><br /><strong><img src="/sites/default/files/page-images/u70/4%20ap.jpg" style="border-width: 0px; border-style: solid; width: 736px; height: 567px;" /></strong></p> <p>After having done this, both a Model and a ViewController project were created.  Everything that will be done in the remainder of this topic will use the Model project.</p> <p><img src="/sites/default/files/page-images/u70/5%20model.jpg" style="border-width: 0px; border-style: solid; width: 324px; height: 298px;" /></p> <h2 id="CreatingCascadingDropdownsinADFbcDrivenADFForms-StepstoCreatingCascadingDropdownsinADFbcDrivenADFForms">Steps to Creating Cascading Dropdowns in ADFbc Driven ADF Forms </h2> <h3 id="CreatingCascadingDropdownsinADFbcDrivenADFForms-(1)AddtheEntityandViewObjectsintheModelProject">(1) Add the Entity and View Objects in the Model Project</h3> <p>One way to add the Entity Objects (EO) and View Objects (VO) is to run the "Create Business Components from Tables" wizard.  To start the wizard, right mouse click <strong>Model -&gt; </strong>click <strong>New</strong>.</p> <p><br /><img src="/sites/default/files/page-images/u70/6%20model%20new.jpg" style="border-width: 0px; border-style: solid; width: 381px; height: 331px;" /></p> <p> Enter the text <strong>tables </strong>in the search field <strong>-&gt; </strong>select <strong>Business Components from Tables -&gt; </strong>click <strong>OK </strong>to begin the wizard.</p> <p><img src="/sites/default/files/page-images/u70/7%20bc%20from%20tble.jpg" style="border-width: 0px; border-style: solid; width: 559px; height: 302px;" /></p> <h5 id="CreatingCascadingDropdownsinADFbcDrivenADFForms-ConnecttotheDatabaseSchema">Connect to the Database Schema</h5> <p>Create a connection to the database tables that will expose the ADF Business Component (ADFbc) Entity Objects (EO) and View Objects (VO) by clicking the plus icon on the right.</p> <p><br /><img src="/sites/default/files/page-images/u70/8a%20init%20bc.jpg" style="border-width: 0px; border-style: solid; width: 605px; height: 212px;" /><br /> Because this connects to the HR database schema on my machine, I named it HR (if this is the first time you have accessed the out of the box HR database schema that comes with Oracle XE, be sure to have unlocked it before performing this step)<strong> -&gt;</strong> in the Username field enter <strong>hr</strong> <strong>-&gt;</strong> enter the password for the <em>hr </em>schema which is normally <strong>hr</strong> <strong>-&gt;</strong> click the <strong>Test Connection </strong>button and ensure that that "Success!" is immediately displayed below the button.</p> <p><br /><img src="/sites/default/files/page-images/u70/9%20create%20db.jpg" style="border-width: 0px; border-style: solid; width: 431px; height: 506px;" /></p> <p> Click <strong>OK</strong>.</p> <h5 id="CreatingCascadingDropdownsinADFbcDrivenADFForms-CreatetheEntityObjectsandViewObjects">Create the Entity Objects and View Objects</h5> <p>Select the tables in the schema to use as the EOs and VOs in the model by selecting the <strong>Query </strong>button.  As shown below, then select the <strong>CANDIDATE</strong> table on the left and click the <strong>&gt;</strong> button.</p> <p><img src="/sites/default/files/page-images/u70/10%20candidate.jpg" style="border-width: 0px; border-style: solid; width: 677px; height: 199px;" /></p> <p>The CANDIDATE should now be in the "Selected" list on the right.  The CANDIDATE table will be used to display and edit information about a candidate using its view object.  This will contain both the state and country cascading dropdown fields.</p> <p><img src="/sites/default/files/page-images/u70/11%20cand.jpg" style="border-width: 0px; border-style: solid; width: 389px; height: 227px;" /></p> <p>Rename the Candidate Entity Object by changing its name in the field in the lower right corner to <strong>CandidateEO</strong>.</p> <p><img src="/sites/default/files/page-images/u70/12%20cand%20eo.jpg" style="border-width: 0px; border-style: solid; width: 375px; height: 295px;" /></p> <p>Click <strong>Next</strong>. </p> <p>In the <em>Updateable View Object</em> step in the wizard, change to package name to end in <strong>model.view -&gt; </strong>select the <strong>Candidate (HR.CANDIDATE) </strong>and click the <strong>&gt; </strong>button.</p> <p><img src="/sites/default/files/page-images/u70/13%202%20of%206.jpg" style="border-width: 0px; border-style: solid; width: 546px; height: 351px;" /></p> <p> Rename the Candidate View Object by changing its name in the field in the lower right corner to <strong>CandidateVO</strong>.</p> <p><img src="/sites/default/files/page-images/u70/14%20cand%20vo.jpg" style="border-width: 0px; border-style: solid; width: 421px; height: 214px;" /></p> <p>Click <strong>Next</strong>.</p> <h3 id="CreatingCascadingDropdownsinADFbcDrivenADFForms-(2)CreatetheLOVs">(2) Create the LOVs</h3> <p>While the CandidateVO will be used to display the cascading dropdowns, in the <em>Read-Only View Objects</em> step in the wizard you will create the two lists for the cascading dropdown lists.  Select the <strong>Query</strong> button <strong>-&gt;</strong> select <strong>COUNTRY </strong>and select <strong>STATE_PROVINCE</strong> -&gt; click the<strong> &gt; </strong>button.</p> <p><img src="/sites/default/files/page-images/u70/15%20ro%20vo.jpg" style="border-width: 0px; border-style: solid; width: 865px; height: 475px;" /></p> <p> Select <strong>STATE_PROVINCE </strong>and change its name to<strong> StateProvinceLOV </strong>as shown below.</p> <p><img src="/sites/default/files/page-images/u70/16%20splov.jpg" style="border-width: 0px; border-style: solid; width: 368px; height: 356px;" /></p> <p>Similarly, select <strong>COUNTRY</strong> and change its name to <strong>COUNTRYLOV.</strong></p> <p><strong><img src="/sites/default/files/page-images/u70/17%20countlov.jpg" style="border-width: 0px; border-style: solid; width: 381px; height: 339px;" /></strong></p> <p>Click <strong>Next</strong>.</p> <p>In the <em>Application Module</em> step in the wizard, change the name of the package so that it ends with <strong>model.apModule -&gt; </strong>change the name of the application module to <strong>CandidateAppModule</strong>.</p> <p> </p> <p><img src="/sites/default/files/page-images/u70/18%204%20of%206.jpg" style="border-width: 0px; border-style: solid; width: 489px; height: 278px;" /></p> <p>Click <strong>Next -&gt; </strong>click<strong> Finish</strong>.</p> <h3 id="CreatingCascadingDropdownsinADFbcDrivenADFForms-(3)AddtheBindVariable">(3) Add the Bind Variable</h3> <p>Add a parameter that will provide the country to the StateProvinceLOV.  You need this because you need to restrict the list of states shown to only be those for the specific country selected.</p> <p>First, <strong>+</strong> expand the <strong>view </strong>folder in the Model project -&gt; open the <strong>StateProvinceLOV</strong> by double clicking it -&gt; click the <strong>Query</strong> tab.</p> <p><img src="/sites/default/files/page-images/u70/19%20query.jpg" style="border-width: 0px; border-style: solid; width: 524px; height: 343px;" /> </p> <p>Add the new bind variable that retrieves the states / provinces associated with the country selected by clicking the + icon beside <strong>Bind Variables</strong>.</p> <p><img src="/sites/default/files/page-images/u70/bv.jpg" style="border-width: 0px; border-style: solid; width: 727px; height: 274px;" /></p> <p>Enter the text <strong>CurrentCountry </strong>in the Name field <strong>-&gt; </strong>click <strong>OK</strong>.</p> <p> </p> <p><img src="/sites/default/files/page-images/u70/21%20currentC.jpg" style="border-width: 0px; border-style: solid; width: 370px; height: 265px;" /></p> <h3 id="CreatingCascadingDropdownsinADFbcDrivenADFForms-(4)CreatetheViewCriteria">(4) Create the View Criteria</h3> <p>Create the new view criteria to filter the list of states / provinces displayed by clicking the + icon beside <strong>View Criteria</strong>.</p> <p><img src="/sites/default/files/page-images/u70/22%20vc.jpg" style="border-width: 0px; border-style: solid; width: 718px; height: 319px;" /></p> <p>Click the <strong>Add Criteria </strong>button.</p> <p><img src="/sites/default/files/page-images/u70/23%20add%20crit.jpg" style="border-width: 0px; border-style: solid; width: 332px; height: 313px;" /></p> <p>In the <strong>Attribute </strong>dropdown, select <strong>CountryId -&gt; </strong>in the <strong>Operator</strong> dropdown, select <strong>Is not</strong> blank.</p> <p><img src="/sites/default/files/page-images/u70/24%20country%20not%20blank.jpg" style="border-width: 0px; border-style: solid; width: 605px; height: 453px;" /></p> <p>To add the additional criteria needed to ensure that the list only shows the states in the country that has been selected, click <strong>Criteria </strong>(<strong>1 </strong>below) <strong>-&gt;</strong> click <strong>Add Criteria </strong>(<strong>2 </strong>below). </p> <p><img src="/sites/default/files/page-images/u70/25%201%20and%202.jpg" style="border-width: 0px; border-style: solid; width: 439px; height: 403px;" /></p> <p>In the <em>Attribute</em> dropdown select <strong>CountryId -&gt;</strong> in the <em>Operator</em> dropdown select <strong>Equals -&gt;</strong> in the <em>Operand</em> dropdown select <strong>Bind Variable -&gt;</strong> in the <em>Parameter</em> dropdown select <strong>CurrentCountry</strong> (the bind parameter that was created previously).</p> <p><img src="/sites/default/files/page-images/u70/26%204%20circles.jpg" style="border-width: 0px; border-style: solid; width: 379px; height: 214px;" /></p> <p>Your view criteria should now look like this.</p> <p><img src="/sites/default/files/page-images/u70/27%20full%20crit.jpg" style="border-width: 0px; border-style: solid; width: 605px; height: 233px;" /></p> <p>Click <strong>OK</strong>.</p> <h3 id="CreatingCascadingDropdownsinADFbcDrivenADFForms-(4)AssociatetheLOVViewObjectswiththeAttributesoftheViewObject">(4) Associate the LOV View Objects with the Attributes of the View Object</h3> <p>Associate the StateLOV to the CandidateVO's State attribute by opening <strong>CandidateVO -&gt; </strong>select the <strong>Attributes</strong> tab <strong>-&gt; </strong>select the<strong> State </strong>attribute.</p> <p><img src="/sites/default/files/page-images/u70/28%20state%20lov.jpg" style="border-width: 0px; border-style: solid; width: 660px; height: 405px;" /></p> <p>Click the <strong>+</strong> icon beside <strong>List of Values:State</strong>.</p> <p><img src="/sites/default/files/page-images/u70/29%20state%20lov.jpg" style="border-width: 0px; border-style: solid; width: 689px; height: 264px;" /></p> <p>Click <strong>+ </strong>beside the <strong>List Data Source </strong>dropdown.</p> <p><img src="/sites/default/files/page-images/u70/30%20l%20data%20src.jpg" style="border-width: 0px; border-style: solid; width: 606px; height: 244px;" /></p> <p>Click <strong>+ </strong>to expand the list on the left <strong>-&gt; </strong>select <strong>StateProvinceLOV -&gt; </strong>click the<strong> &gt; </strong>icon. </p> <p><img src="/sites/default/files/page-images/u70/31%20view%20acc.jpg" style="border-width: 0px; border-style: solid; width: 457px; height: 312px;" /></p> <p>Click <strong>OK</strong>.</p> <p><img src="/sites/default/files/page-images/u70/32%20splov.jpg" style="border-width: 0px; border-style: solid; width: 457px; height: 355px;" /></p> <p>From the <strong>List Attribute </strong>dropdown, select<strong> Id</strong>.</p> <p><img src="/sites/default/files/page-images/u70/33%20pick%20id.jpg" style="border-width: 0px; border-style: solid; width: 455px; height: 365px;" /></p> <p>This means that the Id stored in the STATE_PROVINCE table (e.g., "TX") will be the value that is stored when an item in the dropdown is selected.</p> <p>Click the <strong>UI Hints </strong>tab <strong>-&gt;</strong> select <strong>Name </strong>from the list on the left <strong>-&gt;</strong> click the <strong>&gt;</strong> button <strong>-&gt;</strong> uncheck the <strong>Include the "No Selection" Item </strong>checkbox.</p> <p><img src="/sites/default/files/page-images/u70/34%20pick%20name.jpg" style="border-width: 0px; border-style: solid; width: 489px; height: 602px;" /></p> <p>Click <strong>OK</strong>. </p> <p>This means that the name stored in the STATE_PROVINCE table (e.g., "Texas") will be the value that is displayed in the dropdown's list.  </p> <p>Associate the CountryLOV to the CandidateVO's Country attribute by selecting <strong>Country</strong> <strong>-&gt;</strong> click the <strong>+</strong> icon beside <strong>List of Values:Country</strong>.</p> <p><img src="/sites/default/files/page-images/u70/35%20country%20lov.jpg" style="border-width: 0px; border-style: solid; width: 666px; height: 377px;" /></p> <p>Click <strong>+</strong>beside the <strong>List Data Source </strong>dropdown.</p> <p><img src="/sites/default/files/page-images/u70/36%20lov%20c.jpg" style="border-width: 0px; border-style: solid; width: 607px; height: 274px;" /></p> <p>Click <strong>+ </strong>to expand the list on the left <strong>-&gt; </strong>select <strong>CountryLOV -&gt; </strong>click the<strong> &gt; </strong>icon. </p> <p><img src="/sites/default/files/page-images/u70/35a%20c%20lov.jpg" style="border-width: 0px; border-style: solid; width: 379px; height: 298px;" /></p> <p>Click <strong>OK</strong>.</p> <p>From the <strong>List Data Source</strong> dropdown ensure <strong>CountryLOV1</strong> is selected<strong> -&gt;</strong> from the<strong> List Attribute </strong>dropdown, select<strong> Id</strong>.</p> <p><img src="/sites/default/files/page-images/u70/36%20create%20list.jpg" style="border-width: 0px; border-style: solid; width: 461px; height: 357px;" /></p> <p>Click the <strong>UI Hints </strong>tab -&gt; select <strong>Name </strong>from the list on the left <strong>-&gt;</strong> click the <strong>&gt;</strong> button <strong>-&gt;</strong> uncheck the <strong>Include the "No Selection" Item </strong>checkbox.</p> <p><img src="/sites/default/files/page-images/u70/38a%20lov%20counry%20name.jpg" style="border-width: 0px; border-style: solid; width: 481px; height: 580px;" /></p> <p>Click <strong>OK</strong>.</p> <h3 id="CreatingCascadingDropdownsinADFbcDrivenADFForms-(5)ChangetheViewAccessor">(5) Change the View Accessor</h3> <p>In this you will add the information the CandidateVO needs to be able to list the states for the country that was selected.</p> <p>Before adding the View Accessor, double check the name of the attribute that stores the country information.  With the <strong>Attributes </strong>tab selected, note that the text "Country" will be used to base the list of states on.  Remember exactly how this attribute is spelled.  This text will need to be entered when the accessor is added in the next step.</p> <p><img src="/sites/default/files/page-images/u70/39%20country%20attr.jpg" style="border-width: 0px; border-style: solid; width: 604px; height: 448px;" /> </p> <p>Add the view accessor by clicking the <strong>View Accessors </strong>tab -&gt; select <strong>StateProviceLOV1 </strong>and click the <em>pencil</em> (<em>Edit selected View Accessor</em>) icon.</p> <p><img src="/sites/default/files/page-images/u70/40%20view%20accessors.jpg" style="border-width: 0px; border-style: solid; width: 696px; height: 271px;" /></p> <p>Select <strong>StateProvinceLOVCriteria -&gt;</strong> click the <strong>&gt; </strong>icon to move it to the list on the right.</p> <p><img src="/sites/default/files/page-images/u70/41%20sp%20avail.jpg" style="border-width: 0px; border-style: solid; width: 568px; height: 227px;" /></p> <p>Double click the <strong>Value </strong>field in the lower right corner and enter the name of the attribute to base the list of states on (<strong>Country </strong>in this case).  This was determined at the beginning of this section.</p> <p><img src="/sites/default/files/page-images/u70/42%20name%20value.jpg" style="border-width: 0px; border-style: solid; width: 607px; height: 210px;" /></p> <p>Click <strong>OK</strong>.</p> <h2 id="CreatingCascadingDropdownsinADFbcDrivenADFForms-TesttheForm'sCascadingDropdowns">Test the Form's Cascading Dropdowns</h2> <p> To test the Candidate view object and its cascading dropdowns, <strong>+ </strong>expand the apModule package <strong>-&gt;</strong> right mouse click the <strong>CandidateAppModule -&gt;</strong> click <strong>Run</strong>.</p> <p><img src="/sites/default/files/page-images/u70/43%20run.jpg" style="border-width: 0px; border-style: solid; width: 572px; height: 385px;" /></p> <p>Wait about a minute for the Application Module tester to appear.  As shown below, double click the <strong>CandidateVO1 </strong>view object -&gt; click the <strong>Country</strong> dropdown.</p> <p><img src="/sites/default/files/page-images/u70/44%20pick%20us.jpg" style="border-width: 0px; border-style: solid; width: 539px; height: 381px;" /></p> <p>Select <strong>Canada </strong>from the list (a country that has provinces associated with it) -&gt; click the <strong>State </strong>dropdown and note that the list has changed to the Canadian provinces.</p> <p><img src="/sites/default/files/page-images/u70/45%20pick%20canada%20prov.jpg" style="border-width: 0px; border-style: solid; width: 326px; height: 241px;" /></p> <p>Select one of the Canadian provinces from the list.</p> <p>Select the <strong>Country</strong> dropdown and select <strong>United States</strong>.  Note that after you have done this, the list of states changes dynamically back to the 50 states in the United States.</p> <h2 id="CreatingCascadingDropdownsinADFbcDrivenADFForms-Summary">Summary</h2> <p>Although this appears to take quite a few steps, the sequence to create a cascading list of dropdown values are to:</p> <ol><li><strong>Create the Entity Object and the View Objects - </strong> These are the Entity Objects and View objects that will contain the cascading lists of values (<em>CandidateEO</em> and <em>CandidateVO</em> in this example)</li> <li><strong>Create the LOVs</strong> - Create the list of values view objects that will be used to populate the lists (read-only <em>StateProvinceLOV</em> and <em>CountryLOV</em> views in this example).</li> <li><strong>Create the Bind Variable in the Dependent LOV</strong> - In the dependent LOV (<em>StateProvinceLOV</em> in this example), create the bind variable (<em>CurrentCountry</em> in this example).</li> <li><strong>Create the View Criteria in the Dependent LOV</strong> - In the dependent LOV (<em>StateProvinceLOV</em> in this example), indicate how the list should be filtered (e.g., base on the country selected) </li> <li><strong>Associate the LOV View Objects with the Attributes of the View Object</strong> - In the dependent LOV (<em>StateProvinceLOV</em> in this example), create the view criteria that ensures the dependent list is (1) not populated if the country has not been selected or (2) shows the lists of states if a country has been selected  (using the <em>CurrentCountry</em> bind parameter).</li> <li><strong>Change the View Accessor</strong> - In the view object being used to display the information (<em>CountryVO</em> in this example), change the view accessor to use the view object's correct attribute (the <em>Country</em> attribute in <em>CountryVO)</em>.</li> </ol><p> </p> </div> </div> </div> </div> </div> <div> <div>Tags</div> <div> <div><a href="/tags/adf" hreflang="en">ADF</a></div> <div><a href="/tags/adfbc" hreflang="en">ADFbc</a></div> <div><a href="/tags/cascading-dropdowns" hreflang="en">Cascading Dropdowns</a></div> </div> </div> <div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"></div> <div class="comment-date"> <div>March 13, 2014</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>Nice Creativity, but i believe you should make  the Country LOV earlier than the State LOV</p> </div> </div> </div> </div> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"></div> <div class="comment-date"> <div>July 7, 2014</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>Application model tests ok but the jspx form does not work!</p> </div> </div> </div> </div> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"></div> <div class="comment-date"> <div>September 15, 2014</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>Same problem, jspx not working... :-(</p> </div> </div> </div> </div> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"></div> <div class="comment-date"> <div>September 15, 2014</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>Thanks Erik,</p> <p>Know what you mean.  There are a lot of moving pieces to this.</p> <p>Don't know if this will help, but I'll create a blog and video that will show how to get it working with a human task data control. </p> <p>Dan</p> </div> </div> </div> </div> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"></div> <div class="comment-date"> <div>February 12, 2015</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>I am facing same problem.. could you please tell me the solution on how to make JSF page work.</p> <p>Please give me the blog link if you have already clarified the issue</p> </div> </div> </div> </div> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"></div> <div class="comment-date"> <div>October 14, 2015</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>Hi, the SQL file download link is not working.</p> </div> </div> </div> </div> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"></div> <div class="comment-date"> <div>October 14, 2015</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>Thanks Anchal.  I'll get the link to the SQL fixed, but until then you can download the SQL from here:  <a href="https://drive.google.com/file/d/0Bwqetn0fpi74N3o5a2FWV2dsUGc/view?usp=sharing">https://drive.google.com/file/d/0Bwqetn0fpi74N3o5a2FWV2dsUGc/view?usp=s…</a></p> </div> </div> </div> </div> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"></div> <div class="comment-date"> <div>December 28, 2015</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>make autosbmit true on the parent LOV and add the parent id renference to Dependent lov as partial trigger. You will get it on jspx.</p> </div> </div> </div> </div> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"> <div>mani</div> </div> <div class="comment-date"> <div>June 29, 2016</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>Very nice and clear. Really appreciate your explaining proficiencies an patience.</p></div> </div> </div> </div> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"> <div>Nitin K</div> </div> <div class="comment-date"> <div>November 3, 2016</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>Very nice article.</p> <p>I tried it, it is working fine. Don't forget to make autosubmit true on the both LOV and add the parent id reference to dependent LOV as partial trigger. </p> <p>Thanks Mr. Dan.</p></div> </div> </div> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=255&amp;2=comment_node_blog&amp;3=comment_node_blog" token="aFvQIc3UOMbX6QvSfJH7LTF7TIqB7vY_kUlxP8okDj4"></drupal-render-placeholder> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-12 blog-tags"> <div> <div><a href="/blog/categories/adf" hreflang="en">ADF</a></div> <div><a href="/blog/categories/bpm" hreflang="en">BPM</a></div> </div> </div> </div> </div> <div><drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=views_block__blogs_block_4&amp;1=default&amp;2=en" token="jBjf0n8iki9sjPwElNYA4B92vVETYVFMv7O9pm9FdHQ"></drupal-render-placeholder></div> <div> <div>About the Author</div> <div></div> </div> </div> </div> Sat, 27 Aug 2016 19:06:30 +0000 Dan Atwood 255 at https://www.avioconsulting.com https://www.avioconsulting.com/blog/creating-cascading-dropdowns-adfbc-driven-adf-forms#comments Enable Auto Claim on Task Opening https://www.avioconsulting.com/blog/enable-auto-claim-task-opening <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/enable-auto-claim-task-opening" hreflang="en">Enable Auto Claim on Task Opening</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><p>Using SOA/BPM 12.1.3 - By default, a human task has the '<em>Enable Auto Claim</em>' functionality enabled. </p> <p><img alt="Enable auto claim" data-entity-type="file" data-entity-uuid="4d72677d-7410-4aa4-9dc9-005cef589679" src="/sites/default/files/inline-images/enableAutoClaim_0.png" /></p> <p>When I first saw this, I was encouraged to think that when a user opens a task, they automatically '<em>Claim</em>' the instance, so that other users can no longer act on it.  </p> <p>I was wrong.</p> <p>So what does the '<em>Enable Auto Claim</em>' actually do?  In short, it allows a user to action on the task.  That is, '<em>Submit</em>', '<em>Approve</em>', etc, whatever actions are defined on the task without having to manually click a '<em>Claim</em>' button.</p> <p> </p> <p>That's not what I want.</p> <p>I had a fairly complex human task in a process, that required someone from a group of users to look up information, add details, and actually spend some time on the form before saving and submitting the task.  Immediately into UAT, an 'bug' was submitted after two users tried to submit the same task.  They did not want others to be able to work tasks that they had started.</p> <p>To me, this made sense.  Now how can this be done?</p> <p>To give myself some time, I disabled the 'Auto Claim', and taught the testers to use the 'Claim' button as the very first act on the task.  This would 'lock' it from other users, and if they decided not to complete the task, they should use the 'Release' button.  This was not a suitable solution for the client, as the testers quickly responded with 'keystrokes save lives', their pun to me about minimizing interaction with the form and maximizing efficiency.  So lets save them from having to 'Claim' the task.</p> <p> </p> <p>As anyone who has tried this before, I immediately went down the path of trying to drag the '<em>Claim()</em>' method onto the task flow (or call from a managed bean on page load).</p> <p><img alt="Claim method" data-entity-type="file" data-entity-uuid="8dde8e6c-f4c1-4a1f-91f4-816efa60b150" src="/sites/default/files/inline-images/claimFunction_0.png" /></p> <p>At first, I was content with how this worked, until I tried to call one of my other actions on the task.  I was prompted with an error saying that the task is out of date, and needs to be refreshed.  I was also getting errors trying to display the page a second time.  This path was not going to work.</p> <p> </p> <p>Almost defeated, I wanted to try one more option.  Lets use the TaskQueryService to claim the task.  From within the taskflow, I have the Worklist Context, and Task Id which is enough information to find the task.  Once I have the task, I can check if it's currently claimed, and if not, claim it!  </p> <p>Lets take a look at some code to do this</p> <p><img alt="Code" data-entity-type="file" data-entity-uuid="24eabdd5-f1f6-4ae8-8eb3-852612761f56" src="/sites/default/files/inline-images/taskCode.png" /></p> <p>Attached <a href="https://drive.google.com/open?id=0B4UpTtxvW1azVnpsU1YyWVN3RmM">here</a> is the entire java class for import references.</p> <p>Here's the trick!  Invoke this code from the <strong>Task Flow Initializer!</strong>  Now the task will be claimed (or 'acquired') before the user ever sees the page.  They can then 'Release' the task still if they choose not to work it, but other users will now see this task as claimed!</p> <p><img alt="task flow initializer" data-entity-type="file" data-entity-uuid="198a071b-1562-4c32-a594-d435a1f19f5c" src="/sites/default/files/inline-images/taskflowInitializerSet_0.png" /></p> <p><strong>Of Note</strong>:</p> <p>There is behavior to be aware of, that I noticed with this solution.</p> <ul><li>If two users have the worklist open, and one of them claims a task, the task still 'appears' to be unclaimed to the second user.  They would have to 'refresh' their worklist, or alternatively, put an error message on the UI that says the task is currently claimed by another user.  This way, the task is still viewable, but not actionable.</li> <li>From the worklist (or workspace), enable the 'Acquired By' column on your view.  This displays who currently has the task claimed! </li> </ul><p><img alt="Acquired By" data-entity-type="file" data-entity-uuid="e7ba4ebb-b911-4bad-ab46-c6412e4ac518" src="/sites/default/files/inline-images/acquiredByColumn_0.png" /></p> <p><a href="https://drive.google.com/open?id=0B4UpTtxvW1azT19IR2tOYm1EOWM">Here</a> is my sample project (12.1.3) demonstrating this!</p> <p> </p> <p><strong>Auto Release Feature</strong></p> <p>Additionally, from within EM, you can configure tasks to be released at a configured interval.</p> <p>Right click on <em>soa-infra → SOA Administration → Workflow Properties</em></p> <p>Click the '<em>Task</em>' tab, and expand '<em>Advanced</em>' options.</p> <p>From here the '<em>Task Auto Release Configuration</em>' can be modified based on Priority.</p> <p><img alt="Auto Release" data-entity-type="file" data-entity-uuid="d5de5252-1189-492d-b8df-fb290c33edc8" src="/sites/default/files/inline-images/AutoRelease_0.png" /></p></div> </div> </div> </div> </div><div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=578&amp;2=comment_node_blog&amp;3=comment_node_blog" token="aJfDn77e8mtENKsVIWbBgrIVhd6eo4bdBI7S8_POHjs"></drupal-render-placeholder> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-12 blog-tags"> <div> <div><a href="/blog/categories/adf" hreflang="en">ADF</a></div> <div><a href="/blog/categories/bpm" hreflang="en">BPM</a></div> </div> </div> </div> </div> <div><drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=views_block__blogs_block_4&amp;1=default&amp;2=en" token="jBjf0n8iki9sjPwElNYA4B92vVETYVFMv7O9pm9FdHQ"></drupal-render-placeholder></div> <div> <div>About the Author</div> <div></div> </div> </div> </div> Fri, 05 Aug 2016 16:15:05 +0000 Kevin King 578 at https://www.avioconsulting.com https://www.avioconsulting.com/blog/enable-auto-claim-task-opening#comments PeopleSoft Capital Expenditure Request Process https://www.avioconsulting.com/company/case-studies/peoplesoft-capital-expenditure-request-process <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <img src="/sites/default/files/styles/secondary_lead_image/public/default_images/Case%20Studies%20Pages.jpg?itok=NDFUJ6xh" width="2000" height="400" alt="Case Study" typeof="foaf:Image" /> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> PeopleSoft Capital Expenditure Request Process </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><p>AVIO has created the Capital Expenditure Request process accelerator in order to assist organizations using PeopleSoft to have a more comprehensive capability around budgeting and tracking of capital expenditures. The CER process enables organizations to have better visibility into the financial health of their projects, ensured compliance with business policies, and allowed real time comparison between PeopleSoft actuals and the approved CER amounts.  </p> <p>In addition, by enabling access via both desktop and mobile devices, executives and managers had access to approve and reject a CER at from anywhere.</p> <p>This video provides a quick overview of the Capital Expenditure Request (CER) process accelerator. It highlights features within the accelerators such as budgeting, requesting, approving, reporting and reconciling. The process underlying the solution is built using a combination of Oracle SOA Suite and Oracle BPM Suite while the UI is built using Oracle ADF.</p></div> </div> </div> </div> </div> <div> <div><div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> </div> </div> </div> </div> </div> <div class="main-content"> <div> <div class="container no-background content-region"> <div class="row"> <div class="col-sm-12"> <h2></h2> </div> </div> <div class="row"> <div class="col-sm-12"> <div><div class="video-embed-field-provider-youtube video-embed-field-responsive-video"><iframe width="854" height="480" frameborder="0" allowfullscreen="allowfullscreen" src="https://www.youtube.com/embed/i4UoCRoYwA8?autoplay=0&amp;start=0&amp;rel=0"></iframe> </div> </div> </div> </div> </div> </section> </div> </div> </div> </div> </div> </div> </div> Sat, 30 Apr 2016 18:53:08 +0000 admin 514 at https://www.avioconsulting.com Measuring Code Quality with SonarQube https://www.avioconsulting.com/blog/measuring-code-quality-sonarqube <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/measuring-code-quality-sonarqube" hreflang="und">Measuring Code Quality with SonarQube</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><p>For the most part, every project has tasks related to code quality and software metrics. This process is usually hard to understand, tedious, and subjective to what the person reviewing the code believes is quality code. The project may compile and run as required, but developers will always ask “did we do it right?”.</p> <p>Traditional testing methods rely on either the programmer or end user to identify and report bugs. This is only a piece of the puzzle as some issues are not apparent immediately. Generally, when a user reports “it is getting slow, so we had to restart” it could mean anything and restarting a server simply masks the issue.</p> <p>Fortunately, there are tools such as PMD, FindBugs, HP Fortify, and SonarQube that help developers manage code quality and provide feedback on potential issues, duplicate code, and technical debt acquired. Most of the tools focus primarily on bugs and bad practices. On paper, SonarQube seems to provide a more comprehensive approach; they focus not only on bugs but also on documentation, architecture, duplication and test coverage. SonarQube is a free and open source platform used to measure code quality. It gives you a moment-in-time snapshot of your code quality as it is today as well as trending and lagging data. The best part is that it is easily integrated into JDeveloper and you can scan any type of project (SOA, Spring, JAXB, ADF, etc).</p> <p>SonarQube, in theory, can scan projects written in many different programming languages including Java, C#, JavaScript, XML, and PHP. More on the languages supported can be found <a href="http://www.sonarsource.com/products/plugins/languages/" style="text-decoration:none;">here</a>. It sounds pretty amazing and easy to use, so I decided to take it for a spin to see how potentially useful it could be within FMW.</p> <h3>Scanning Code: Execution and Output</h3> <p>Although this can be run from within JDeveloper, I analyzed it using Maven which will compile and scan the code with a single command. I ran the scan using a command window. Simply navigate to your project root and enter ‘mvn sonar:sonar’. The command will first compile your solution and then will perform the scan. Once it is done, you can go to the dashboard to see the results.</p> <p>The scan gives you a snapshot of your current solution. The overview includes lines of code, number of files, complexity, duplicate code, rating and a calculated technical debt percentage.</p> <p><img src="/sites/default/files/page-images/u1204/img0_0.png" style="font-family: Arial; font-size: 14.6666666666667px; white-space: pre-wrap; line-height: 1.38; border: none; transform: rotate(0rad); -webkit-transform: rotate(0rad); width: 680px; height: 301px;" /></p> <p>The dashboard has a lot of widgets that you can easily customize to show different types of metrics to suit your needs (i.e number of issues, complexity, code coverage etc). In addition, you can track multiple projects on the same dashboard and get combined metrics for all. I ran a scan for a SOA project, a simple Java-Spring app, and a more complex Java Restful web service.</p> <p><img alt="" src="/sites/default/files/page-images/u1204/img1.png" style="height: 332px; width: 680px;" /></p> <p><span style="font-size: 13.0080003738403px; line-height: 1.538em;">You can see a predefined dashboard </span><a href="http://nemo.sonarqube.org/dashboard/index/219971" style="font-size: 13.0080003738403px; line-height: 1.538em;">here</a><span style="font-size: 13.0080003738403px; line-height: 1.538em;">.</span></p> <p> </p> <h3>The Verdict</h3> <p>Measuring software quality is still a pretty hard task to quantify. SonarQube tries to use existing tools, metrics and wrap them up on a dashboard that can make issues and software metrics easier to understand and somewhat quantifiable.</p> <p>The plug in is flexible enough to allow multiple languages to be scanned as well as integrate with Maven and Jenkins. However, it is not a silver bullet. It does a good job scanning your Java code, but I did not find it as good as advertised when it comes to SOA/BPM projects.<span style="font-size: 13.0080003738403px; line-height: 1.538em;"> It does well for ADF projects on the Java code including managed beans and other POJOs you may have. JAX-WS/JAX-RS projects seem to be the ideal candidates to take full advantage of all SonarQube’s capabilities. However SOA, BPM/BPEL, HTML, and XSLTs are a different story.</span></p> <p>On all my scans, I did not get any meaningful metrics on complexity and quality. SonarQube does scan XML but it only performs static validations such size and schema validation. The issue with such a basic approach in the BPM/BPEL world is the xml underlying the process isn’t managed by hand.  Therefore, it can be very verbose even when the process itself may be very simple. Nevertheless, SonarQube has a <a href="https://groups.google.com/forum/#!forum/sonarqube">Google group</a> where people can propose new plugins and enhancements. There is already a proposal to develop a plugin that would count activities, transformations, decisions and service references in order to get accurate and meaningful data on SOA projects that include BPEL and BPM processes.</p> <p>The dashboard is pretty comprehensive. You can deep dive on any on the menus and widgets, scan sections of the code, change the parameters for calculating technical debt and complexity as well as change the look and feel. In addition, it can store the results of each scan on a database and provide historical metrics on any category; Couple that with the ability to interact with Maven and Jenkins (on paper) and you got a solid platform that will give you some context and metrics on code quality</p> <p>The installation is straight forward and I’ve included the steps below:</p> <h3>Installation of SonarQube: JDeveloper plugin and SonarQube Service</h3> <ol><li> <p>Get the plug-in for JDeveloper: It is not necessary but it makes changing settings and running scans easier. In JDeveloper 12c, go to help → check for updates, include the checkbox for Open Source and Partners Extensions and locate SonarQube. Click next and install it.<br />  </p> </li> </ol><p><img src="/sites/default/files/page-images/u1204/img2.png" style="border: none; transform: rotate(0rad); -webkit-transform: rotate(0rad); width: 416px; height: 127px;" /><br />  </p> <ol start="2"><li> <p>Install and <span style="font-size: 13.0080003738403px; line-height: 20.0063037872314px;">Configure</span> SonarQube<br /> SonarCube can be set up as a startup service. This way it automatically starts whenever you reboot. The service allows you to load up the dashboard to see the reports generated by the scan as well as configure the database to store the results of each scan.</p> <ul><li> <p>Download and install the files <a href="http://www.sonarqube.org/downloads/">here</a>. Make sure to get the newest version for your platform</p> </li> <li> <p>Step by step installation can be found in <a href="http://www.sonarqube.org/screencasts2/installation-of-sonar/">screencast</a>. The process is pretty simple and by the end of the installation you should be able to load up the Sonar dashboard home page in your localhost.</p> </li> <li> <p>The default url is: <a href="http://localhost:9000">http://localhost:9000</a> and default login credentials are admin/admin</p> </li> <li> <p>You should also be able to see sonarQube as an option on JDeveloper when you right click on any project<br />  </p> </li> </ul></li> </ol><p><img src="/sites/default/files/page-images/u1204/img3.png" style="border: none; transform: rotate(0rad); -webkit-transform: rotate(0rad); width: 225px; height: 400px;" /><br />  </p> <ol start="3"><li> <p>Additional Options: There are a few additional features available on this plug in.</p> <p><img src="/sites/default/files/page-images/u1204/img4.png" style="border: none; transform: rotate(0rad); -webkit-transform: rotate(0rad); width: 640px; height: 457px;" /></p> <ul><li> <p>On JDeveloper go to Tools--Preferences and you will see an option for SonarQube.</p> </li> <li> <p>You can change host settings</p> </li> <li> <p>Store results on the database. This will give you a historical view of the scans made in the past as well as the progress on defects and technical debt incurred. The database setup requires a couple of additional steps such as creating tables and users. Details on installing and setting the database can be found <a href="http://docs.sonarqube.org/display/SONAR/Installing">here</a></p> </li> <li> <p>Analyze using Maven, SonarQube runner or Ant. If you are an Ant-build or plan on using SonarQube runner you would need to download an additional library and place it in the lib directory in the ant installation. More details on both can be found in their <a href="http://docs.sonarqube.org/display/SONAR/Installing+and+Configuring+SonarQube+Runner">Wiki</a>. If you already use Maven, then you are in luck as no extra libraries are needed.</p> </li> </ul></li> </ol><p><br /> SonarQube is a decent alternative to measure code quality. It provides metrics on code standards, keeps track of code progress, is able to scan all sorts of code ranging from sql to java to html and it is very easy to install and use on JDeveloper. Nevertheless, for SOA or BPM projects it provides little insight and does not really measure true complexity. At the end of the day, code quality is still an inexact science and while imperfect, SonarQube takes a good crack at it by giving you real numbers and good looking dashboards.</p> <p> </p> </div> </div> </div> </div> </div><div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"></div> <div class="comment-date"> <div>December 8, 2015</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>Hi ,</p> <p>Am unable to see the SonarQube extension in my Jdev 11.1.1.6 vesion ?</p> <p>Any <strong>Prerequisites</strong>?</p> </div> </div> </div> </div> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"></div> <div class="comment-date"> <div>December 10, 2015</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>You can find the Sonar extension in 11g by going to Help-- Check for Updates, makesure you have selected the Open Source and Partner Extension. Click next and search for Sonar. Select the extension and install it.</p> <p>The plug in help has very detailed step by step instructions on running your first analysis. You can also find it here <a href="https://www.linkedin.com/pulse/20140808212955-5016041-run-sonar-analysis-from-jdeveloper">https://www.linkedin.com/pulse/20140808212955-5016041-run-sonar-analysis-from-jdeveloper</a></p> </div> </div> </div> </div> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"> <div>Pablo</div> </div> <div class="comment-date"> <div>March 8, 2016</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>Hi, is there an extension for BPM Suite 12.2.1? Thanks</p></div> </div> </div> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=411&amp;2=comment_node_blog&amp;3=comment_node_blog" token="MghfPikovLn9yIfz-h0yyvQxn4qiL6dzN8s6sRKyEO4"></drupal-render-placeholder> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-12 blog-tags"> <div> <div><a href="/blog/categories/adf" hreflang="en">ADF</a></div> <div><a href="/blog/categories/soa" hreflang="en">SOA</a></div> </div> </div> </div> </div> <div><drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=views_block__blogs_block_4&amp;1=default&amp;2=en" token="jBjf0n8iki9sjPwElNYA4B92vVETYVFMv7O9pm9FdHQ"></drupal-render-placeholder></div> <div> <div>About the Author</div> <div></div> </div> </div> </div> Thu, 09 Jul 2015 13:30:00 +0000 Daniel Rodriguez 411 at https://www.avioconsulting.com https://www.avioconsulting.com/blog/measuring-code-quality-sonarqube#comments Every ADF Project Setup Should Include... https://www.avioconsulting.com/blog/every-adf-project-setup-should-include <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/every-adf-project-setup-should-include" hreflang="und">Every ADF Project Setup Should Include...</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><p>I've been developing ADF projects at client sites for over 4 years now (wow, that went fast!). The purpose of this blog is to point out the first things I do on every project to make it run smoothly.  Two of these are JDeveloper configurations, but I sometimes miss them after I've installed a new version of JDeveloper or have a new laptop to work with.  The other are project level setups to customize projects specifically.  These recommendations are based on the 12c version of ADF, however these are applicable to 11g (although the instructions may vary).</p> <h3>Configure JDeveloper to Package Business Components</h3> <p>This is a JDeveloper configuration that automatically organizes business components into packages.  When business components are initially imported into a project it is nice to have them automatically organized.  The configuration only needs to be done once, and it will be used every time business components are created.</p> <ol><li>In JDeveloper, select 'Tools' -&gt; 'Preferences'</li> <li>Expand 'ADF Business Components' and select Packages</li> <li>Create default package names for each component type<br /><img class="confluence-embedded-image" data-base-url="https://avioconsulting.atlassian.net/wiki" data-image-="" data-image-height="496" data-image-width="734" data-linked-resource-container-id="61407910" data-linked-resource-container-version="9" data-linked-resource-content-type="image/png" data-linked-resource-default-alias="packages.png" data-linked-resource-id="61407963" data-linked-resource-type="attachment" data-linked-resource-version="1" data-location="Kevin King &gt; Things to do on every ADF Project &gt; packages.png" data-mce-="" data-unresolved-comment-count="0" src="/sites/default/files/page-images/u72/packages.png" style="cursor: move; max-width: none; margin-left: 2px; margin-right: 2px; vertical-align: text-bottom; height: 250px;" title="Kevin King &gt; Things to do on every ADF Project &gt; packages.png" /></li> </ol><p style="margin: 10px 0px 0px;">Additionally you can set defaults for Object Naming, which will provide suffix's for the different types of business components.  Make sure you consult <a href="http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adf-naming-layout-guidelines-v2-00-1904828.pdf">Oracle's ADF naming standards</a>.</p> <h3>Same Code Reformat Settings</h3> <p>This setting ensures that every time the 'Reformat' functionality is run, that it will be consistent (especially in a multi-developer situation).  The reformat functionality should be used frequently to keep code clean and organized.  When using a version control system, when users use the reformat with different settings it appears that many lines have changed, when in reality it could have been no change at all.  Keeping these settings consistent makes it easier to track changes while customizing the coding style.</p> <p>One of the critical settings is the 'Line Width' property.  This will change long lines into multi lines so that its viewable on the screen.  This is used in all files, including Java and XML.   In 11g the default was set at 80 characters which is an inherited length from back in the day when code was on punch cards (ref. <a data-mce-="" href="http://en.wikipedia.org/wiki/Characters_per_line" style="color: rgb(53, 114, 176) !important; text-decoration: none;">http://en.wikipedia.org/wiki/Characters_per_line</a>).  JDeveloper 12c has defaulted this to 120, but if all developers have large monitors you may want it to be even larger.</p> <ol><li>In JDeveloper, select 'Tools' -&gt; 'Preferences'</li> <li>Expand 'Code Editor' and select 'Code Style'</li> <li>Click the 'Edit' button</li> <li>Expand 'Line Wrapping' and change the 'Line Width' property as desired<br /><img class="confluence-embedded-image" data-base-url="https://avioconsulting.atlassian.net/wiki" data-image-="" data-image-height="770" data-image-width="1050" data-linked-resource-container-id="61407910" data-linked-resource-container-version="9" data-linked-resource-content-type="image/png" data-linked-resource-default-alias="codestyle.png" data-linked-resource-id="61407970" data-linked-resource-type="attachment" data-linked-resource-version="1" data-location="Kevin King &gt; Things to do on every ADF Project &gt; codestyle.png" data-mce-="" data-unresolved-comment-count="0" src="/sites/default/files/page-images/u72/codestyle.png" style="cursor: move; max-width: none; margin-left: 2px; margin-right: 2px; vertical-align: text-bottom; height: 250px;" title="Kevin King &gt; Things to do on every ADF Project &gt; codestyle.png" /></li> </ol><p>Other settings can be modified here to personalize a coding style, including indent sizes, tab sizes, blank lines, spaces and more.  Just be sure to keep all of these settings the same among developers so that reformatting a file is consistent for all developers.</p> <h3>Create an ADF Skin and Add Font-Awesome</h3> <p>Having an ADF skin defined from the beginning makes it very easy for developers to add style classes.  As a best practice these should be used instead of inline styles.  </p> <p>To provide stylish UIs, icons are often used instead of text.  Many icons are standard and I end up wasting time manually to find a single nice looking icon.  Adding font-awesome provides a great way to add hundreds of icons easily to your ADF application.  No more searching for an image of a trashcan to replace 'Delete' text, or a plus sign to replace 'Add' text, or even a pencil for 'Edit'.  Check out all the icons at: <a data-mce-="" href="http://fortawesome.github.io/Font-Awesome/" style="color: rgb(53, 114, 176) !important; text-decoration: none;">http://fortawesome.github.io/Font-Awesome/</a></p> <p>To create an ADF Skin (12c):</p> <ol><li>Once your application is created, right click on the view project and select 'New' -&gt; 'From Gallery'</li> <li>Expand out 'Web Tier' then select 'JSF/Facelets'</li> <li>Select 'ADF Skin' and hit 'Ok'<br /><img class="confluence-embedded-image" data-base-url="https://avioconsulting.atlassian.net/wiki" data-image-="" data-image-height="375" data-image-width="576" data-linked-resource-container-id="61407910" data-linked-resource-container-version="9" data-linked-resource-content-type="image/png" data-linked-resource-default-alias="skin.png" data-linked-resource-id="61407987" data-linked-resource-type="attachment" data-linked-resource-version="1" data-location="Kevin King &gt; Things to do on every ADF Project &gt; skin.png" data-mce-="" data-unresolved-comment-count="0" src="/sites/default/files/page-images/u72/skin.png" style="cursor: move; max-width: none; margin-left: 2px; margin-right: 2px; vertical-align: text-bottom; height: 250px;" title="Kevin King &gt; Things to do on every ADF Project &gt; skin.png" /></li> <li>Go through the rest of the wizard to assign a name, directory, family, and base skin.  Then hit 'Finish'</li> </ol><p>To add font-awesome:</p> <ol><li>Download the skin from: <a data-mce-="" href="http://fortawesome.github.io/Font-Awesome/" style="color: rgb(53, 114, 176) !important; text-decoration: none;">http://fortawesome.github.io/Font-Awesome/</a></li> <li>Unzip the contents into &lt;ViewProject&gt;/public_html/skins directory (technically you only need the font-awesome.css or minimized version and the fonts directory)</li> <li> <p style="margin: 0px;">In your custom css class created above, add the css similar to:</p> <table class="wysiwyg-macro" data-macro-body-type="PLAIN_TEXT" data-macro-id="365e1ea3-8f5f-49b9-9361-520659e3ffb5" data-macro-name="code" data-macro-schema-version="1" data-mce-style="background-image: url('https://avioconsulting.atlassian.net/wiki/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&amp;locale=en_GB&amp;version=2'); background-repeat: no-repeat;" style="border: 1px solid rgb(221, 221, 221); margin-top: 10px; padding: 24px 2px 2px; width: 1375px; cursor: move; background-image: url(https://avioconsulting.atlassian.net/wiki/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&amp;locale=en_GB&amp;version=2); background-color: rgb(240, 240, 240); background-position: 0px 0px; background-repeat: no-repeat;"><tbody><tr><td class="wysiwyg-macro-body" style="white-space: pre-wrap; border: 1px solid rgb(221, 221, 221); margin: 0px; padding: 10px; cursor: text; background-color: rgb(255, 255, 255);"> <pre style="margin-top: 0px; margin-bottom: 0px; tab-size: 4; white-space: pre-wrap;"> @import url('../font-awesome-4.3.0/css/font-awesome.min.css');</pre> </td> </tr></tbody></table></li> <li> <p>Check out all of the icons and how to use them here: <a data-mce-="" href="http://fortawesome.github.io/Font-Awesome/icons/">http://fortawesome.github.io/Font-Awesome/icons/</a> </p> </li> </ol><h3>Define the Context root</h3> <p>The context root of an application defines what the base url will look like when accessing the contained pages.  By default, JDeveloper uses '&lt;ApplicationName&gt;-&lt;ProjectName&gt;-context-root'.  In most cases a shorter more detailed context root should be used ie. salesdashboard</p> <ol><li>Right click on the View project, and select 'Project Properties'</li> <li>Select 'Java EE Application'</li> <li>Enter in the new Java EE Web Context Root<br /><img class="confluence-embedded-image" data-base-url="https://avioconsulting.atlassian.net/wiki" data-image-="" data-image-height="527" data-image-width="698" data-linked-resource-container-id="61407910" data-linked-resource-container-version="9" data-linked-resource-content-type="image/png" data-linked-resource-default-alias="context.png" data-linked-resource-id="61407999" data-linked-resource-type="attachment" data-linked-resource-version="1" data-location="Kevin King &gt; Things to do on every ADF Project &gt; context.png" data-mce-="" data-unresolved-comment-count="0" src="/sites/default/files/page-images/u72/context.png" style="cursor: move; max-width: none; margin-left: 2px; margin-right: 2px; vertical-align: text-bottom; height: 250px;" title="Kevin King &gt; Things to do on every ADF Project &gt; context.png" /></li> </ol><p>By default, the deployment profile will use the Java EE Web Context Root, however it can also be changed in the deployment profile configuration.  Now accessing a page URL is as easy as: <a data-mce-="" href="http://127.0.0.1:7101/salesdashboard/faces/view" style="color: rgb(53, 114, 176) !important; text-decoration: none;">http://127.0.0.1:7101/salesdashboard/faces/view</a></p> <p>With these suggestions in place, business components will be automatically organized, reformatting will keep your code clean looking and consistent.  Adding in a custom skin with font-awesome makes it very easy to style and add icons for a better look and feel.  Finally the context root is just a clean way to provide end users with a better URL when accessing the application.  Feel free to comment and add any other project setup must-do's!</p> </div> </div> </div> </div> </div> <div> <div>Tags</div> <div> <div><a href="/tags/adf" hreflang="en">ADF</a></div> </div> </div> <div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"></div> <div class="comment-date"> <div>June 3, 2015</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>Things that should be apart of every ADF project setup!</p> </div> </div> </div> </div> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"></div> <div class="comment-date"> <div>June 10, 2015</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>Hi Kevin,</p> <p>Have you tried using font awesome in skin library created using Skin Editor. I tried but it did not work.</p> <p>If I keep the skin files directly in the project it works.</p> <p>Thanks</p> <p>Tanvir</p> </div> </div> </div> </div> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"></div> <div class="comment-date"> <div>June 10, 2015</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>Thank you. Some good hints. I would like to extend your adf project setup list. One thing we do is the definition of custom base classes for business components. This gives the ability to apply new functionalty to all BC classes (i.e. get sequence value on insert operation)</p> </div> </div> </div> </div> <div class="container blog-comments"> <div class="row"> <div class="col-sm-12"> <div class="pull-left author"></div> <div class="comment-date"> <div>June 18, 2015</div> </div> </div> </div> <div class="row"> <div class="col-sm-12 comment-body"> <div><p>Thank you! Very helpful</p> </div> </div> </div> </div> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=404&amp;2=comment_node_blog&amp;3=comment_node_blog" token="IGnkdItB_q04Gay2HyT0LrWUazOoscmpheNugl7oymk"></drupal-render-placeholder> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-12 blog-tags"> <div> <div><a href="/blog/categories/adf" hreflang="en">ADF</a></div> </div> </div> </div> </div> <div><drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=views_block__blogs_block_4&amp;1=default&amp;2=en" token="jBjf0n8iki9sjPwElNYA4B92vVETYVFMv7O9pm9FdHQ"></drupal-render-placeholder></div> <div> <div>About the Author</div> <div></div> </div> </div> </div> Wed, 10 Jun 2015 14:00:00 +0000 Kevin King 404 at https://www.avioconsulting.com https://www.avioconsulting.com/blog/every-adf-project-setup-should-include#comments An Easy Way to Create a Single-Page ADF Application https://www.avioconsulting.com/blog/easy-way-create-single-page-adf-application <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/easy-way-create-single-page-adf-application" hreflang="und">An Easy Way to Create a Single-Page ADF Application</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><p>Single-page apps are one of those things that is in-vogue, but has been technically-possible for a while now. I have created single-page web apps with ADF, Sharepoint, and using standard web technologies. One thing to keep in mind, and one that has caused me some pain, is what you will do if and when the business asks for another page to be added outside of the single-page design. Hopefully, I am guessing you don't have to use Sharepoint as it's not all that hard to accomodate additions like this in ADF. With ADF, it is easy to develop a single page application and you are not bound to a contract that keeps you from creating additional content on separate pages. </p> <p>Here's the basic components of my method:</p> <ul><li>Page to hold the dynamic content</li> <li>Content bounded task flow  (with fragments) for each menu item's UI</li> <li>Managed bean to manage task flows</li> <li>Skinning</li> </ul><p>I have used this technique in several ADF production apps going back to ADF 10g.</p> <p>Please watch the video below to see how easy it is to create an SPA with ADF.</p> <p>[video:<a href="https://youtu.be/9w0RuWNXWi4">https://youtu.be/9w0RuWNXWi4</a>]</p> <p>If you have any feedback on this technique, let me know. </p> <p> </p> <p> </p> </div> </div> </div> </div> </div> <div> <div>Tags</div> <div> <div><a href="/tags/ux" hreflang="en">UX</a></div> </div> </div> <div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=372&amp;2=comment_node_blog&amp;3=comment_node_blog" token="T5fR1E9RKKFbl08hBJ-RSS3NSoOJ1DI6GW9sMH9-04A"></drupal-render-placeholder> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-12 blog-tags"> <div> <div><a href="/blog/categories/adf" hreflang="en">ADF</a></div> <div><a href="/blog/categories/mobile" hreflang="en">Mobile</a></div> </div> </div> </div> </div> </div> </div> Thu, 02 Apr 2015 20:01:24 +0000 Jeremy Hull 372 at https://www.avioconsulting.com https://www.avioconsulting.com/blog/easy-way-create-single-page-adf-application#comments Bootstrapping Blueprint for ADF Standalone Applications https://www.avioconsulting.com/blog/bootstrapping-blueprint-adf-standalone-applications <div class="avio-content"> <div class="page-title"> <div class="lead-image"> <div> <div>Blog Lead Image</div> <div> <img src="/sites/default/files/default_images/network-pen-blog-3_0.jpg" width="2000" height="1333" alt="Avio Consulting" typeof="foaf:Image" /> </div> </div> <div class="dark-overlay"></div> </div> <div class="text-overlay"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div><h2> <a href="/blog/bootstrapping-blueprint-adf-standalone-applications" hreflang="und">Bootstrapping Blueprint for ADF Standalone Applications</a> </h2> </div> </div> </div> </div> </div> </div> <div class="main-content"> <div class="container"> <div class="row"> <div class="col-sm-12 node-body"> <div> <div><p>Once we identify a pattern and are certain it's going to happen again, our <strong>code reuse</strong> mentality breaks loose. It's only a matter of time until we end up with a shiny new tool in our code toolbox. This is especially true when we know that plugging in an existing piece of code can <strong>save us significant time and effort</strong> the next time around.</p> <p><img alt="" src="/sites/default/files/page-images/u1060/dt960131dhc0.png" style="width: 600px; height: 183px;" /></p> <pre> DILBERT © 1996 Scott Adams. Used By permission of UNIVERSAL UCLICK. All rights reserved.</pre> <p>The initial development of an ADF Standalone application is such a pattern primed for code reuse. I think anyone would agree that bootstrapping an ADF standalone application becomes a repetitive task. On the other hand agreeing that just performing the initial required setup to start the implementation of the actual project requirements can take significant time and effort might not be as clear.</p> <p>Let’s go over the initial setup considerations of an ADF Standalone application at a high level to have a basic understanding of why it takes significant time and effort. Among the main goals of an ADF standalone application is to <strong>deliver an engaging user experience</strong>. There are a lot of aspects to consider when we create a user experience not only visual but also functional. To list a few:</p> <ol><li style="margin-left: 40px;">Consistent look and feel</li> <li style="margin-left: 40px;">Layout design</li> <li style="margin-left: 40px;">Effective user interfaces</li> <li style="margin-left: 40px;">Usability</li> <li style="margin-left: 40px;">Security </li> </ol><p>Security is an aspect that is <strong>often overlooked and underestimated</strong>. How to authenticate users with the corresponding login and logout functionality and how to authorize users to access only what they should among other things. From my experiences implementing these aspects I can vouch that it takes significant time and effort.    </p> <p><strong>I must point out an additional benefit</strong> of bootstrapping your ADF standalone applications as clients themselves have asked for it. The benefit is <strong>standardization</strong> of ADF standalone application development within the organization.</p> <p>The results that clients look from standarizing their ADF standalone application development within their organization are:</p> <p style="margin-left: 40px;">1. Familiar user experience which leads to:</p> <p style="margin-left: 80px;">a. Speeding up users’ acceptance of new applications</p> <p style="margin-left: 80px;">b. User confidence</p> <p style="margin-left: 40px;">2. Shared core functionality which leads to:</p> <p style="margin-left: 80px;">a. Accelerating development of ADF standalone applications</p> <p style="margin-left: 80px;">b. Speeding up knowledge transfers</p> <p style="margin-left: 80px;">c. Easier understanding and maintainance of their code base</p> <p>The following sections cover what I have found myself implementing over and over. Therefore, what I think should be part of the<strong> bootstrapping blueprint</strong> to develope ADF standalone applications.</p> <p> </p> <h4>1. User Experience:</h4> <p>There are different ways to achieve consistent look and feel, design layouts and create effective user interfaces. You can design and create your own layouts and styles but even when you do so, always keep in mind that code reuse still the way to go. Always try to reuse any templates and/or CSSs that you create on your own across your pages whenever possible. Instead of designing and creating your own the other option and the one discussed here is the reuse of existing templates and or CSSs.</p> <p>For this blog post and to continue the theme of <strong>code reuse</strong> I will recomend using Oracle's Dynamic Tabs UI Shell temaplate. This UI Shell addresses ADF application user experience.  Finally, wanted to point out the reasons to select the UI Shell to serve as the base for the base of the blueprints user experience:</p> <ol style="margin-left: 40px;"><li>Designed by the Oracle user experience team</li> <li>Provides consistent look and feel</li> <li>Makes applications feel predictable</li> <li>User feels in control</li> <li>Enhances developer productivity</li> <li>Tested thoroughly</li> <li>Maintained by Oracle</li> <li>Expanded by Oracle</li> </ol><p>UI Shell's <a href="http://www.oracle.com/technetwork/developer-tools/adf/uishell-093084.html" target="_blank">official and very detailed documentation</a> is a good resource to use. </p> <p> </p> <p><img alt="" src="/sites/default/files/page-images/u1060/uiShell.png" style="width: 600px; height: 433px;" /></p> <p> </p> <p>Also, would like to highlight an <a href="http://www.oracle.com/technetwork/issue-archive/2012/12-mar/o22adf-1518265.html">Oracle Magazine article by Frank Nimphius</a> and a <a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/adfuishell/adfuishell.html">video demo by Chris Muir</a> with lots of insight.</p> <p> </p> <h4>2. Security:</h4> <p>Once you have selected or created the UI template to use the next step is to configure ADF Security on your standalone application. There is plenty of documentation on how to configure ADF Security, following its <a href="http://docs.oracle.com/cd/E21764_01/web.1111/b31974/adding_security.htm#ADFFD877">official documentation</a>.</p> <p>Also, would like to highlight an <a href="http://www.oracle.com/technetwork/issue-archive/2012/12-jan/o12adf-1364748.html">Oracle Magazine article by Frank Nimphius</a> and a <a href="http://blog.whitehorses.nl/2010/02/01/weblogic-web-application-container-security-part-2-adf-security">blog post by Edwin Biemond</a>.</p> <p>Finally, since this blog posts talks about reusing Oracle's Dynamic Tabs UI Shell, the following blog explains <a href="http://one-size-doesnt-fit-all.blogspot.com/2009/12/adf-ui-shell-adf-security.html">how to configure ADF Security for it by Chris Muir</a>.</p> <p>Configuring ADF Security for the Dynamic Tabs UI Shell is straight forward. There is a gotcha to watch out for and that is, to make sure that the "blank" task flow is authorized as required. Step #5 of the previously mentioned blog post details how to authorize the "blank" task flow. The blank.xml did not show up on the jazn-data.xml Overview even after selecting "Show task flows from imported ADF libraries" as as instructed in Step #5. I had to add it manually from the Source view after finding in the server logs an error explicitly saying that the blank.xml had not being authorized.</p> <p><img alt="" src="/sites/default/files/page-images/u1060/blankXMLSource.png" style="width: 600px; height: 379px;" /></p> <h5> </h5> <h5>2.1. Custom JSPX Login page</h5> <p>When ADF Security is configured by default it creates an .html page for the login page as seen on the left half of the screenshot below. Being an ADF developer I prefer the login page to be a .jspx page in order to leverage ADF components as seen on the right half of the screenshot below. Notice the components available from the Component Palette as expected only the .jspx page offers ADF Faces components.</p> <p><img alt="" src="/sites/default/files/page-images/u1060/loginHTMLandJSPX.png" style="width: 700px; height: 181px;" /></p> <p><a href="http://docs.oracle.com/cd/E24382_01/web.1112/e16182/adding_security.htm#ADFFD2008">Oracle's official documentation</a> provides a step by step how to, to create and use a .jspx page instead of the default .html page. The value added of this approach is that ADF developers can leverage their knowledge and use ADF Faces Components.</p> <h5>2.2. Logout functionality</h5> <p>After ADF Security is configured using its wizard there is no logout functionality configured out of the box. In order to implement the logout functionality backing bean will be used to terminate the session and re-direct the user to the login page.</p> <p>Oracle's official documentation on how to implement logout functionality is found <a href="http://docs.oracle.com/cd/E24382_01/web.1112/e16182/adding_security.htm#ADFFD19890">here</a>.</p> <p>The 2 key things to keep in mind while implementing logout functionality are wiring up the Sign Out link in the Dynamic Tabs UI Shell to the backing bean method that performs the session termination and re-direct to login page. The following JDeveloper screenshots show how to implement these 2 keys.</p> <p><img alt="" src="/sites/default/files/page-images/u1060/logoutLink.png" style="width: 600px; height: 233px;" /></p> <h4><img alt="" src="/sites/default/files/page-images/u1060/logoutMethod.png" style="width: 600px; height: 288px;" /></h4> <h4>3. Other Blueprint Components:</h4> <h5>3.1 Session Timeout and Session Timeout Warning</h5> <p>Session timeout is configured by default in the web.xml to 35 minutes for ADF applications by JDeveloper. Usually changed to a much lower value as established by organizations policy for application running in Production environments. The session timeout is offered to the user in the form of a popup.</p> <p>Offering a session timeout warning to users as their session is about to expire it’s a UI best practice. Unlike the session timeout its warning it's not set by default to any values and sessions simply expire without any warning to the user. Similarly to the session timeout the warning is offered to the user in the form as a popup with a configurable message, both are <a href="http://docs.oracle.com/cd/E24382_01/web.1112/e16181/ap_config.htm#ADFUI576">documented here under "Configuration in web.xml" session</a>.</p> <p><img alt="" src="/sites/default/files/page-images/u1060/sessionWarningTimeoutAndTimeout.png" style="width: 600px; height: 384px;" /></p> <h5> </h5> <h5>3.3 Glasspane to Keep Happy Mouse Clicking Users at Bay</h5> <p>There are many instances where the UI will take longer time than users are willing to wait to complete a task before they re-click or click something else. Potential reasons could be a long running query, waiting for a process to complete or simply the network speed is not up to users’ expectations.</p> <p>The <a href="http://www.oracle.com/technetwork/testcontent/27-long-running-queries-169166.pdf">article from ADF Code Corner by Frank Nimphius</a> presents us an effective solution where a ‘glasspane’ it’s shown to the users with a splash screen.</p> <p><img alt="" src="/sites/default/files/page-images/u1060/glassPaneFN.png" style="width: 600px; height: 437px;" /></p> <h4> </h4> <h4>Summary:</h4> <p>This blog has laid out a bootstrapping blueprint for the implementation of ADF standalone applications. Once you implement the blueprint you will have created a piece of code at your disposal to be reused on future projects to come. The blueprint contains the aspects I have found myself implementing over and over when starting ADF standalone projects.</p> <p>From your implementation experiences you might have additional ideas for components that would make great candidates to be part of the blueprint as well. Please share which components you feel should be part of the blueprint in the comments below. </p> <p>Happy coding!</p> </div> </div> </div> </div> </div><div class="container comment-container"> <div class="text-align-center"><h2>Join the Conversation</h2> </div> <div class="row"> <div class="col-sm-12"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=374&amp;2=comment_node_blog&amp;3=comment_node_blog" token="evxCT9YGbbWxgzHcGKr5Whqp_czDwrzn31FkO2rO-X0"></drupal-render-placeholder> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-12 blog-tags"> <div> <div><a href="/blog/categories/adf" hreflang="en">ADF</a></div> </div> </div> </div> </div> </div> </div> Tue, 24 Mar 2015 17:04:49 +0000 Juan Correa 374 at https://www.avioconsulting.com https://www.avioconsulting.com/blog/bootstrapping-blueprint-adf-standalone-applications#comments