Skip Headers
Oracle® Fusion Middleware Developer's Guide for Oracle WebCenter
11g Release 1 (11.1.1)
E10148-02
  Go To Documentation Library
Library
Go To Product List
Product
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

18 Integrating the Recent Activities Service

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:

18.1 Introduction to 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:

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.

18.1.1 Understanding the Recent Activities Service

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

Description of Figure 18-1 follows
Description of "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."

18.2 Basic Configuration for the Recent Activities Service

This section describes how to add the Recent Activities service to your custom WebCenter application.

18.2.1 Setting up Connections for the Recent Activities Service

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.

18.2.2 Adding the Recent Activities Service at Design Time

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:

  1. 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.

  2. Open the source of the customizable page.

  3. 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 saying Warning: Unable to obtain recent activity data.

  4. Create a new external application by right-clicking the ViewController project in your application, then choosing New.

  5. In the New Gallery, under General, select External Applications, then select External Application from the Items list.

  6. Click OK.

  7. In the Application Name field, enter a name for your application, such as MyExternalApplication, then click Next.

  8. On the General page, leave the Login URL field empty.

  9. 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.

  10. In the Password Field Name field, enter a password.

  11. Under Authentication Details, choose POST, then click Next.

  12. On the Additional Fields page, click the Add Field button.

  13. For the Field Name, enter Account.

  14. Select the Display to User checkbox.

    Figure 18-2 Additional Fields Page

    Description of Figure 18-2 follows
    Description of "Figure 18-2 Additional Fields Page"

  15. Click Finish.

  16. In the Resource Palette, open the WebCenter Services Catalog, then open the Task Flows folder.

  17. 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

    Description of Figure 18-3 follows
    Description of "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

    groupSpace

    Leave the value of this parameter as null.

    timePeriodShort

    Default value: Today

    Possible values: Today, Yesterday, or a Time in Minutes

    timePeriodMedium

    Default value: Since Yesterday

    Possible values: Today, Yesterday, or a Time in Minutes

    timePeriodLong

    Default value: 10080

    (10080 minutes is equivalent to 7 days.)

    Possible values: Today, Yesterday, or a Time in Minutes

    timePeriodLongest

    Default value: 43200

    (43200 minutes is equivalent to 30 days.)

    Possible values: Today, Yesterday, or a Time in Minutes


    Figure 18-4 Example of the Edit Task Flow Binding Dialog for the Recent Activities Service

    Description of Figure 18-4 follows
    Description of "Figure 18-4 Example of the Edit Task Flow Binding Dialog for the Recent Activities Service"

  18. 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

    Description of Figure 18-5 follows
    Description of "Figure 18-5 The Recent Activities Task Flow on a Page in the Design View"

  19. 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 is null, which tells the task flow to search the entire application for recent activity.

18.2.3 Setting Security for the Recent Activities Service

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.

18.3 Advanced Information for the Recent Activities Service

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

numServiceRows

Default value: 25

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.

shortPeriod

Default value: Today

See Table 18-1. This setting is the same as the timePeriodShort task flow parameter, and is used when the task flow parameter is not specified.

mediumPeriod

Default value: Yesterday

See Table 18-1. This setting is the same as the timePeriodMedium task flow parameter and is used when the task flow parameter is not specified.

longPeriod

Default value: 10080 (Last 7 Days)

See Table 18-1. This setting is the same as the timePeriodLong task flow parameter and is used when the task flow parameter is not specified.

longestPeriod

Default value: 43200 (Last 30 Days)

See Table 18-1. This setting is the same as the timePeriodLongest task flow parameter and is used when the task flow parameter is not specified.

services-filter

Default value: null

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.