adf taskflows for beginners
TRANSCRIPT
![Page 1: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/1.jpg)
ADF Task Flows For BeginnersBy Zeeshan Baig, Oracle ACEwww.baigzeeshan.com
![Page 2: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/2.jpg)
A little about me.....I am currently working as Senior Developer at NMH in 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/baigsorcl Disclaimer: The views expressed are my own and does not affiliates with my employer
![Page 3: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/3.jpg)
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● Questions
Thanks Google, Flickr.com and Oracle documentation for images used in this presentation. These images are unmodified and used for educational purpose only.
![Page 4: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/4.jpg)
What are task flowstheir typesand other concepts?
![Page 5: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/5.jpg)
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
![Page 6: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/6.jpg)
Types of Task flows
Un BoundedEntry Points
BoundedEntry Points
Exit Points Exit Points
![Page 7: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/7.jpg)
Types of Task FlowsKey Differences
Un-bounded (UTF) ● Public pages / No boundry● No reuse● No input parameters● No return values● No transaction Control● No security● e.g. Pages - Home, Help,
Search, Navigations
Bounded (BTF) ● Well defined boundry● Reusable● Can take input parameters● Can return values● Allows transaction control● Security control● e.g. Register, Checkout,
other application processes
![Page 8: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/8.jpg)
Bounded Task flows● A typical application contains one
unbounded task flow and many bounded task flows
● Build bounded task flows in its own application / workspace
BTFs can● Create with Pages or Page fragments● Create as Train flows● Call in a Dialog
![Page 9: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/9.jpg)
Bounded Task flowsTrain FlowsVideo tutorial at http://www.baigzeeshan.com/2010/10/creating-train-flows-in-oracle-adf.html
![Page 10: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/10.jpg)
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 extension Page● can contains many fragments● extension .jsf or .jspx
![Page 11: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/11.jpg)
Task flow Regions
Static Regions● Fixed visiblity● Creates Task flow
binding on page ● Tutorial http://www.
baigzeeshan.com/2010/04/creating-pages-with-regions-in-oracle.html
Dynamic Regions● Visible based on custom logic● Creates Multi-taskflow
binding ● Tutorialhttp://www.baigzeeshan.com/2010/06/working-with-dynamic-regions-in-oracle.html
Regions are created when you drag and drop a bounded task flow on a page
![Page 12: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/12.jpg)
Task Flow Managed Bean Scopes1. Application.....2. Session..........3. PageFlow......4. View...............5. Request.........6. BackingBean.7. Flash Scope..
Remains till application stopsPersists till user sessionAlso known as Task flow scopeLifespan till current pageLives for duration of request onlyUI Component basedRemains Till Next encountered view (new in JSF 2.0)
![Page 13: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/13.jpg)
Task flow Managed BeanScopes
![Page 14: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/14.jpg)
OK I got it... now what components i need to build them?\
![Page 15: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/15.jpg)
Task Flow Components
![Page 16: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/16.jpg)
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
![Page 17: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/17.jpg)
Task flow ComponentsMethod Call
Activity
● Allows to call application logic in task flow
● 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
![Page 18: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/18.jpg)
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.
![Page 19: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/19.jpg)
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
![Page 20: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/20.jpg)
Task flow ComponentsTask 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
![Page 21: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/21.jpg)
Task flow ComponentsURL 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
![Page 22: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/22.jpg)
Task flow ComponentsSave point
Restore
● Allow to restore application to
previous state● Supports Save for later
functionality● Only required where Restore
needed
![Page 23: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/23.jpg)
Task flow ComponentsParent Action Control flow case Wild-card
● Allows to trigger navigation of Parent view activity in ADF Region
● Identifies how control will
paas from one activity to another
● Represents global
navigation case
![Page 24: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/24.jpg)
Building Task Flows
![Page 25: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/25.jpg)
Building Task Flows
![Page 26: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/26.jpg)
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
![Page 27: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/27.jpg)
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
![Page 28: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/28.jpg)
Tips to build Reusable Task 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
![Page 29: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/29.jpg)
Demo Example● Search Employees - Provides Search facilitySecured, called as normal on Home page and as List of values on upload photo task flow● View / Edit Employees
Secured, Allows 'Managers' to edit and 'endusers' to view employee detail. Displayed as ADF region and deployed as ADF library jar● Upload Photo - Task flow to upload employee photo
Secured, Called as Dialog and later calling search flow in a model dialog● Public
Runs a flash movie on home page for all unauthenticated users for authenticated users displays graphs based on user type
![Page 30: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/30.jpg)
![Page 31: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/31.jpg)
My ContactBLOGhttp://baigzeeshan.com YouTube Channelhttp://youtube.com/baigsorcl [email protected]
![Page 32: ADF Taskflows for beginners](https://reader031.vdocuments.mx/reader031/viewer/2022022203/5872e7651a28abfa548b63bf/html5/thumbnails/32.jpg)
Congratulations......You are now Task flows Expert.... Thank you