Oracle® Fusion Middleware Developer's Guide for Oracle WebCenter 11g Release 1 (11.1.1) Part Number E10148-02 |
|
|
View PDF |
This chapter describes how to integrate the Recent Activities service into your custom WebCenter application. This service enables you to display the most recent changes to the services in your application.
This chapter includes the following sections:
Section 18.1, "Introduction to the Recent Activities Service"
Section 18.2, "Basic Configuration for the Recent Activities Service"
Section 18.3, "Advanced Information for the Recent Activities Service"
Oracle WebCenter Services are preconfigured to work with the Recent Activities service. Recent Activities enable users to view the most recent changes to the services in your application. For example, once you add the Documents service, it automatically produces the information that the Recent Activities service will use to display the most recent changes to the document library. This service is useful to your users who want a quick and easy way to view any additions or changes to a particular area of the application.
The Recent Activities service can track information from the following WebCenter Services:
Documents
Announcements
Discussion Forums
Pages created or modified by the Page service
For more information about these services, see Chapter 12, "Integrating the Announcements Service," Chapter 13, "Integrating the Discussions Service,", Chapter 14, "Integrating the Documents Service," and Chapter 7, "Enabling Runtime Creation and Management of Pages."
See Also:
Oracle Fusion Middleware User's Guide for Oracle WebCenter for more information about the service at runtime.The Recent Activity service provides a summary view of recent changes to a variety of services. You can specify the range of time to consider recent by selecting a time range from a list at the top of the task flow. Recorded activities include additions or revisions of pages, documents, discussion forums, and the like (Figure 18-1).
Figure 18-1 Recent Activities Service at Runtime
By default, the Recent Activities service works with the Documents, Announcements, Discussion Forums, and Page services. You can narrow the services that the Recent Activities service tracks. For more information about this setting, see the next section, Section 18.3, "Advanced Information for the Recent Activities Service." You can also learn more about using Oracle WebCenter Web 2.0 Services in Section 1.1.4, "Introduction to Oracle WebCenter Web 2.0 Services."
Note:
You can see the Recent Activities service in action in the sample application, as described in Chapter 2, "Introduction to the WebCenter Sample Application."This section describes how to add the Recent Activities service to your custom WebCenter application.
You do not need to set up specific connections for the Recent Activities service. You only need to ensure that the service(s) you are tracking with the Recent Activities service is configured. For more information about setting up connections for other services, see the individual services chapters in this guide.
To use the Recent Activities service, you must add its task flow to your application. Ensure that you have at least one of the services it tracks in your application. There is a single Recent Activities task flow available in the WebCenter Services Catalog, which you can add to your application to display information about services in your application to your users.
The Recent Activities service automatically picks up other services in your application and looks for recent activity within these services. Before running your application containing the Recent Activities service, however, you may want to ensure your application contains at least one of the services you wish to monitor.
To add the Recent Activities task flow to your application:
Follow the steps in Section 11.1.1, "How to Prepare Your Application to Consume Services" to implement security and create a customizable page in your custom WebCenter application.
Open the source of the customizable page.
Ensure that your application includes at least one of the services that the Recent Activities service tracks.
Note:
If you run an application that does not contain one of these services, the Recent Activities service displays an error sayingWarning: Unable to obtain recent activity data
.Create a new external application by right-clicking the ViewController project in your application, then choosing New.
In the New Gallery, under General, select External Applications, then select External Application from the Items list.
Click OK.
In the Application Name field, enter a name for your application, such as MyExternalApplication
, then click Next.
On the General page, leave the Login URL field empty.
In the User Name/ID Field Name field, enter a user name. The user name should match the login credentials of the servers you are tracking. For example, if you are tracking the Documents service with Oracle Content Server, the login credentials must match those of the user on the Oracle Content Server.
In the Password Field Name field, enter a password.
Under Authentication Details, choose POST, then click Next.
On the Additional Fields page, click the Add Field button.
For the Field Name, enter Account
.
Select the Display to User checkbox.
Click Finish.
In the Resource Palette, open the WebCenter Services Catalog, then open the Task Flows folder.
Click Recent Activities and drag and drop it onto your page after the <af:form>
tag, and choose Region.
Figure 18-3 Edit Task Flow Binding Dialog Box
In the Edit Task Flow Binding dialog, you can set the values for the time range that displays at runtime. This time range controls what activities display, as you will see in the next section. If you leave these parameters empty, the Recent Activities service will use the default values of the service.
Table 18-1 describes the possible values for these parameters.
Table 18-1 Recent Activities Time Range Parameter Values
Parameter | Values |
---|---|
|
Leave the value of this parameter as |
|
Default value: Possible values: |
|
Default value: Possible values: |
|
Default value: (10080 minutes is equivalent to 7 days.) Possible values: |
|
Default value: (43200 minutes is equivalent to 30 days.) Possible values: |
Figure 18-4 Example of the Edit Task Flow Binding Dialog for the Recent Activities Service
Click OK. The binding displays on your page, as shown in Figure 18-5.
Figure 18-5 The Recent Activities Task Flow on a Page in the Design View
Save your project and run your page to the browser.
Note:
When you add the Recent Activities task flow to your page, you will see a task flow parameter called groupSpace. The default value of this parameter isnull
, which tells the task flow to search the entire application for recent activity.The Recent Activities service uses the security applied to the underlying services being analyzed. So, the information returned by the services only contains content for which the current user has at least View privileges. For example, a user who does not have View privileges to view content in a document library will not see recently added documents in the Recent Activities view. Similarly, a public user will only see activities returned on services exposed to the public, and do not require authentication to view.
In addition to the task flow parameters, you can further refine the behavior of the Recent Activities service by editing the settings in the adf-config.xml
file.
You can change a variety of the Recent Activities service parameters after you have added it to your application. When you add the task flow to your page, you also automatically add the following entry to the adf-config.xml
file, located in the Application Resources panel, under Descriptors, in the ADF META-INF folder:
<recentactivityC:adf-recent-activity-config xmlns="http://xmlns.oracle.com/webcenter/recentactivity/config"> <display-properties numServiceRows="25" shortPeriod="TODAY" mediumPeriod="YESTERDAY" longPeriod="10080" longestPeriod="43200"/> <services-filter> <exclude/> </services-filter> </recentactivityC:adf-recent-activity-config>
You can change the following settings in this entry:
Table 18-2 Recent Activities Settings in the adf-config.xml File
Setting | Description |
---|---|
|
Default value: The maximum number of rows displayed for a single service. If there are more recent activity results than this, the most recent ones up to this number are returned. For example, if there are 32 recently modified documents and this setting is 25 then only the most recent 25 will show up in the results. |
|
Default value: See Table 18-1. This setting is the same as the |
|
Default value: See Table 18-1. This setting is the same as the |
|
Default value: See Table 18-1. This setting is the same as the |
|
Default value: See Table 18-1. This setting is the same as the |
|
Default value: Use this tag to filter out services you do not wish to track with this service. The following example omits any changes to the Page service from displaying in the Recent Activities service: <services-filter> <exclude>oracle.webcenter.page</exclude> </services-filter> By default, no services are omitted. |