Oracle ADF Task Flows for Beginners

43,101 views

Published on

Published in: Education, Technology, Business
3 Comments
20 Likes
Statistics
Notes
No Downloads
Views
Total views
43,101
On SlideShare
0
From Embeds
0
Number of Embeds
6,237
Actions
Shares
0
Downloads
1,278
Comments
3
Likes
20
Embeds 0
No embeds

No notes for slide

Oracle ADF Task Flows for Beginners

  1. 1. ADF Task FlowsFor BeginnersBy Zeeshan Baig, Oracle ACEwww.baigzeeshan.com
  2. 2. A little about me.....I am currently working as Senior Developer at NMHin Chicago.● 10+ years of experience in Oracle Development tools (Database, Forms, APEX, ADF, Fusion)● Oracle ACE, OCP DBA certified in 8, 8i and 10g● Technical blog on ADF and other fusion technologies at www.baigzeeshan.com● YouTube channel http://youtube.com/baigsorclDisclaimer: The views expressed are my own and does not affiliates with my employer
  3. 3. Agenda● What are Task Flows?● Types of Task Flows?● Other concepts used in Task flows● Understand different components to build task flows● Introduction of Task flows templates● Some tips on building reusable task flows● Demo● QuestionsThanks Google, Flickr.com and Oracle documentation for images used in this presentation. These images areunmodified and used for educational purpose only.
  4. 4. What are task flowstheir typesand other concepts?
  5. 5. What are Task Flows?In simple words● Visual representation of app process flow● Each TF contains portion of app navigation● They are similar to traditional flow charts● Primary purpose is reuse
  6. 6. Types of Task flows Un Bounded Bounded Entry Points Entry Points Exit Points Exit Points
  7. 7. Types of Task Flows Key DifferencesUn-bounded (UTF) Bounded (BTF)● Public pages / No boundry ● Well defined boundry● No reuse ● Reusable● No input parameters ● Can take input parameters● No return values ● Can return values● No transaction Control ● Allows transaction control● No security ● Security control● e.g. Pages - Home, Help, ● e.g. Register, Checkout, Search, Navigations other application processes
  8. 8. Bounded Task flows● A typical application contains one unbounded task flow and many bounded task flows● Build bounded task flows in its own application / workspaceBTFs can● Create with Pages or Page fragments● Create as Train flows● Call in a Dialog
  9. 9. Bounded Task flowsTrain FlowsVideo tutorial athttp://www.baigzeeshan.com/2010/10/creating-train-flows-in-oracle-adf.html
  10. 10. Page vs Page FragmentPage Fragment● Renders as content in another JSF page● Must not contains the af:document, af:form, f:view, head, body and html because JSF page already has it● has .jsff extensionPage● can contains many fragments● extension .jsf or .jspx
  11. 11. Task flow RegionsRegions are created when you drag and drop a boundedtask flow on a page Static Regions Dynamic Regions ● Fixed visiblity ● Visible based on custom logic ● Creates Task flow ● Creates Multi-taskflow binding on page binding ● Tutorial http://www. ● Tutorial baigzeeshan. http://www.baigzeeshan. com/2010/04/creating- com/2010/06/working-with-dynamic-regions- pages-with-regions-in- in-oracle.html oracle.html
  12. 12. Task Flow Managed BeanScopes1. Application..... Remains till application stops2. Session.......... Persists till user session3. PageFlow...... Also known as Task flow scope4. View............... Lifespan till current page5. Request......... Lives for duration of request6. BackingBean. only7. Flash Scope.. UI Component based Remains Till Next encountered view (new in JSF 2.0)
  13. 13. Task flow Managed BeanScopes
  14. 14. OK I got it... now whatcomponents i need to buildthem?
  15. 15. Task Flow Components
  16. 16. Task flow ComponentsView Activity ● Displays a JSF Page or Fragment ● Extension .jsf, .jspx and .jsff (fragments) ● Bookmarkable only in unbounded Task flows ● Can have one or more task flow regions ● Good practice to have page definition file attached
  17. 17. Task flow Components Method Call ● Allows to call application logic in task flow Activity ● Drag and drop methods from Data Control ● OR DnD from component palette then configure parameters to call managed bean methods ● Common usages are initialization, Clean-up, expcetion handler ● Can have return values in case of method returns some result ● if method is of void type then outcome would be simple string
  18. 18. Task flow ComponentsRouter Activity ● Route to any activity based on EL expression ● Have default condition ● No Limits on conditions ● No limits on destinations ● Good practice is to start your task flows with Router for any future customizations.
  19. 19. Task flow ComponentsTask flow call activity ● Calls another task flow from unbounded and bounded task flow ● Can take input parameters ● Can return output parameters ● Drag and Drop task flow from Application navigator to task flow ● Drag and Drop task flow to the page as link or button
  20. 20. Task flow Components Task Flow Return ● Used to ends or send controls back to caller in Bounded Task flows ● Does either Commit or Rollback (If Task flow is transactional) ● Set outcome to required control flow navigation-case. ● BTF can have many TF return activities
  21. 21. Task flow Components URL View Activity ● Used to Redirect application to addressable URL ● Can call BTFs ● Can call View activities on UTF ● Can call external sites e.g. http: //www.google.com ● No Control returned to caller
  22. 22. Task flow Components Save point Restore ● Allow to restore application to previous state ● Supports Save for later functionality ● Only required where Restore needed
  23. 23. Task flow ComponentsParent ● Allows to triggerAction navigation of Parent view activity in ADF RegionControlflow case ● Identifies how control will paas from one activity to anotherWild-card ● Represents global navigation case
  24. 24. Building Task Flows
  25. 25. Building Task Flows
  26. 26. Task flow Templates● You can create task flow templates for common activities in bounded task flows● Common use case is error handler● Best practice is to use template for all bounded task flows
  27. 27. How to Reuse Task flows in Different Application● Create Deployment Profile ADF Library Jar● Deploy as ADF library Jar● Create Connection as File system in Resource Palette● Drag and Drop from Resource Palette to your page and ADD libary path● Complete Tutorial available at http: //www.baigzeeshan. com/2010/08/sharing-business- components-and-task.html
  28. 28. Tips to build ReusableTask Flows● Build BTFs in seperate application then merge them into master app using ADF Lib Jar● Use task flow with page fragments● Use Input parameters● Use Router activity as default● Set conditional behaviour of UI components based on Input parameters e.g. read-only, show/hide● Use dynamic regions
  29. 29. Demo Example● Search Employees - Provides Search facilitySecured, called as normal on Home page and as List of values onupload photo task flow ● View / Edit Employees Secured, Allows Managers to edit and endusers to viewemployee detail. Displayed as ADF region and deployed as ADFlibrary jar ● Upload Photo - Task flow to upload employee photoSecured, Called as Dialog and later calling search flow in a modeldialog ● PublicRuns a flash movie on home page for all unauthenticated users forauthenticated users displays graphs based on user type
  30. 30. My ContactBLOGhttp://baigzeeshan.comYouTube Channelhttp://youtube.com/baigsorclEmailzeeshan.baig82@gmail.com
  31. 31. Congratulations......You are now Task flows Expert.... Thank you

×