Oracle9i Application Server Portal Building Advanced Portals Release 3.0.9 Part Number A90098-01 |
|
This chapter describes how to use Oracle Portal to build a portal for a Human Resources department in a company called Healthy Living Wholesalers), then customize the pages of the portal for different types of users. To do this, you first create pages and components, then implement different levels of security and access privileges for them. If you are unfamiliar with creating basic pages and components, try building the samples in Chapter 2, "Creating an intranet portal and adding simple portlets" and Chapter 3, "Creating a line of business page for your intranet portal".
You will also use information from an existing content area to enable users to access existing department information via the portal. You can either use the content area we've provided, called the Inside Healthy Living Repository, or create a new one by following the steps in Chapter 5, "Creating an information repository".
You will combine simple components to create complex applications that provide each type of user with a customized workplace. For example, you will create forms, a report, and a calendar that display related information. On the Human Resources tab, an employee can use a public form to submit a vacation request, a report on the Managers' tab displays how much vacation time the employee has left, as well as a calendar displays the duration of the requested vacation on the manager's page. A link on the calendar takes the manager to an approval form for accepting or rejecting the vacation request.
The following figure illustrates the various parts of the Inside Healthy Living portal, which contains the three tabs of the Human Resources portal.
To build the Inside Healthy Living Human Resources portal, you will use:
You need Edit or higher access privileges on the <DEMO_SCHEMA> schema to complete this chapter. You also need Edit or higher application privileges to build the components in this chapter. If you do not have these privileges, contact your portal administrator.
The completed portal is available in the installation package that contains the
<DEMO_SCHEMA> schema. For more information, contact your portal administrator.
This chapter contains the following sections:
Feature | Location |
---|---|
Create tabs for a portal and apply security to each. |
|
Use the Hierarchy wizard to build a team organization chart, then link to it from an employee lookup form. |
Section 4.2, "Create an employee search form that links to an organization chart" |
Use the From based on Tables or Views wizard to create a job vacancy lookup form and a job posting form, create dynamic and static lists of values. Use the Report from SQL Query wizard to create a job vacancies report. |
Section 4.3, "Create components to display and post job vacancies" |
Create a database sequence, then create two forms: one to request and one to approve a vacation. Use the Calendar wizard to build a calendar that displays requested vacation time, and a report that display remaining vacation time for each employee. |
Section 4.4, "Create a vacation request and approval system" |
Use the Grant Access tab of the Manage Component dialog to apply security at the component level. |
Section 4.5, "Implement security to control display of components" |
Use the Customize Page wizard to design the three tabs of the portal and leverage information from an existing content area in the portal. |
In this section, you will add three tabs to the Inside Healthy Living Human Resources portal that pertain only to the Human Resources department: one each for public users, managers within the company, and HR representatives. If you did not follow the steps in Chapter 3, "Creating a line of business page for your intranet portal", you must first create a page called "<YourName> Inside Healthy Living," then add three tabs to the page. For more information on creating pages, refer to Section 2.1, "Create a page".
After you create the tabs, you specify access privileges for each tab. Any user can view the Human Resources tab, only company managers can view the Managers tab, and only HR representatives can view the HR Representatives tab. This way, when a user logs onto Oracle Portal, only one or two of these tabs will display, depending on the type of user.
To implement these access privileges, you need access to the two groups we have provided: HR_MANAGERS and HR_REPRESENTATIVES. If you do not have access to these groups, contact your portal administrator.
Note: All portal administrator tasks are detailed in Appendix A, "Oracle Portal Administrator Tasks".
For more information: Visit the Oracle Portal Online Help. From the Categories list, choose Page Tasks and click Go. In the right pane, click Creating a page.
Note: You will only see this page if you have followed the steps in Chapter 3, "Creating a line of business page for your intranet portal". If you have not completed Chapter 4, create a page called "<YourName> Inside Healthy Living", then continue with this section. Unlike the illustrations in this chapter, you will not have a Main and Sales page in your portal.
Note: If you're not sure how to edit the tabs, see Section 3.1, "Create a tabbed page and add a page as a portlet".
Note: The name you enter here is the group name for the Managers of the Healthy Living Wholesalers company. If you do not see the HR_MANAGERS group, see your portal administrator. Your portal administrator can either import the groups necessary for this chapter, or create them himself. For more information, see Section A.5, "Create three groups for the Human Resources portal" in Appendix A.
The MANAGE privilege enables all members of the HR_MANAGERS group to modify or delete the page, as well as to grant other groups privileges to the page.
For more information: Visit the Oracle Portal Online Help. From the Categories list, choose Concepts and click Go. In the right pane, click Who can access a page.
Note: By granting access to a specific group of users, only members of the specified group can view the page.
You have now added three more tabs to the Inside Healthy Living portal you created in Chapter 3, "Creating a line of business page for your intranet portal". The Human Resources tab displays to all users who are logged into Oracle Portal; the Managers tab only displays to users who have been added to the HR_Managers group; the HR Representatives tab only displays to users who have been added to the HR_Representatives group.
Note: Your portal administrator can create a user for each group. To test whether your pages display properly for each type of user, contact your portal administrator.
The tabs of the portal should now look something like this:
The steps in this section show you how to use the Create Hierarchy wizard to build a company organization chart. You will then create a form that enables users to look up a specific employee within the company database, by employee number, employee name, job title, or department. Then, you will create a link from the form to the team organization chart.
In this section, you will create a hierarchy that displays the structure of the Healthy Living Wholesalers departments. The form you create in Section 4.2.2, "Create an employee search form that links to the team organization chart" will link to this hierarchy, so that when users access the form on the portal, they can click the link to display the hierarchy.
For more information: Visit the Oracle Portal Online Help. From the Categories list, choose Concepts and click Go. In the right pane, under Component Types, click What are hierarchies?
Note: If you do not see this application, contact your portal administrator. If you are not sure how to use the Navigator, try going through the steps in Chapter 2, "Creating an intranet portal and adding simple portlets".
Note: DEMO_SCHEMA is where the objects for the demos in this book are installed.
Note: Entering this value concatenates the job position from the HLW_STAFF table to the employee name. If no job title exists for the employee, "No Title" displays under the employee's name in the hierarchy.
<b><font face="Arial"><font color="#002299"><font size=+2> The HLW Group </font></font></font></b>
<div align=center> <form> <font size=+0> <input type=button value="Go Back" onClick="javascript:history.go(-1);">
Notes:
This footer text adds a "Back" button to the hierarchy so that you can return to the portal once you've clicked on the hierarchy.
If you get an error running the code in this wizard, ensure you have entered quotes, usually straight quotes ('
), that your browser can recognize.
When you run the hierarchy, a new browser should display a department's organization that looks something like this:
If you want to create an organization chart for your entire company, follow these steps. We do not include this hierarchy in the Inside Healthy Living portal.
You have created a hierarchy component that displays a company's organization.
The steps in this section show you how to create a form to search for specific employees in the Healthy Living Company. You will also create a link that, when clicked, displays the hierarchy you created in Section 4.2.1, "Create a team organization chart".
select distinct job from <DEMO_SCHEMA>.hlw_staff order by job Note: You must replace <DEMO_SCHEMA> with the schema where the objects for the demos in this book are installed
<YourName>_EMPSEARCH
.
<YourName>_EMPSEARCH
.
Note: <DEMO_SCHEMA> is the name of the schema where the demo schema objects are installed.
Note: This is the LOV you created in Section 3.5.3.1, "Create the DEPARTMENT_LOV static list of values". If you did not create this LOV, use HLW_DEPT_LOV, which we have provided. If you do not see HLW_DEPT_LOV, contact your portal administrator.
Note: This URL is for the hierarchy you created in Section 4.2.1, "Create a team organization chart". <DEMO SCHEMA> is the schema where the objects for the demos in this book are installed
When you run the employee search form with a link to the hierarchy, it should look something like this:
The steps in this section show you how to create a report and two forms. One form enables a public user to look up a particular vacancy in the database to determine whether it has been filled. The second form enables an HR representative to post or close a job vacancy. The report displays all current job vacancies.
In this section, you will create a form that will be connected to the job vacancy report. After you create this form, you will create the report, then link to this form from the report.
Note: <DEMO_SCHEMA> is the schema where the objects for the demos in this book are installed.
<b><font face="Arial"><font color="#002299"><font size=+0> Look Up a Vacancy </font></font></font></b>
<div align=center><form><font size=+0><input type=button value="Go Back" onClick = "javascript:history.go(-1);"> Notes:
This footer text adds a "Back" button to the form so that you can return to the portal after entering information in the form.
If you get an error running the code on this page, ensure you have entered quotes, usually straight quotes ('), that your browser can recognize.
When you run the job vacancy lookup form, it should look something like this:
The steps in this section show you how to create three LOVs and a form that enables a Human Resources representative to post or close a job vacancy.
In this section, you will create a database sequence that the job posting form will use when entering records into the database. This sequence will attach an ID number to each record.
Note: For more information on creating a database sequence, see Section 2.4.4, "Create a database sequence for the form".
<YourName>_Vacancy_Seq
, click Grant Access.
This list of values will display all employees with the Manager or Administrator job titles in the Healthy Living company.
select NAME, employee_id from <DEMO_SCHEMA>.hlw_staff where job like '%Manager%' or job like '%Administrator%' and department_no = :depno
Notes:
<DEMO_SCHEMA> is the schema where the objects for the demos in this book are installed.
If you get an error running this code, ensure you have entered quotes, usually straight quotes ('
), that your browser can recognize.
This list of values will display all employees in the Human Resources department of the Healthy Living Company. These employees are the HR Representatives.
select name, employee_id from <DEMO_SCHEMA>.hlw_staff where department_no = 70
Note: <DEMO_SCHEMA> is the schema where the objects for the demos in this book are installed.
This static list of values will enable a user to select whether the job vacancy is open or closed.
In this section, you will create a form (which you will later secure so that only HR Representatives can use) that enables a user to post a new job vacancy and update or close an existing one.
<YourName>_VACANCYFORM
.
<DEMO_SCHEMA>.HLW_VACANCIES
.
Note: <DEMO_SCHEMA> is the schema where the objects for the demos in this book are installed.
Note: <DEMO_SCHEMA> is the name of the schema that owns the database sequence you created in Section 4.3.2.1, "Create a database sequence for the form".
Note: This is the LOV you created in Section 3.5.3.1, "Create the DEPARTMENT_LOV static list of values". If you did not create this LOV, use HLW_DEPT_LOV, which we have provided. If you do not see HLW_DEPT_LOV, contact your portal administrator.
Note: This is the LOV you created in Section 4.3.2.2.1, "Create the Manager dynamic list of values".
Note: For more information on using bind variable LOVs, see Section 3.5.3, "Create two LOVs for the commission search form".
Note: This is the LOV you created in Section 4.3.2.2.2, "Create the HR_CONTACTLOV dynamic list of values".
Note: This is the LOV you created in Section 4.3.2.2.3, "Create the Vacancy_Status static list of values".
Note: Buttons are listed in the sections labeled "TOP" and "BOTTOM."
<b><font face="Arial"></font><font color="#002299"></font><font size=+0> Advertise a Vacancy</font></b>
<div align=center> <form> <font size=+0> <input type=button value="Go Back" onClick="javascript:history.go(-1);">
Notes:
This footer text adds a Back button to the form so that you can return to the portal after entering information in the form.
If you get an error running the code on this page, ensure you have entered quotes, usually straight quotes ('
), that your browser can recognize.
When you run the form to post or close job vacancies, it should look something like this:
Tip: This is the form you created in Section 4.3.1, "Create a form to look up a specific job vacancy".
select vacancy_id VacID, vacancy_title Position, decode (vacancy_status,'O','Open','C','Closed') status from <DEMO_SCHEMA>.hlw_vacancies where vacancy_status = 'O'
Notes:
<DEMO_SCHEMA> is the schema where the objects for the demos in this book are installed.
If you get an error running this code, ensure you have entered quotes, usually straight quotes ('
), that your browser can recognize.
Note: Choose the link you created in Section 4.3.3, "Create a link to connect the vacancy report with the lookup form".
<b><font face="Arial"><font color="#002299"><font size=-1> Click on a link for position details.</font></font></font></b>
Note: If you get an error running this code, ensure you have entered quotes, usually straight quotes ('
), that your browser can recognize.
When you run the job vacancies report, it should look something like this:
The steps in this section show you how to create
This section shows you how to create a form that enables employees to request vacation time. The requested vacation will then display on a calendar.
The job posting form uses this sequence when entering records into the database. The sequence attaches an ID number to each record.
<DEMO_SCHEMA>
. <DEMO_SCHEMA> is the schema where the objects for the demos in this book are installed
This section shows you how to create an LOV that will display in a pop-up list in the Vacation Request form you create in the next section.
select NAME , employee_id from <DEMO_SCHEMA>.hlw_staff order by name
Note: <DEMO_SCHEMA> is the schema where the objects for the demos in this book are installed.
This section shows you how to create a form to enable employees to request vacation time.
You will also use the database sequence you used in Section 4.4.1.1, "Create a database sequence for the form".
Notes: <DEMO_SCHEMA> is the name of the schema where the demo schema objects are installed.
<YourName>_Vacation_Seq is the name of the database sequence you created in Section 4.4.1.1, "Create a database sequence for the form".
Note: This is the LOV you created in Section 4.4.1.2, "Create the EMP_LIST LOV".
<b><font face="Arial"><font color="#002299"><font size=+0> Apply for a Vacation</font></font></font></b>
<div align=center> <form> <font size=+0> <input type=button value="Go Back" onClick="javascript:history.go(-1);">
Notes: This footer text adds a Back button to the form so that you can return to the portal after entering information in the form.
If you get an error running the code on this page, ensure you have entered quotes, usually straight quotes ('
), that your browser can recognize.
When you run the vacation request form, it should look something like this:
This shows you how to create a form that enables a manager to approve an employee's vacation request.
<YourName>_APPROVE_VACATION
.
<DEMO_SCHEMA>.HLW_VACATIONS
.
When you run the vacation approval form, it should look something like this:
The steps in this section show you how to create a calendar that displays the requested vacation time. A link that you create enables a manger to display the approval form you created in Section 4.4.2, "Create a vacation approval form".
Note: Before you perform the following steps, note the module id of the Vacation Request form you created in Section 4.4.1, "Create a vacation request form". You can find this value by displaying the Manage Component dialog for the form. The module id displays in the Run Link field.
select v.vaca_start_date the_date, E.name the_name, null the_date_link, '<PORTAL_SCHEMA>.wwa_app_module.link?p_arg_names=_moduleid&p_arg_ values=<REQUEST_FORM_MODULE_ID>&p_arg_names=_sessionid&p_arg_values=&p_arg_ names=_employee_id_cond&p_arg_values=%3D&p_arg_names=_show_header&p_arg_ values=YES'||v.employee_ID||' ' the_name_link, null the_target from <DEMO_SCHEMA>.hlw_vacations v ,<DEMO_SCHEMA>.hlw_staff e where e.employee_id = v.employee_id order by 1
Notes:
Change <PORTAL_SCHEMA> to the schema in which Oracle Portal is installed.
Change <DEMO_SCHEMA> to the schema where the objects for the demos in this book are installed.
Change "REQUEST_FORM_MODULE_ID" to the module ID of the Vacation Request form that you noted down earlier.
If you get an error running this code, ensure you have entered quotes, usually straight quotes ('
), that your browser can recognize.
<b><font face="Arial><font color="#002299"><font size=-1> My Team's Calendar </font></font></font></b>
When you run the calendar that displays requested vacation time, it should look something like this:
Note: You may need to use the Vacation Request form that you created in Section 4.4.1, "Create a vacation request form" to submit data to your database so that the calendar displays.
The steps in this section show you how to create a simple report that displays the remaining vacation balances for all employees. The data in this report changes according to what vacation time has been approved by the manager.
<YourName> Vacation Balance
.
select e.name name ,e.employee_id empno ,e.vacation_days vacdays ,v.vaca_length vaclen from hlw_staff e ,hlw_vacations v where e.employee_id = v.employee_id
<b><font face="Arial"></font><font color="#002299"></font><font size=-1> Current Vacation Balances</font></b>
Note: If you get an error running this code, ensure you have entered quotes, usually straight quotes ('), that your browser can recognize.
When you run the report, it should look something like this:
The steps in this section show you how to manage the security of the components that are not accessible to public users. The security implement here is based on two existing groups: HR Managers and HR Representatives.
For more information: Visit the Oracle Portal Online Help. From the Categories list, choose Application Tasks and click Go. In the right pane, under Building Components, click Granting component access privileges.
In this section, you will enable HR Managers to view any public components and the following:
Component | To build this component: |
---|---|
Vacation calendar | See Section 4.4.3, "Create a calendar that displays requested vacation dates" |
Vacation Approval form |
|
Vacation Balances report |
In addition to the public components, we will enable HR Representatives to view:
Component | To build this component: |
---|---|
Advertise a Job Vacancy form |
See Section 4.3.2, "Create a form to post or close a job vacancy". |
Vacation Balances report |
Contact your portal administrator if you have any questions about the HR Representatives and HR Managers groups.
Note: Choosing Customize enables the members of the HR_MANAGERS group to use the Customize link displayed on the portlets. Clicking the Customize link in the portlet runs the associated Customization Form, where users can change the parameters of the component.
The group displays under Change Access.
You can now add the Vacation Calendar to the Manager tab of the Inside Healthy Living portal. For more information, see Section 4.6, "Design the tabs of the HR portal".
You can now add the Vacation Approval form to the Manager tab of the Inside Healthy Living portal. For more information, see Section 4.6, "Design the tabs of the HR portal".
The group displays under Change Access.
You can now add the Vacation Balance Report to the Manager tab and HR Representatives tab of the Inside Healthy Living portal. For more information, see Section 4.6, "Design the tabs of the HR portal".
The group displays under Change Access.
You can now add the Advertise Vacancy form to the HR Representatives tab of the Inside Healthy Living portal. For more information, see Section 4.6, "Design the tabs of the HR portal".
The steps in this section show you how to organize the portlets on your pages so that the appropriate component displays on the relevant page. For example, since only managers can approve vacations, the vacation calendar and the relevant approval form display only on the Managers tab.
You will also leverage the folders in an existing content area called the Inside Healthy Living Repository. For more information on creating this content area, see Chapter 5, "Creating an information repository".
The steps in this section show you how to build the main Human Resources page, which is viewable by the public.
Note: If you are not sure how to add columns, rows, or regions to a tab, see Chapter 2, "Creating an intranet portal and adding simple portlets".
Note: This is the form you created in Section 4.4.1, "Create a vacation request form".
Note: This is the report you created in Section 4.3.4, "Create a report that displays all current job vacancies".
Note: This is the report you created in Section 4.2.2, "Create an employee search form that links to the team organization chart".
The Human Resources tab should look something like this:
The steps in this section show you how to design the Managers tab of the Inside Healthy Living portal.
Note: If you are not sure how to add columns, rows, or regions to a tab, see Chapter 2, "Creating an intranet portal and adding simple portlets".
Tip: This portlet is under the Inside Healthy Living Repository provider.
Note: If you do not see this chart, contact your portal administrator. Or, you can omit this chart from the tab.
Note: This is the component you built in Section 4.4.3, "Create a calendar that displays requested vacation dates".
Note: This is the component you built in Section 4.4.4, "Create a vacation balance report".
The Managers tab should look something like this:
The steps in this section show you how to design the HR Representatives tab of the Inside Healthy Living portal.
Note: If you are not sure how to add columns, rows, or regions to a tab, see Chapter 2, "Creating an intranet portal and adding simple portlets".
Tip: This portlet is under the Inside Healthy Living Repository provider.
Note: This is the component you built in Section 4.4.4, "Create a vacation balance report".
Note: If you do not see this chart, contact your portal administrator. Or, you can omit this chart from the tab.
Note: This is the component you built in Section 4.3.4, "Create a report that displays all current job vacancies".
Note: This is the component you built in Section 4.3.2, "Create a form to post or close a job vacancy".
The HR Representatives tab should look something like this:
Congratulations! You have created an intranet portal specific to a department that uses different levels of security to customize the portal. You now know how to:
For more information about creating a portal and using security, see the Oracle Portal Online Help.
|
Copyright © 2001 Oracle Corporation. All Rights Reserved. |
|