Search This Blog

Wednesday, 9 December 2015

Parent action in ADF

Effective use of Parent Action Activity
Here in this post I am explaining the way of Using Parent Action Activity. Using Parent Action client taskflow can call the activity defined in parent task flow. 

This sample application is developed using Hr database, bounded taskflow, control-flow-case, Read only View Object.

Steps to create sample Application
  • Create a Generic Application provide application name as ParentAction. 
  • Create a Project with name ParentAction
  • Select ADF Faces, ADF page flow, Java, ADF Business component as Project Technology
  • Create Business Component from table 
  • Define connection to database using "Hr" schema
  • Create read-only view object for Employee and Department

Define bounded taskflow
Define bounded parent action taskflow
  • Create a taskflow with and ParentActionTasskFlowDefn.xml
  • Added ViewActivity like EmployeeView and DepartmentView 
  •  Define control flow for Employee and Department view
  •  add jsff pages for each ViewActivity.
Define Child taskflow
  •   Create a new taslfkow name department-task-flow-definition.xml
  •    Add view activity with name of department
  •    add parent action
  •    define control flow between view and parent action activity
  •    add page to view activity
  •    Drag drop department view from data control to screen and design page with navigation button
  •    Add new button to page, in action of button select the control flow name define in department -task-flow-definition.xml
  •   select the parent action update the parent action property to control flow name defined in parent taskflow i.e. ShowEmployee

(Repeat same steps for defining Employee child task flow)
Design the page used in view activity
Drag drop the corresponding taskflow to jsff page used as a view activity in ParentActiontaskFlowDefn.xml
Add lending page
Add the jspx page to application. drag drop ParentActiontaskFlowDefn as region to jspx. Run the application and test it 

No comments:

Post a Comment