Skip Headers
Oracle® Fusion Applications Developer's Guide
11g Release 7 (11.1.7)

Part Number E15524-08
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

65 Implementing Oracle Social Network Integration

This chapter documents how developers can implement Oracle Social Network in an application by creating the Model project in JDeveloper and by displaying it in the Global Area of the UIShell.

The chapter includes these sections:

65.1 Prerequisites for Oracle Social Network Integration

For Oracle Social Network integration to work, there must be a connection defined between Oracle Fusion applications and Oracle Social Network. This connection must be configurable because Oracle Fusion applications and Oracle Social Network will not reside on the same server. These configuration items must be in place:

65.2 Implementing the Oracle Social Network Model Project

Each of the roles listed in Table 65-1 involves a different part of the entire Oracle Fusion Applications-Oracle Social Network integration work flow.

Table 65-1 Oracle Social Network Integration Roles

Role Description Primary responsibilities for integration

Fusion Applications Developer

A developer in a product team that has view object data that is to be sent to Oracle Social Network.

  • Defining that view objects are to be available for Oracle Social Network integration.

  • Configuring the view object and its Attributes for Oracle Social Network integration.

  • Updating the product User Interface to include the Oracle Social Network "Share" button to allow for Manual Oracle Social Network integration.

  • Configuring their Oracle Fusion Functional Setup Manager to have a task flow entry for "Manage Social Network Objects".

Provisioner

The person who provides and configures the Oracle WebLogic Server environment in that the Oracle Fusion application is to be run.

  • Creating the Oracle Social Network credential in the credential store (if not pre-provisioned).

  • Configuring Topology Manager to have a deployed application entry for "Oracle Social Network."

Functional Administrator

The person on the site who will configure that view objects will be used at product runtime from the list of available view objects for Oracle Social Network integration.

  • Choose the type of integration each of the available view objects will have.

  • Select that attributes will be sent to Oracle Social Network for the list of view objects that have integration enabled.

End User

The user who generates transactions using Oracle Fusion applications with Oracle Social Network and who is saving the view object row in the product UI.

  • Triggering the send of the view object row as a Social Object to Oracle Social Network.

  • Launching and using Oracle Social Network to view the Social Object.


At different times during the development process, a person must be able to perform several of these roles. For example, an Oracle Fusion Applications developer who is performing development through to testing will need to wear the hats for most or all of these roles to ensure that their integration pieces work correctly to send the data to Oracle Social Network.

65.2.1 How the Oracle Fusion Applications Developer Role Works

For developers, there are several phases of the development process in that they need to perform setup and configuration of the Oracle Social Network integration with their products.

  • Design Time - Making a Business Object available for Oracle Social Network integration.

    The prerequisite is that the JDeveloper environment has at minimum the "Applications Core" extension loaded.

  • Configuring the Business Object for Oracle Social Network Integration

    When implementing the Oracle Fusion Applications-Oracle Social Network integration provided by Oracle Fusion Middleware Extensions for Applications, the product team must already have a view object that meets the following criteria:

    • It is underpinned by one or more entity objects that are derived from the OAViewObjectImpl and OAEntityObjectImpl respectively.

    • Any rows from the view object must be derived from OAViewRowImpl.

    • The view object must not be an "Expert" (SQL) based.

      Any view object that matches these criteria can be considered for Oracle Social Network integration availability. When a view object has been made available for Oracle Social Network integration, it can be enabled on the site using the "Manage Social Network Objects" page.

To set up a view object for Oracle Social Network integration, there is a common set of steps to provide basic integration. This basic integration can be customized based upon how the integration is to work for that view object. The various customizations that can be applied are:

  • Adding translated labels.

  • Changing Oracle Social Network field data types, object title, object key, view details URL and registration name.

A wizard assists with making view objects available for Oracle Social Network integration. The wizard will guide you through selecting the view objects and the set of attributes within the view object that are available for a site to send through to Oracle Social Network. All view objects that are to be available for Oracle Social Network integration must follow the steps in the next section. Then they can have additional configuration made to tailor the integration further. Section 65.2.1.1, "Configuring the Business Object for Oracle Social Network Integration" discusses the required steps to have a basic integration with Oracle Social Network.

65.2.1.1 Configuring the Business Object for Oracle Social Network Integration

It is underpinned by one or more entity objects that are derived from the OAViewObjectImpl and OAEntityObjectImpl respectively.

A wizard helps make view objects available for Oracle Social Network integration. The wizard will guide you through selecting the view objects and the set of attributes within the view object that are available for a site to send through to Oracle Social Network. All view objects that are to be available for Oracle Social Network integration must follow the steps listed here. Then they can have additional configuration made to tailor the integration further. The required steps to have a basic integration with Oracle Social Network are:

  1. Find the application module that contains the view object to be made available for Oracle Social Network integration.

  2. Right-click the application module and select the Add OSN View Instances menu item. This will start the OSN Enabled View Instances wizard, shown in Figure 65-1.

    Figure 65-1 OSN Enabled View Instances Wizard

    Starting the OSN Enabled View Instances Wizard
  3. At the top of the wizard is a dropdown list called Module. Choose the module that best represents the line of business for the current project.

  4. Just beneath the Modules, there is a list of available view objects and a data model list. Find the view object(s) that are to be made available for Oracle Social Network integration from the list of available view objects and shuttle them into the data model. This signifies that the view object will be available for Oracle Social Network integration.

  5. Clicking the view object in the data model pane will show the list of attributes for that view object in the Attributes tab.

  6. Select the Enable check box next to any attribute that is to be available within that view object for Oracle Social Network integration. Only attributes that are enabled will be allowed to be sent to Oracle Social Network.

  7. Click OK to finish the wizard.

If the deployment profile for the project is a ADF Library JAR file, then the META-INF folder and the fnd-osn-integration.xml file automatically will be bundled into the JAR file at the correct location. However, if the deployment profile is a regular JAR file, then the META-INF folder will need to be added as Project Output Contributor and ensure that the fnd-osn-integration.xml file is selected for inclusion in the JAR file. There should be no additional steps required for product integrators or special build steps so long as the META-INF/fnd-osn-integration.xml file is included in the root of the JAR file.

Now when the Model project is deployed and loaded at the client site, the view objects that were moved to the Data Model pane will be available in "Manage Social Network Objects," allowing them to be Oracle Social Network-enabled.

What happens when using the "Add OSN View Instances" wizard

After clicking OK to close the wizard, several tasks are performed with new artifacts generated. The first thing that happens is that a new file is created (if it did not already exist) called fnd-osn-integration.xml under the META-INF folder (that also will be created if it did not exist) of the JDeveloper projects Application Source. There will only be one of these files per JDeveloper project and it will be re-loaded if the developer re-opens the wizard. This XML file contains the module information and the names of the view objects that have been made available for Oracle Social Network integration. A sample fnd-osn-integration.xml file looks like:

<?xml version="1.0" encoding="utf-8"?>
<fnd-osn-metadata xmlns="http://xmlns.oracle.com/apps/fnd/applcore/osn" moduleId="84944D4BE32F441AE0401490D3C52A40">
  <AppModule Name="ProjectTaskAM" ApplicationModuleName="oracle.apps.fnd.applcore.demo.applicationModule.ProjectTaskAM">
    <ViewUsage Name="Projects" ViewObjectName="oracle.apps.fnd.applcore.crmdemo.model.ProjectsVO"/>
    <ViewUsage Name="Tasks" ViewObjectName="oracle.apps.fnd.applcore.crmdemo.model.TasksVO">
      <ViewLinkUsage Name="ProjectsToTasksVL" ViewLinkObjectName="oracle.apps.fnd.applcore.crmdemo.model.ProjectsToTasksVL"
                     SrcViewUsageName="oracle.apps.fnd.applcore.crmdemo.model.applicationModule.ProjectsTasksAM.Projects"
                     DstViewUsageName="oracle.apps.fnd.applcore.crmdemo.model.applicationModule.ProjectsTasksAM.Tasks"
                     Reversed="false"/>
     </ViewUsage>
  </AppModule>
</fnd-osn-metadata>

When deployed in a ADF Library JAR file, this file will be located at META-INF/fnd-osn-integration.xml allowing it be looked up directly on the class path from the "Manage Social Network Objects" page.

The other change that the wizard makes is to modify the view object definition XML file for the attributes that are available for Oracle Social Network integration. It adds or updates a new custom property called fnd:OSN_ENABLED_ATTR within the attribute XML node with a value of true to make that attribute available.

<ViewAttribute Name="DeptName">
    <Properties>
      <SchemaBasedProperties>
        <fnd:OSN_ENABLED_ATTR Value="true"/>
      </SchemaBasedProperties>
    </Properties>
</ViewAttribute>

65.2.1.2 Translating Oracle Social Network Labels

The view object and its attributes are displayed to the functional administrator and end users in the "Manage Social Network Objects" page and also within Oracle Social Network, so these string must be translated. A functional administrator can use the "Manage Social Network Objects" taskflow to enable Oracle Social Network integration by selecting view objects and attributes. When Oracle Social Network displays a view object Social Object, the data is displayed as name-value pairs. The Oracle Social Network integration re-uses the standard view object process for defining prompts for the translations that are sent to Oracle Social Network. This is done using the UI Hints properties that are already defined upon the business objects.

These UI Hint properties are used from the view object for translations:

  • Display Name - used to show when a label is required for the view object.

  • Display Name (Plural) - used to show when plural label is required for the view object.

  • Description - used for showing the description in the "Manage Social Network Objects" page.

These UI Hint properties are used from the view objects attributes as Oracle Social Network field label translations:

  • Label - used to show when a label is required for the attribute.

  • Display Name (Plural) - used to show when a plural label is required for the attribute.

What happens when translated Oracle Social Network labels are provided

The view object definition XML file will be modified with these custom properties set:

  • View Object Property node names:

    • LABEL - Display Name

    • LABEL_PLURAL - Display Name (Plural)

    • TOOLTIP - Description

  • Attribute Property node names:

    • LABEL - Label

    • LABEL_PLURAL - Display Name (Plural)

    The values provided in the Edit property window will be seeded into the translation bundle and the key will be stored as the ResId attribute of the relevant property node in the view object definition file. These are sample changes to the view object definition file.

    <ViewObject Name="SndDemoDeptVO">
      <Properties>
        <SchemaBasedProperties>
          <LABEL ResId="DEMO_DEPARTMENT"/>
          <LABEL_PLURAL ResId="DEMO_DEPARTMENTS"/>
          <TOOLTIP ResId="DEMONSTRATION_DEPARTMENT_FOR_S"/>
        </SchemaBasedProperties>
      </Properties>
      <ViewAttribute Name="DeptName">
        <Properties>
          <SchemaBasedProperties>
            <LABEL ResId="DEPARTMENT_NAME"/>
            <LABEL_PLURAL ResId="DEPARTMENT_NAMES"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
    </ViewObject>
    

65.2.1.3 Configuring Oracle Social Network Field Data Types

Oracle Social Network integration is restricted to sending data using a limited number of data types. The view object attributes can be configured to provide some contextual information about how the attribute value will be shown as a field value in Oracle Social Network. For example, a string representing a URL will be kept in the attribute as a String but can be configured to show in Oracle Social Network to display as a clickable link rather than as a static String.

The supported data types, explanations, and their usage are listed in Table 65-2.

Table 65-2 Supported Data Types

Gadget Type Description When to Use Notes

Boolean

Allows the value sent to Oracle Social Network to be treated like a boolean. If the gadget that the conversation/wall is using has been modified in the gadget editor to show the editable representation of the field, then this will be displayed as a checkbox.

If the attribute being sent to Oracle Social Network is to be viewed as a boolean value.

If the Java Type of the attribute is anything other than java.lang.Boolean, then refer to the Boolean entry in Special Cases - Boolean.

Currency

When sending a numeric attribute value representing a value in a currency to Oracle Social Network, this gadget type can send the additional currency code information relating to that attribute. To send the currency code with the numeric value perform the following steps:

  • Set the Gadget Type on the numeric value attribute to "currency".

  • Set the Currency Code Attribute property to be the name of another attribute in the view object whose value at runtime will be the Currency Code for the numeric value attribute. For example if the following attributes exist:

    Attribute #1: "Credit" Gadget Type="CURRENCY" OSN_ENABLED="true" OSN_CURRENCY_CODE_ATTR="CreditCurrencyCode" Value="23"

    Attribute #2 : "CreditCurrencyCode" Gadget Type="STRING" OSN_ENABLE="false" Value="USD"

    When sent to Oracle Social Network, the credit field will show as Credit: 23 USD

If the numeric value being sent to Oracle Social Network specifies a currency value and the currency code is also required to be sent to Oracle Social Network.

  • The attribute for currency code should be a String value.

  • The attribute for currency code does not need to be flagged as OSN_ENABLED="true" as the currency code value will be sent as part of the numeric value payload being sent to Oracle Social Network.

  • If the attribute for currency code is marked as OSN_ENABLED="true" then it will be shown in a separate Oracle Social Network field to the currency code and if it also is flagged as the "Currency Code Attribute" property value on the numeric value attribute then it will be shown twice: in its own field and also as the numeric attributes currency code.

Date

Display the attribute value as a formatted date.

If the attribute value is defined as a Date and can be shown as such in Oracle Social Network.

 

Double

Display a number as a floating point with a decimal fraction representation of the number.

When the attribute value will have a decimal fraction to be displayed.

 

Integer

Display a number as a whole number.

When the attribute value will not have a decimal fraction to be displayed.

 

Percent

Display a number as a whole number percentage.

When the attribute value is to be displayed as a percentage.

The values can only be whole numbers between 0 and 100.

Person

Display the attribute as a clickable user who exists in Oracle Social Network. By sending the username or identifiable value for a user (most likely an email address in an LDAP-based Oracle Social Network) as a Person Gadget Type, Oracle Social Network will look up the display name for the user in its user security store (local/LDAP) and display a link using the user's display name. When the link is clicked, it will redirect to the Wall for the user represented by the person attribute.

When the attribute value represents the username/identifiable value for a user in Oracle Social Network.

Only email addresses are supported.

  • Attribute value must be a String

  • Attribute value must be the identifiable value for a user in the security store being used by Oracle Social Network (local/LDAP).

String

Display a value.

If the Java Type of the object being retrieved from the View Object does not conform to any of the other Gadget Types.

 

URL

Display a string value as a clickable URL link in Oracle Social Network.

If the attribute value is a fully qualified URL that an Oracle Social Network user will be allowed to click.

  • The URL rendered in Oracle Social Network will not have a label appear next to it.

  • The URL value should be a fully qualified URL to the destination.


If the OSN_GADGET_TYPE is not provided (default state for the property), then the Oracle Social Network integration code will use the Java Type to Gadget Type mapping shown in Table 65-3 for sending the data to Oracle Social Network.

Table 65-3 Java Type to Gadget Type Mapping

ADFBC / Java Type Gadget Type Gadget Description

java.sql.Date

java.sql.Timestamp

java.util.Date

oracle.jbo.domain.Date

oracle.jbo.domain.Timestamp

Date

Display the attribute value as a formatted date in Oracle Social Network.

java.lang.Integer

java.lang.Long

java.lang.Short

java.math.BigInteger

java.util.concurrent.atomic.AtomicInteger

java.util.concurrent.atomic.AtomicLong

Integer

Display a number in Oracle Social Network as a whole number.

java.lang.Double

java.lang.Float

java.lang.Number

java.math.BigDecimal

oracle.jbo.domain.Number

Double

Display a number in Oracle Social Network as a floating point with a decimal fraction representation of the number.

java.lang.Boolean

Boolean

Allows the value sent to Oracle Social Network to be treated like a boolean. If the gadget that the conversation/wall is using has been modified (in the Oracle Social Network gadget editor) to show the editable representation of the field then this will be displayed as a checkbox.

any object using toString

String

Display a value.

java.lang.Number

Currency

When sending an numeric attribute value representing a value in a currency to Oracle Social Network this gadget type allows for the sending of the additional currency code information relating to that attribute.

java.lang.Long

Percent

Display a number as a whole number percentage.

java.lang.String

Person

Display the attribute in Oracle Social Network as a clickable user who exists in Oracle Social Network. By sending the username or identifiable value for a user, most likely email address in an LDAP based Oracle Social Network, as a Person Gadget Type Oracle Social Network will look up the display name for the user in its user security store (local/LDAP) and display a link with using the users display name. When the link is clicked it will redirect to the Wall for the user represented by the person attribute.

java.lang.String

URL

Display a string value as a clickable URL link in Oracle Social Network.


To configure the attributes for the Oracle Social Network field gadget types (non-Currency):

  • Open the view object.

  • Open the Attributes tab and click an Attribute.

  • In the Property Inspector, open the Applications - Oracle Social Network section.

  • Change the value in the Oracle Social Network Gadget Type to the required type.

  • Click Save to keep the changes.

For setting an attribute to the Currency gadget type, an additional step must be followed to add the currency code for the currency value. By setting the Currency Code attribute property for the attribute, when the Social Object is sent to Oracle Social Network, the currency code value also will be sent with the currency value so that Oracle Social Network can display both values when it displays the currency value. Note that the currency code attribute does not need to be available to Oracle Social Network integration for its value to be used when sending the currency so long as the attribute for the Currency is available to Oracle Social Network integration. These are the steps to set up an attribute for currency:

  • Open the view object.

  • Open the Attributes tab and click an attribute that is to have the gadget type of Currency.

  • In the Property Inspector, open the Applications - Oracle Social Network section.

  • Change the Oracle Social Network Gadget Type to Currency.

  • In the Currency Code attribute property, enter the name of the attribute whose value will contain the currency code value.

  • Click Save to keep the changes.

What happens when setting the Gadget Type

The View Attribute node in the view object definition XML file will be modified with these modified custom properties:

  • fnd:OSN_GADGET_TYPE - the Oracle Social Network Gadget Type.

  • fnd:OSN_CURRENCY_CODE_ATTR - the name of the attribute on the view object whose value will contain the currency code when fnd:OSN_GADGET_TYPE=currency.

    For non-currency attributes:

    <ViewAttribute Name="ColBoolean">
      <Properties>
       <SchemaBasedProperties>
         <fnd:OSN_ENABLED_ATTR Value="true"/>
         <fnd:OSN_GADGET_TYPE Value="boolean"/>
       </SchemaBasedProperties>
      </Properties>
    </ViewAttribute>
    

    For currency attributes:

    <ViewAttribute Name="ColCurrency">
      <Properties>
        <SchemaBasedProperties>
          <fnd:OSN_ENABLED_ATTR Value="true"/>
          <fnd:OSN_GADGET_TYPE Value="currency"/>
          <fnd:OSN_CURRENCY_CODE_ATTR Value="ColCurrencyCode"/>
        </SchemaBasedProperties>
      </Properties>
    </ViewAttribute>
    <ViewAttribute Name="ColCurrencyCode"/>
    

Special Cases - Boolean

If an attribute represents a boolean value, a conversion will be required to send the value to Oracle Social Network. The Oracle Social Network integration requires that any attribute marked as Gadget Type Boolean must provide the string value "T" to represent true or "F" to represent false. As part of the Oracle Social Network integration, if a Java Type of java.lang.Boolean is provided, it implicitly is sent to Oracle Social Network as "T" or "F." An additional exception was made that if an attribute was of type String with Gadget Type of Boolean and the value provided being "T" or "F," then that value will be sent to Oracle Social Network. Any other values or types will not be sent to Oracle Social Network with a message being written to the Diagnostic log. In Oracle Fusion Applications, it is common practice to define a Boolean value as a String and use values such as "Y" and "N" or "1" and "0." However, it is not just restricted to those values. In this case, just setting the Gadget Type to Boolean will not send any value to Oracle Social Network. To be able to translate a String (or other representation of a Boolean) into a value that can be sent to Oracle Social Network as a Boolean, you must follow these steps:

  • Add a new transient attribute to the view object.

  • Set the Type of the attribute to be Boolean.

  • Implement the conversion between the string boolean attribute and the Java Boolean attribute as a Groovy expression or as a Java override of the getter attribute of the transient attribute in the RowImpl class for the view object. For example, this Groovy expression can be used in the "Y"/"N" case:

    "Y".equalsIgnoreCase(<your attribute name>)
    
  • In the Dependencies page of the attribute wizard, make the Boolean transient attribute dependent upon the String boolean attribute.

  • Set the Gadget Type for the Boolean transient attribute as boolean.

  • Either re-open the Add OSN View Instances wizard, find the view object and click the Enabled checkbox for the transient attribute and click OK.

    or

    Open the Attributes tab in the view object, select the transient attribute, go to the Property Inspector and change the OSN Enabled property to be "true."

  • Click Save to keep the changes.

Special Cases - Lookups and Conversion Values

Attributes that are a lookup code must provide a meaning or translated value to Oracle Social Network. The primary use case is lists of values where the lookup code is stored in the view object attribute and a lookup list of values provides a mapping between the lookup code and the descriptive meaning. Supporting the lookups in the current Oracle Social Network integration requires creating a new attribute that contains the lookup display value. There are two ways the attribute can be defined to provide the meaning value.

  • Foreign key lookup

    Most view objects with a lookup code will already have a join to get the lookup display value. Essentially, a foreign key is defined through the lookup entity object in the view object definition. In this case, the meaning attribute can be Oracle Social Network enabled by using one of these methods:

    • Opening the Add OSN View Instances wizard, find the view object and select the Enabled checkbox for the meaning attribute and click OK.

    • Open the Attributes tab in the view object, select the meaning attribute, go the Property Inspector and change the OSN Enabled property to be "true".

  • Transient attribute lookup

    A string transient attribute will be defined and the view object Row Impl's getter for the transient will perform the lookup based upon the lookup code and return the meaning value. This is similar to how boolean values are handled where the transient attribute will be Oracle Social Network enabled.

Special Cases - Timezone Affected Values

The function of Oracle Social Network requires that a date value be passed to Oracle Social Network as the number of milliseconds since Epoch. The Oracle Social Network integration takes the date value provided from the attribute count in milliseconds and sends it to Oracle Social Network. Oracle Social Network then will display that value with the settings configured with Oracle Social Network. If there must be a deviation to how this works to account for timezoned dates, then a transient attribute approach where the time is modified and passed to Oracle Social Network integration as a new date will need to be performed.

  • Add a new transient attribute to the view object.

  • Set the Type of the attribute to be Date/TimeStamp.

  • Implement the timezone conversion between the original Date/TimeStamp attribute and the Date/TimeStamp transient attribute so that the value will be correct when being retrieved as milliseconds since Epoch as a Groovy expression or as a Java override of the getter attribute of the transient attribute in the RowImpl class for the view object.

  • In the Dependencies page of the attribute wizard, make the Date/TimeStamp transient attribute dependent upon the Original Date/TimeStamp attribute.

  • Set the Gadget Type for the transient attribute as Date.

  • Either re-open the Add OSN View Instances wizard, find the view object and select the Enabled checkbox for the transient attribute and click OK.

    or

    Open the Attributes tab in the view object, select the transient attribute, go to the Property Inspector and change the OSN Enabled property to be "true".

  • Click Save to keep the changes.

Special Cases - Other types of attributes that do not fit the defined list of Oracle Social Network Gadget Types

If there are other value types in a view object attribute that need to be sent to Oracle Social Network or provided in a different format, the best way to solve this with the current framework is to provide a new transient String attribute and format the value in the way it should be displayed in Oracle Social Network.

  • Add a new transient attribute to the view object.

  • Set the Type of the attribute to be String.

  • Implement the conversion between the custom value type and the String transient attribute as a Groovy expression or as a Java override of the getter attribute of the transient attribute in the RowImpl class for the view object.

  • In the Dependencies page of the attribute wizard, make the String transient attribute dependent upon the custom value type attribute.

  • Set the Gadget Type for the transient attribute as String.

  • Either re-open the Add OSN View Instances wizard, find the view object, select the Enabled checkbox for the transient attribute, and click OK.

    or

    Open the Attributes tab in the view object, select the transient attribute, go to the Property Inspector and change the OSN Enabled property to be "true".

  • Click Save to keep the changes.

65.2.1.4 Configuring Oracle Social Network Object Title

When a view object row is sent to Oracle Social Network as a Social Object, it will be displayed in the Oracle Social Network UI as a record with a title and a collection of name-value pairs. The value that is shown as the title of the Social Object can be configured on the view object. The following steps describe how to set the title for the Social Object:

  • Open the view object in JDeveloper and click the Attributes tab.

  • Determine that attribute is to be used as the Social Object title value. If this is a pre-existing attribute value, skip the next three optional steps.

  • [Optional-generated title] Define a new transient attribute that has a type of String.

  • [Optional-generated title] Implement the title generation in the transient attribute as a Groovy expression or as a Java override of the getter attribute of the transient attribute in the RowImpl class for the view object.

  • [Optional-generated title] In the Dependencies page of the attribute wizard, make the String transient attribute dependent upon the custom value type attribute.

  • Select the attribute (transient or actual).

  • Access the Property Inspector in the Applications - Oracle Social Network section and set the Oracle Social Network User Key to be "true".

  • Click Save to keep the changes.

What happens when you define the Oracle Social Network Social Object Title

The Attribute definition within the view object definition XML file will be modified with the following custom property:

fnd:OSN_USER_KEY - The Oracle Social Network User Key custom attribute.

The following is an example of the modification in the view object attribute definition XML file:

<ViewAttribute Name="DeptName">
  <Properties>
    <SchemaBasedProperties>
      <fnd:OSN_ENABLED_ATTR Value="true"/>
      <fnd:OSN_USER_KEY Value="true"/>
    </SchemaBasedProperties>
  </Properties>
</ViewAttribute>

Notes:

  • There should be only one attribute with the Oracle Social Network User Key custom property value set to "true". If there are multiple attributes with the custom property set, then the first one that is found during processing will be used and all others will be ignored.

  • If no attributes are provided with this custom property set, then the concatenated values of the attributes that comprise the view object primary key will be used.

65.2.1.5 Configuring Oracle Social Network Object Key

When a view object row is sent to Oracle Social Network, the Social Object will be assigned an internal unique identifier that will represent the Social Object during any interactions with Oracle Social Network. To perform subsequent updates to the Social Object from the view object, the Social Object also retains an external key based upon a single attribute value that must be sent to Oracle Social Network with every call. Without any additional configuration, the Oracle Social Network integration will build a concatenated value based upon the values of the attributes marked as the primary key that should suffice in most scenarios. If this concatenated value is longer than 256 characters, or the developer has a better key to use to uniquely identify the row, the Oracle Social Network integration provides the ability to override the automatically-generated value with a value of a custom property called OSN Object Key. For example, if a child object in a parent-child relationship is being sent to Oracle Social Network, then its primary key may be comprised of the parent object's primary key plus a unique value for the child. If the child value is unique within the child table, then the parent primary key is not required for the Social Object to uniquely identify with the view object row. So by marking the child unique value as the Oracle Social Network Object Key, there will be a slight performance gain as the external key for the Social Object does not need to be calculated.

To set up the Oracle Social Network Object Key:

  • Open the view object in JDeveloper and click the Attributes tab.

  • Determine that attribute is to be used as the Social Object external key value. If this is a pre-existing attribute value then skip the next three optional steps.

  • [Optional-generated key] Define a new transient attribute that has a type of String.

  • [Optional-generated key] Implement the key generation in the transient attribute as a Groovy expression or as a Java override of the getter attribute of the transient attribute in the RowImpl class for the view object.

  • [Optional-generated key] In the Dependencies page of the attribute wizard, make the String transient attribute dependent upon the custom value type attribute.

  • Select the attribute (transient or actual).

  • Access the Property Inspector in the Applications - Oracle Social Network section and set the Object Key to be "true."

  • Click Save to keep the changes.

    What happens when you define the Oracle Social Network Social Object Key

    The Attribute definition within the view object definition XML file will be modified with the following custom property:

    fnd:OSN_OBJECT_KEY - The Object Key attribute.
    

    The following is an example of the modification in the view object Attribute definition XML.

    <ViewAttribute Name="DeptNum">
      <Properties>
        <SchemaBasedProperties>
          <fnd:OSN_ENABLED_ATTR Value="true"/>
          <fnd:OSN_OBJECT_KEY Value="true"/>
        </SchemaBasedProperties>
      </Properties>
    </ViewAttribute>
    

    Notes:

    • Single attribute primary key view objects do not need to set this value because no concatenations need to occur to get the primary key value to use.

    • There should only one attribute with the Oracle Social Network Object Key custom property value set to "true". If there are multiple attributes with the custom property set, then the first one that is found during processing will be used and all others will be ignored.

    • If no attributes are provided with this custom property set, then the concatenated values of the attributes that comprise the view object primary key will be used.

65.2.1.6 Configuring the View Details URL

Use the information in this section to navigate from the Oracle Social Network Social Object into the Oracle Fusion Applications user interface.

After a view object row is sent to Oracle Social Network as a Social Object there may be a need for the user to modify the original values for that row. The mechanism to allow for the navigation from the Social Object back into the record in Oracle Fusion Applications is performed using a "View Details" URL that is shown when viewing the Social Object details. To be able to generate a URL that can navigate into Oracle Fusion Applications, there must be a taskflow to be called that can accept parameter(s) to load the row in the product application page as well as configuration on the view object that provides the information allowing the Oracle Social Network integration to build the URL. The configuration on the view object is performed by setting the following properties:

  • Nav Web Application (fnd:OSN_FA_WEBAPP) - This is a mandatory field. The identifier for a registered web application that is to be called back into. The value provided here must be seeded into Topology Manager as a deployed application.

    Used in the Oracle Social Network integration to determine the web applications that will be called back into when the View Details link is clicked. This web application will be used to look up the base URL for the callback URL. An example is shown here:

    <Properties>
        <SchemaBasedProperties>
          <fnd:OSN_FA_WEBAPP
            Value="ApplcoreCRMDemo"/>
        </SchemaBasedProperties>
      </Properties>
    
  • Nav View Id (fnd:OSN_FA_VIEW_ID) -This is a mandatory field. The identifier for the view that will be displayed upon call back.

    Used in the Oracle Social Network integration to determine what view is to be loaded when the callback is made from the View Details link. An example is shown here:

    <Properties>
        <SchemaBasedProperties>
          <fnd:OSN_FA_VIEW_ID
            Value="MyPage"/>
        </SchemaBasedProperties>
      </Properties> 
    
  • Nav Page Params List (fnd:OSN_FA_PAGE_PARAMS_LIST ) - A semicolon separated list of name-value pairs to be passed to the Oracle Fusion application's page as page level parameters when the callback is made from the View Details link. An example is shown here:

    <Properties>
        <SchemaBasedProperties>
          <fnd:OSN_FA_PAGE_PARAMS_LIST
            Value="key1=value1;key2=value2"/>
        </SchemaBasedProperties>
      </Properties> 
    
  • Nav Taskflow Id (fnd:OSN_FA_NAV_TASKFLOW_ID) - This is a mandatory field.- An Id to a bound task flow available in the page. This task flow will be called and passed parameters from OSN_FA_NAV_TASK_PARAMS_LIST when the callback is made from the View Details link. An example is shown here:

    <Properties>
        <SchemaBasedProperties>
          <fnd:OSN_FA_NAV_TASKFLOW_ID
            Value="/WEB-INF/StartupDefaultMainTaskFlow.xml#StartupDefaultMainTaskFlow"/>
        </SchemaBasedProperties>
      </Properties>  
    
  • Nav Task Key List (fnd:OSN_FA_NAV_TASK_KEY_LIST) - A semicolon separated list of name-value pairs to be passed to the page containing the task flow. These parameters are used to distinguish one instance of the task flow from any others that are also running. An example is shown here:

    <Properties>
        <SchemaBasedProperties>
          <fnd:OSN_FA_NAV_TASK_KEY_LIST
            Value="key1=value1;key2=value2"/>
        </SchemaBasedProperties>
      </Properties> 
    
  • Nav Task Params List (fnd:OSN_FA_NAV_TASK_PARAMS_LIST) - A semicolon separated list of name-value pairs to be passed to the called bound task flow in the Oracle Fusion application's page. These will be specific to the task flow and need to be defined as input parameters on the task flow. An example is shown here:

    <Properties>
        <SchemaBasedProperties>
          <fnd:OSN_FA_NAV_TASK_PARAMS_LIST
            Value="key1=value1;key2=value2"/>
        </SchemaBasedProperties>
      </Properties>
    
  • Task Label (fnd:OSN_FA_NAV_TASK_LABEL) - The label to be shown on the tab displayed that contains the bound task flow. This label will be a key into the appropriate translated bundle. An example is shown here:

    <SchemaBasedProperties>
          <fnd:OSN_FA_NAV_TASK_LABEL
            Value="SearchFlatTableVO1_OSN_FA_NAV_TASK_LABEL"/>
        </SchemaBasedProperties>
      </Properties>
    xlf bundle ....
    <trans-unit id="SearchFlatTableVO1_OSN_FA_NAV_TASK_LABEL">
        <source>Flat Table</source>
        <target/>
     </trans-unit> 
    
  • Task Label Attribute (fnd:OSN_FA_NAV_TASK_LABEL_ATTR) - The name of an attribute in the view object that contains the label to be shown on the tab displayed that contains the bound task flow. An example is shown here:

    <Properties>
      <SchemaBasedProperties>
        <fnd:OSN_FA_NAV_TASK_LABEL_ATTR
          Value="TaskLabelAttribute"/>
      </SchemaBasedProperties>
    </Properties>
    

    Notes:

    • This should not be used if the Task Label property is set. If both are set, then this one will take precedence and the Task Label will be ignored.

    • The attribute to which this property refers can be a transient or actual attribute.

The values supplied for Nav Page Params List, Nav Task Key List, Nav Task Params List and Task Label can contain attribute name tokens that will be resolved when the View Details URL is being generated before it is sent to Oracle Social Network. The token is made up of an attribute name contained within curly brackets {}.

For example, if the Nav Task Params List is defined as "deptNumParam={DeptNum}" then the value of the view object row Attribute called "DeptNum" will replace the {DeptNum} token.

To set up the view object for the View Details URL:

  • Open the view object in JDeveloper and click the General tab.

  • In the Property Inspector, go to the Applications - Oracle Social Network section.

  • Fill in the following custom properties:

    Nav Web Application

    Nav View Id

    Nav Page Params List

    Nav Taskflow Id

    Nav Task Key List

    Nav Task Params List

    Task Label

    Task Label Attribute

  • Click Save to keep the changes.

What happens when you configure the View Details URL Properties

The view object definition XML file will be modified with the following custom properties:

<ViewObject Name="SndDemoDeptVO">
  <Properties>
   <SchemaBasedProperties>
     <fnd:OSN_FA_WEBAPP Value="SocialNetworkDemo"/>
     <fnd:OSN_FA_VIEW_ID Value="SocialNetworkDemo"/>
     <fnd:OSN_FA_NAV_TASKFLOW_ID Value="/WEB-INF/DemoDepartmentTF.xml#DemoDepartmentTF"/>
     <fnd:OSN_FA_NAV_TASK_PARAMS_LIST Value="deptNumParam={DeptNum}"/>
     <fnd:OSN_FA_PAGE_PARAMS_LIST Value="deptNumPageParam={DeptNum}"/>
     <fnd:OSN_FA_NAV_TASK_KEY_LIST Value="deptNumKeyParam={DeptNum}"/>
     <fnd:OSN_FA_NAV_TASK_LABEL ResId="NAVIGATE_DEPT_DEPTNUM"/>
   </SchemaBasedProperties>
  </Properties>
</ViewObject>

When the end user submits the view object row this will trigger the Social Object to be generated for sending to Oracle Social Network. As part of this generation the View Details URL will be constructed and added to the Social Object payload. The URL is generated using an algorithm that will perform lookups, such as determining the base URL from the Web App Id, and other parameter manipulations that will convert these parameters into a string that UIShell will accept as secure and valid. The UIShell, when called with this URL, will be able to determine what the parameters were and how to load the page and taskflow. For example, the following parameters will generate into the URL.

  • View Object Custom Properties

    fnd:OSN_FA_WEBAPP="SocialNetworkDemoApp"
    fnd:OSN_FA_VIEW_ID="SocialNetworkDemo"
    fnd:OSN_FA_NAV_TASKFLOW_ID="/WEB-INF/DemoDepartmentTF.xml#DemoDepartmentTF"
    fnd:OSN_FA_NAV_TASK_PARAMS_LIST="deptNumParam={DeptNum}"
    fnd:OSN_FA_NAV_TASK_LABEL="Navigated {DeptNum}Department"
    
  • Topology Manager Setup

    Deployed Module "SocialNetworkDemoApp"=http://localhost:7001/snd-context-root
    
  • View Object Row

    DeptNum attribute value=350
    
  • Generated View Details URL

    http://localhost:7001/snd-context-root/faces/SocialNetworkDemo?fnd=%252FWEB-INF%252FDemoDepartmentTF.xml%2523DemoDepartmentTF%3BdeptNumParam%253D350%3B%3BNavigated%2B350%2BDepartment%3Bfalse%3B256
    

65.2.1.7 Changing the Oracle Social Network Registration Name

When a view object is registered with Oracle Social Network as a Social Object definition, the definition must have a unique name assigned to it that will be used to identify the definition. Without any additional configuration the registration name will be the concatenation of the application module id and the fully qualified view object Name. For example, if the application module name was FND and the view object was oracle.apps.fnd.applcore.demo.FndDemoDeptVO, then the registration definition would be FND.oracle.apps.fnd.applcore.demo.FndDemoDeptVO. In addition to the registration name for the view object, the Social Object Field Names are based upon the names of the attributes in the view object.

The Oracle Social Network integration provides a way to override the view object Social Object registration name and the Social Object Field Names. This can be done for the continued support of the existing Oracle Social Network registrations (such as for CRM/HCM) or to ensure that the length of the names does not exceed the 256 character limit.

To set the overrides of the Social Object definition registration names:

  • Open the view object in JDeveloper and click the General tab.

  • In the Property Inspector go to the Applications - Oracle Social Network section.

  • Set the following custom property to override the view objects Social Object registration definition name:

    Definition Name - This must be in the format <module id>.<name>. For example: FND.FndDempDept
    
  • Click the Attributes tab and select the attribute that is to have its Social Object Field Name overridden.

  • Set the following custom property:

    Oracle Social Network Attribute Name Override - The Social Object Field name the attribute will be referred to as.
    
  • Click Save to keep the changes.

What happens when you change the Social Object Registration Name

The following custom properties are modified within the view object XML definition.

  • fnd:OSN_DEFINITION_NAME - Definition Name

  • fnd:OSN_ATTR_DEFINTION_NAME - Oracle Social Network Attribute Name Override

The view object definition XML file will be modified with these custom properties:

<ViewObject Name="FndDemoOsnFieldsVO">
<Properties>
  <SchemaBasedProperties>
    <fnd:OSN_DEFINITION_NAME Value="fnd.FndDemoOsnFieldsVO"/>
  </SchemaBasedProperties>
</Properties>
<ViewAttribute Name="OsnTestRecordId">
  <Properties>
    <SchemaBasedProperties>
      <fnd:OSN_ENABLED_ATTR  Value="true"/>
      <fnd:OSN_ATTR_DEFINITION_NAME Value="TestId"/>
    </SchemaBasedProperties>
  </Properties>
</ViewAttribute>

65.2.1.8 Configuring View Objects that Have Multiple Updatable Entities

The Oracle Social Network integration can support view objects that are comprised of multiple updatable entity objects.

A multi-updatable entity object view object is:

  • A view object that has multiple entity objects selected to be within it.

  • Only the Primary entity object has the reference flag set to false.

  • The Join Type must be an inner join.

  • The entity objects that are participating in the update must have an association defined between them that creates an accessor in the Primary entity object that returns an instance of an OAEntityImpl (or one of its sub-classes) objects that is the instance of the Secondary entity object.

There are several cases in Oracle Fusion Applications where an Oracle Social Network integration available view object is tied to multiple updatable entity objects. For example, several Oracle Fusion applications use TCA (HZ_PARTIES) to manage key attributes about a person or company. Many teams, such as Procurement and CRM, extend the TCA schema with their own tables and columns to meet the information gathering requirements for their product. Procurement owns an entity called Supplier that extends the TCA Party schema to maintain information about a company from whom you would like to purchase goods and services. The Supplier view object would therefore have updateable attributes from both the Supplier entity object and the TCA Party entity object. ATG business event registration for Oracle Social Network integration typically only references the primary entity object. In the TCA case, a customer can go to the Maintain Supplier UI and update a single attribute, such as Supplier Name. The Supplier Name is maintained in the TCA Party entity object that, in this case, is not the primary entity object. We must publish these cases to Oracle Social Network as update events but we do not want to place the Oracle Social Network integration events on multiple entity objects to avoid mass duplication of events.

The solution for this use case is to register the Primary entity object (Supplier entity object) as a post transaction listener for the Secondary entity object (Party entity object). Whenever an update occurs in the Secondary entity object, the primary entity object will also be notified and its post transaction processing will send the view object data from both entity objects to Oracle Social Network.

These implementation steps are required to enable Oracle Social Network for multi-entity entity objects. This assumes the pre-condition of the accessor being as described at the beginning of this section.

  • In Jdeveloper, open the definition of the Primary entity object class.

  • Access the Java tab and click the Edit icon.

  • Click Generate Entity Collection Class.

  • Click OK to generate the EOCollImpl class for the entity object.

  • Open the EOCollImpl class for the entity object in the source editor.

  • Add the following code:

    EOCollImpl.java

    @Override
    protected EntityImpl add(EntityImpl srow)
    {    
      OAEntityImpl eo = (OAEntityImpl) super.add(srow);    
      byte state = srow.getPostState();
      if(EntityImpl.STATUS_UNMODIFIED == state ||
      EntityImpl.STATUS_MODIFIED == state)
      {
       eo.registerOsnExternalListener("SecondaryEOAccessor");    
      }
      return eo;
    }
    
  • Change the SecondaryEOAccessor to be the name of the accessor attribute in the Primary entity object that returns the OAEntityImpl (or sub-class) for the Secondary entity object.

What happens when the secondary Entity Object Accessor Registration occurs

The "add" method override accomplishes these actions:

  • Ensures that Oracle Social Network integration on the primary entity object exists before performing any registration.

  • Ensures that the accessor provided refers to an instance of an OAEntityImpl object.

  • Checks to see that attributes in the Secondary entity object are to be sent to Oracle Social Network as marked in the view object. If there are no fields from the Secondary entity object to be sent, then no listener will be registered. If there are fields to be sent to Oracle Social Network, then an internal reference is set up in the instance of the Secondary entity object marking that column it is to track for Oracle Social Network.

At runtime, each entity object will track which fields are to be sent to Oracle Social Network (if any). When a post action occurs, the Secondary Entity Object will notify the Primary Entity Object that it has been modified. The Primary Entity Object retrieves the associated view object to collate all fields that have been traced for sending to Oracle Social Network from all participating entity objects. The view object then will perform the send to Oracle Social Network. The Primary Entity Object will ensure that if multiple Secondary Entity Objects are modified, then only one send to Oracle Social Network will occur.

What happens if "add" in the Primary EOCollImpl is not performed and attributes from the Secondary entity object have been marked as Oracle Social Network enabled in the view object?

There are three types of events that will occur:

  • Primary entity object fields only updated - When the post event occurs on the Primary entity object and those fields in the Primary entity object will be sent to Oracle Social Network.

  • Primary entity object and Secondary entity object fields updated - When the post event occurs, it will fire on the Primary entity object. Because the send is done from the view object, all fields that can be sent to Oracle Social Network from both the Primary and Secondary entity objects will be sent to Oracle Social Network.

  • Secondary entity object fields only updates - Only a post transaction event will occur on the Secondary entity object and therefore no data will be sent to Oracle Social Network.

When not to use multiple updateable entity objects Oracle Social Network Integration for a view object

Consider this scenario:

  • There are two view objects: the first view object (FirstVO) has two entity objects contained within it (OneEO + TwoEO) and the second view object (SecondVO) has only one entity object in it (TwoEO).

  • The secondary entity object of the first view object (TwoEO) is the primary, and only, entity object of the second view object.

In this scenario, it does not make sense to use Oracle Social Network integration as there will be a synchronization issue. Since there are two view objects that contain data from TwoEO, there will be two Social Objects in Oracle Social Network that contain this data. When TwoEO data is updated from the SecondVO, only the Social Object that relates to the SecondVO will be updated. There is no way to determine that the FirstVO has been affected and its data should be re-synchronized to Oracle Social Network. The following is the recommended outcome to ensure that the data remains synchronized on Oracle Social Network:

  • Do not perform the Secondary entity object registration steps as outlined in the Additional Advanced Configuration - View Objects That Have Multiple Updatable Entities section.

  • Leave the second view object to send all updateable information relating to the secondary entity object (TwoEO).

  • In the first view object, only include attributes from the secondary entity object that will not change after the Social Object has been created. For example: Social Object title or primary key value.

  • In the first view object you should include attribute values that will help an end user find the associated Social Object for the second view object. For example: Social Object title or primary key value.

65.2.1.9 Configuring Transient Entity Objects and View Objects

Under certain circumstances, there is a requirement to send data to Oracle Social Network without having an entity object that is based upon a database table. For example, a team could be using an Oracle Enterprise Scheduler [use scheduler variable] job to update data that does use an entity object but still want that data sent to Oracle Social Network. The way to do this would be to use a Transient entity object and Transient view object.

Sending to Oracle Social Network from a Transient view object or entity object is possible with Oracle Social Network integration, however the solution does have some restrictions. Performing a send to Oracle Social Network that creates a record is relatively straight forward. The entity object and view object were created using the wizard in JDeveloper and all attributes manually entered. The view object was then added to an application module that will control the transaction in which this will occur. A transaction is required for this functionality because the send to Oracle Social Network happens upon the commit of the transaction. The configuration of the Oracle Social Network properties and setup UI is identical to a regular view object, except there must be a minor fix to the VOImpl to change its default of looking at database tables, to directly looking at the entity cache so that the Oracle Social Network integration can find the row upon commit. This is done using the following code:

@Override
protected void create()
{
  super.create();
  setQueryMode(QUERY_MODE_SCAN_ENTITY_ROWS | QUERY_MODE_SCAN_UNPOSTED_ENTITY_ROWS | QUERY_MODE_SCAN_VIEW_ROWS);
}

What happens when a transient entity object/view object is used for Oracle Social Network Integration

When a row is created or inserted in the transient view object, populated with attribute data, and the commit happens, the row's data is sent to Oracle Social Network as a create request. This works well for transient entity objects and view objects.

It is during an Update that the situation becomes less clear. Due to the nature of transient view objects and entity objects, such as when they have no persistent state, it is impossible to change their entity state away from STATUS_NEW/INITIALIZED until a commit occurs on that instance of the transient entity object or view object. The Oracle Social Network integration uses the entity state to determine whether to perform a create/update/delete request to Oracle Social Network. However, the Oracle Social Network client library handles the update issue. When a second create request to Oracle Social Network that contains all of the Social Object fields (view object attributes) that were sent to Oracle Social Network originally, it will detect that the Social Object was already created and only will perform an update of the fields whose values have changed between the two Oracle Social Network sends. The only issue with this is in the detail: all fields need to be sent though the second time, even if the field value has not changed. If a field value is not supplied, it will be treated as if null was sent and the field value removed from Oracle Social Network, but if the field value is supplied and its value has not changed, then the field will be treated as not-updated.

Therefore, the update solution becomes a non-issue as the transient view object can be populated in the exact same mechanism and committed in the same way as the original insert. When the payload of the second create request gets to Oracle Social Network, it will determine the correct course of action for the insert/update of the Social Object data.

65.2.1.10 Working with Special Cases

This section discusses situations that are not covered elsewhere.

  • Date Effective Entity Objects

    A date effective entity object is one in which an update on an existing entity object row puts an end date on it and creates or inserts a new row with the updated details. In Oracle Social Network, this should only submit the details of the update and not the insert of the new row. Only the last chronological date effective row data will be sent to Oracle Social Network. This is the date effective row where the Effective End Date is 31-Dec-4712. Data from any other date effective row that does not contain that end date will not be sent to Oracle Social Network.

    It is possible for the last chronological date effective row to be effective from a future date. To communicate this to the viewer, a new attribute "As Of" automatically will be included for a date effective object when it is enabled for Oracle Social Network. The value of this attribute will come from the attribute that contains the start date of the date effective range.

  • Parent-Child View Objects

    You can send view object rows for both the parent and child rows individually, but you cannot send both Social Objects together as a Master - Detail since Oracle Social Network does not support this relationship. There are ways to view the parent from the details rows using the parent id and tie them together through URLs in the Oracle Social Network UI.

  • Descriptive Flexfields

    The Oracle Social Network integration supports descriptive flexfields which have been deployed for an Oracle Social Network-enabled view object. An Oracle Fusion applications developer does not need to configure any properties at design time to enable the descriptive flexfield integration. When the Functional Administrator uses the "Manage Social Network Objects" UI to add attributes to send to Oracle Social Network, the descriptive flexfields attributes will also be shown in the list in a tree structure organized by value set. For more information about adding custom attributes using descriptive flexfields, see the "Define Flexfields" section in the Oracle Fusion Applications Common Implementation Guide.

65.3 Implementing the Oracle Social Network Setup UI

There are several features of the Oracle Fusion Applications-Oracle Social Network integration that can be used when designing Oracle Fusion applications user interfaces and their application.

65.3.1 Configuring the Setup Application

The task flow shown here will be available for users who will configure the Oracle Social Network integration on a client site.

The "Manage Oracle Social Network Objects" task flow definition and its available parameters are:

  • Component: Oracle Social Network

  • Task flow: Manage Oracle Social Network Objects

  • Function Security Privilege: FND_MANAGE_SOCIAL_NETWORK_TRACKING_PRIV

    Display Name: Manage Oracle Social Network Tracking

  • Task Flow / Invocation Artifact:

    /WEB-INF/oracle/apps/fnd/applcore/socialnetwork/ui/flow/SocialNetworkTF.xml#SocialNetwork
    
  • Parameters

    • [moduleType] Note: If moduleType is passed, moduleKey also must be passed. Together they form a unique key for a module.

    • [moduleKey] Note: If moduleKey is passed, moduleType also must be passed. Together they form a unique key for a module.

    • [pageTitle]

  • Description: Manage the Social Network Tracking setup.

The parameters values that can be provided are shown in Table 65-4.

Table 65-4 Parameter Values for Configuring Setup Application

Parameter Description Default Value

moduleType

The type of module to filter the list of application modules shown. This parameter is used with the moduleKey to perform the filtering. The application modules contain the view objects that are available to be sent to Oracle Social Network.

Examples: APPLICATION, FAMILY

When no value is supplied, all modules will be shown.

moduleKey

The module key to filter the view objects in the task flow. The mapping between the module key and the application modules comes from the fnd-osn-integration.xml setup in the "Add OSN View Instances" wizard.

When no value is supplied, all modules will be shown.

pageTitle

The title to show at the top of the "Manage Oracle Social Network Objects" page.

"Manage Oracle Social Network Objects"


In Functional Setup Manager, Applications Core will add the "Manage Oracle Social Network Objects" task to provide access to the setup task flow with no moduleType or moduleKey specified. This task will give access to the task flow for managing any Oracle Social Network object in Oracle Fusion Applications.

You can create your own product module-specific Oracle Social Network setup tasks in your own task lists that provide access to the setup task flow but filtered by the relevant modules. For example, Financials can create a Manage Financials Oracle Social Network Objects passing in the correct moduleType and moduleKey.

If a valid moduleType and moduleKey pair is specified, the UI provides access to all objects whose modules roll up to the specified module. That is, if a family is specified, the UI displays all objects whose modules roll up to the family.

Note:

Oracle Social Network Object settings are moved using the customization sets on the Customization Migration page instead of using the export and import function in the Setup and Maintenance work area of Functional Setup Manager. Customization Migration is not module-specific.

65.3.2 Accessing the Credential Store

As part of the Provisioning role, credentials must be created that allow the Oracle Social Network client libraries (the interface between Applications Core and Oracle Social Network) to create an authenticated connection to the Oracle Social Network server. To access the credential store, the Oracle Social Network library will need to be granted permission by the security of the containing application. The following code snippet must be added to the jazn-data.xml file so the Oracle Social Network client library can access the credential store.

<grant>
  <grantee>
    <codesource>
        <url>file:${domain.home}/servers/${weblogic.Name}/tmp/_WL_user/oracle.webcenter.framework/-</url>
    </codesource>
  </grantee>
  <permissions>
    <permission>
        <class>oracle.security.jps.service.credstore.CredentialAccessPermission</class>
        <name>context=SYSTEM,mapName=oracle.social,keyName=oracle.social.credential</name>
        <actions>read</actions>
    </permission>
  </permissions>
</grant>

Before adding this block to the jazn-data.xml file, verify if there is already a grant block for the URL ${domain.home}/servers/${weblogic.Name}/tmp/_WL_user/oracle.webcenter.framework/- . If this already exists, then just add the <permission> node to the existing grant.

65.3.3 Testing the Configuration

When there are multiple developers working on Oracle Social Network integration with the same view object, there is a high risk of the developers overwriting other developers' Social Object registrations and data on the Oracle Social Network server. To avoid this scenario, use the oracle.applcore.socialnetwork.registrationprefix system property. This property can be set on the Java Options command line to a different value for each developer and will be prefixed to the Oracle Social Network registration definition name. This will allow the same view object to be registered multiple times on the Oracle Social Network server, thus allowing each developer to have his or her own Social Object registration.

65.4 Adding Oracle Social Network to Your Application UI

Oracle Social Network provides an ADF declarative component to launch the Oracle Social Network UI within an Oracle Fusion application. This declarative component is rendered as a Social link and is available in two areas – Global Area and application panel.

Note that once the Social link is implemented, the application's end users can see the Social link only if they are internal to the organization. That is, if MegaCorp is the organization running the Oracle Fusion application's instance, MegaCorp's internal employees can access the Social link, but the company's external suppliers and partners cannot.

The Social link in the Global Area and applications panels is available only to internal end users of the organization. External users, such as partners and suppliers, do not have access to the Social link. Access to the Social link in the two aforementioned locations is controlled by the Launch Oracle Social Network privilege which is granted to internal users by the Worker duty role.

When the Social link is clicked, it launches the Oracle Social Network UI that is displayed in a layover panel on the right side of the Oracle Fusion application page.

The ADF declarative component is available in 4 versions for use in various areas of the Oracle Fusion applications pages:

The component itself has been integrated out of the box as a link in 2 places using Applications Core and is available for use by developers.

The Social link has been added as a text-only link to the Global Area/Menu as shown in Figure 65-2. Therefore, the link will be available on all Oracle Fusion application pages.

Figure 65-2 Social Link in the Global Area

Social link in the Global Area

Note:

Language and time zone preference settings in Oracle Fusion Applications and Oracle Social Network are not integrated. Preferences set in Oracle Fusion Applications do not propagate to the Oracle Social Network server.

When the Social link is clicked, the Oracle Social Network UI is launched on the right side as shown in Figure 65-3. This view displays all the Conversations, Social Objects, Users and Groups to which a user has access (displayed within the All tab in the Oracle Social Network UI).

Figure 65-3 Example of the Oracle Social Network Popup

Oracle Social Network Popup

The Social link also is added to the left of the toolbar (buttons) in the application panel. The link will appear automatically in Oracle Fusion application pages if the application panel has been used for object detail pages.

Clicking the Social link in the application panel also launches the Oracle Social Network UI on the right side as a layover panel. In this view, Oracle Social Network UI is displayed in the context of the current Oracle Fusion application page or object.

The Social link in the Application Panel typically appears as shown in Figure 65-4.

Figure 65-4 Example Showing the Social Link in an Applications Panel

Example Showing the Social Link in an ApplicationsPanel

The link currently is supported only within the application panel. The Social link should not be directly consumed outside an application panel. Also, you should not use the Oracle Social Network ADF declarative component (link/button) directly.

When the Social link is clicked from within the application panel, the Oracle Social Network UI should appear as shown in Figure 65-5. Within the Oracle Social Network UI there are 2 tabs:

Figure 65-5 Example Showing Popup from Applications Panel

Example Showing Popup from ApplicationsPanel

65.4.1 How to Render the Behavior of the Social Link in an Application Panel

There are some checks made internally within the application panel and in the Oracle Social Network ADF declarative component that control the display of the Social link in the Oracle Fusion application pages.

The Social link in the application panel will render only when some context is passed to the application panel. The rules that control the rendering are:

  • If the Oracle Social Network URL is not configured, the link will not show (it also will not show in the Global Menu).

  • If there is no context passed to the application panel, the link will not render. The end-user will need to use the link from the Global Menu to see all Oracle Social Network Conversations and Social Objects.

  • If the view object is not enabled (out of the box using Design Time) for Oracle Social Network, then the link will not render. See Section 65.2.1.1, "Configuring the Business Object for Oracle Social Network Integration."

  • If the view object is enabled (out of the box using Design Time) for Oracle Social Network, but the Oracle Social Network task flow has not been enabled using Oracle Fusion Functional Setup Manager, then the link will not render.

Note:

Developers can control the rendering of the Social link by setting an Expression Language expression on the osnRendered attribute (see Table 65-5). For example, when the same UI is used for both create and edit cases, the developer may want to hide the Social link in the Create case because the business object may not be ready at that point.

65.4.2 How to Pass Context and Parameters to an Application Panel

This step must be performed for the objects (context) that are enabled for Oracle Social Network.

The application panel exposes a subset of parameters that can be used to control the behavior of the Oracle Social Network Social link. Some additional parameters exposed by the Oracle Social Network Social ADF component are used internally by the application panel and are not exposed. Table 65-5 lists the parameters available to control the behavior of the Social link and pass the context to it:

Table 65-5 Parameters that Control the Behavior of the Social Link

Attribute Name Type Description Valid Values

osnDisabled

Boolean

Explicitly controls whether the Social link (if rendered) is disabled or not. This is optional.

true or false. The default is false.

osnRendered

Boolean

Explicitly controls (apart from internal checks made) whether or not to render the Social link. This is optional.

true or false. The default is true.

osnRow

oracle.jbo.Row

An Expression Language expression that returns a view object Row that must contain the Social Object ID (that is, the primary external ID).

 

osnType

String

The fully-qualified view object type/ID as registered with Oracle Social Network through Functional Setup Manager "Manage OSN task flow."

Do not use.

osnTypeGroup

String

The application module ID that was used to group together a set of view objects for Oracle Social Network.

Do not use.

osnDisableShare

Boolean

Controls whether the Oracle Social Network UI should show the Share button when the current row is not yet shared or sent to Oracle Social Network. This parameter is only useful when osnRow is passed.

true or false. The default is false.

osnDisableJoin

Boolean

Controls whether the Oracle Social Network UI should allow the current user to Join (become a member of) the Social Object (if shared). This parameter is only useful when osnRow is passed.

true or false. The default is false.


Examples of Parameters

  • For a specific object/row (only osnRow is specified)

    <fnd:applicationsPanel Id="ap1"                 
         osnRow="#{bindings.Dept1.currentRow}"
         .../>
    
  • For a specific object/row ID but disabling Share

    <fnd:applicationsPanel Id="ap1"                 
         osnRow="#{bindings.Dept1.currentRow}"
         osnDisableShare="true"/>
    

65.4.3 How Share and Join Behave

The Share and Join buttons are displayed within the Oracle Social Network UI that is launched from the Social link in the application panel. These actions are applicable only in the contextual view displayed for an Oracle Fusion application object.

The core state transitions for the Share and Join buttons are:

  • The Share button is displayed when the view object is enabled with Manual mode and the object has not yet been shared in Oracle Social Network. In Automatic mode, you should not see the Share button unless the business object was created before it was Enabled for OSN. This is because the Oracle Social Network Social Object will be created automatically when the Oracle Fusion application business object is created. In this case, the Share button will be displayed and the user can choose to create the Oracle Social Network Social Object manually.

  • Once a user clicks the Share button, the button will not be displayed again, unless there is an error in sharing with Oracle Social Network. The Oracle Social Network UI then displays the Social Object.

  • The Join button is displayed for both Manual and Automatic modes for the current user who is not yet a member of the Social Object in Oracle Social Network. The Join button will be displayed only after the object is shared, either automatically or manually by another user, in Oracle Social Network.

  • Once a user clicks the Join button, the user is made a member of the Social Object in Oracle Social Network. The Oracle Social Network UI then displays the Social Object and any related conversations.

  • The Join and Share buttons can be hidden by setting the osnDisableShare and osnDisableJoin parameters to the application panel. See Table 65-5.

65.5 What Happens When Functional Administrators Manage Oracle Social Network Objects

The Functional Administrator will use the Functional Setup Manager supplied by the product team to take the set of view objects available for Oracle Social Network integration and choose which are to be enabled for sending data to the site's Oracle Social Network instance.

Prerequisites

65.5.1 Enabling a View Object for Oracle Social Network Integration

When the functional administrator loads the Functional Setup Manager, a list of tasks is displayed. One will be "Manage Social Network Objects." After this task is selected, the setup UI for enabling the view objects for Oracle Social Network integration will be shown. When the "Manage Social Network Objects" page has finished loading, the list of view objects that the developer made available for Oracle Social Network can be seen.

65.5.2 Changing the Oracle Social Network Enabled Status

To enable or disable the view object for Oracle Social Network integration at the site when the "Manage Social Network Objects" page is loaded, the configurer can use the following steps:

  • Select the view object in the Business Objects tree that is to be Oracle Social Network enabled.

  • Click Enable OSN Tracking.

  • When the popup window is displayed, choose either:

    • Manual - The end user consuming the Oracle Fusion application will need to click the Share button to send the view object row to Oracle Social Network.

    • Automatic - When the end user commits the view object row with which they are working, the send to Oracle Social Network will occur automatically.

    • None - Disable Oracle Social Network integration.

  • Click OK.

The view object shown in the tree now will have the updated Enabled status to match the selection. There is a shortcut to disabling Oracle Social Network integration for a view object by selecting it in the Business Objects tree and clicking Disable OSN Tracking.

65.5.2.1 How to Add and Remove Attributes to Send to Oracle Social Network

Changing the OSN Enabled state of the view object is only the first half of the configuration that is required to send a Social Object to Oracle Social Network. The attribute values that will become the Social Object fields also need to be selected. Use these steps to select the attributes that will be Oracle Social Network enabled:

  • Select the view object in the Business Objects tree that is to have attributes Oracle Social Network enabled. This should show the list of Oracle Social Network enabled attributes in the table at the bottom of the page.

  • Click New. This will display a dialog showing all of the attributes that the developer marked as Oracle Social Network integration available.

  • Check or uncheck the checkboxes next to each attribute to add and remove attributes. Attributes that are selected are Oracle Social Network enabled.

  • Click OK.

The attributes that were checked in the dialog will now be shown in the table at the bottom of the page. This is the list of attributes for the view object that have been marked as Oracle Social Network enabled. There is a shortcut for marking the attributes as not Oracle Social Network enabled. Select the attribute and click Delete to remove them from the list.

65.5.3 Committing the Oracle Social Network Enabled View Objects

Until this point, there has been no change to the stored configuration of the Oracle Social Network Enabled view objects. This means that if the functional administrator leaves this page or cancels, then the way in which the Oracle Fusion application integrates with Oracle Social Network at runtime will not have changed. By clicking Save at the top of the page, the information about all displayed view objects' Oracle Social Network enabled status and their attributes are committed locally for use at runtime and the definition of the Social Object based upon the selections made by the developer for the view object will be built and sent to Oracle Social Network.

What happens when Save is clicked

Two key functions happen when Save is clicked:

  • Oracle Social Network Enabled Configuration Is Saved Locally

    When the developer saved the Oracle Social Network configuration for the view object, all of that information was stored as properties in the view object XML definition file. A very similar process happens for enabling the view object for XML. When Save is clicked, the custom properties for these view objects are changed:

    • fnd:OSN_VO_ENABLED_BY_CUSTOMER - Stores whether the user selected automatic/manual/none for the Enabled status

    • fnd:OSN_ENABLED_ATTR_BY_CUSTOMER - This attribute property will be set to "true" on all attributes that the user selected to be Oracle Social Network enabled.

    In addition to the view object property being modified, the primary entity object for the view object will have these custom properties set upon it:

    • fnd:OSN_EO_ENABLED_BY_CUSTOMER - a mirror of the view objects fnd:OSN_ENABLED_ATTR_BY_CUSTOMER property.

    • fnd:OSN_VIEW_OBJECT_NAME - the fully-qualified name of the view object that will need to be used to send data to Oracle Social Network when a Data Manipulation Language (DML) event occurs on this entity object.

    Since the view object and entity object definition XML cannot be changed at runtime, these modifications will be stored in Oracle Metadata Services (MDS) at the persdef layer. For each view object that was displayed in the "Manage Social Network Objects" there will be four persdef files and entries stored. An example of these files are for the SndDemoDeptVO:

    persdef/oracle/apps/model/entity/mdssys/cust/site/site/SndDemoDeptEO.xml.xml
    persdef/oracle/apps/model/entity/SndDemoDeptEO.xml
    persdef/oracle/apps/model/view/SndDemoDeptVO.xml
    persdef/oracle/apps/model/view/mdssys/cust/site/site/SndDemoDeptVO.xml.xml
    

    These entries can be imported and exported if the enabled Oracle Social Network integration configuration must be ported between server instances.

  • Social Object Definition Is Sent to Oracle Social Network

    After the view object Oracle Social Network enabled configuration has been stored into MDS view objects, the Oracle Social Network structure must be sent to Oracle Social Network as a Social Object definition. All view objects that have an Enabled status of manual or automatic will have the definition sent to Oracle Social Network. The Social Object definition provides details such as the attributes (name, data type) as Social Object field definitions and the translations for all of the attributes to be used as the field labels when a Social Object is shown to the user in Oracle Social Network.

    To see the registered definition on Oracle Social Network and confirm that it was correctly sent, the Oracle Social Network social definition REST API can be directly retrieved from the Social Object definition. To return the Social Object definition, call a URL in the following structure from within a web browser: <Oracle Social Network URL>/social/api/v1/socialDefinition/<definition name>

    The definition name is either the value of the fnd:OSN_DEFINITION_NAME property set on the view object by the developer or the family module name concatenated with the view object name (if the definition name was not set).

    Using the SndDemoDeptVO example again, if it is in the FND family with an Oracle Social Network server of http://server_name.company.com:9003/osn, it would resolve to the Social Object definition URL of: http://server_name.company.com:9003/osn/social/api/v1/socialDefinition/FND.oracle.apps.model.view.SndDemoDeptVO.

65.5.4 Updating Translations

"Manage Social Network Objects" also provides update translations. When the Social Object definition has been sent to Oracle Social Network by clicking Save, the initial set of translations is sent to the Oracle Social Network server for the view objects. However, users on a site can choose to enable more languages within Oracle Fusion Applications by loading language bundles. The Update Translation button provides a quick way to send all the Oracle Social Network enabled view object translations for all enabled languages to Oracle Social Network. For example, a site has been running in English and has registered the view objects as Social Object definitions on Oracle Social Network. The site then loads the French language. The site then can use Update Translations to send both the English and French translations for the Oracle Social Network enabled view object to Oracle Social Network, thereby allowing the user to see all of the field labels in French.

What happens when clicking Update Translations

Each view object that is displayed that has an Enabled state of automatic or manual will have its translated strings for the view object and its attributes loaded and sent as a social definition update to Oracle Social Network. The only values that can change in this upload are the translated strings. To confirm if the new translations are correctly seeded in Oracle Social Network, the social definition URL for the view object can be used to see the translated strings for the Social Object definition.

65.6 What Happens When End Users Interact with Oracle Social Network Object Instances

The only decision an end user needs to make is to share instances when Manual integration mode is enabled.

Automatic Integration

When Oracle Social Network is enabled as Automatic for a view object, end users will not see any visual signs that a send to Oracle Social Network has occurred with the data they just committed. The first that they will know about this is when they check in Oracle Social Network and the record has been created in Oracle Social Network. Any future updates or deletes (Oracle Social Network Conversation Close) also should be reflected in Oracle Social Network upon any further commits of the row.

Manual Integration

When Oracle Social Network is enabled as Manual for a view object, the end users should be able to see the Oracle Social Network Share button on the page. If the users create or update the record, they should not see any information about that view object row in Oracle Social Network. After they have committed the row, they can click Share, which will do the initial send of the row data to Oracle Social Network. By clicking Share, after the initial record has been sent to Oracle Social Network, a new window should appear with the conversation displayed within it (if the socialShare component was set to launch=true when it was configured in the page). Any future updates or deletes (Oracle Social Network Conversation Close) should also be reflected in Oracle Social Network upon any further commits of the row.

65.7 Testing End-To-End Flow

The end-to-end test flow provides a basis for testing the Oracle Social Network integration implementation points to prove the success of the integration.

Testing requires that the roles for Oracle Fusion Developer and Provisioner have been completed successfully.

Follow these steps to test the flow:

Note:

The same MDS partition must be used for both Functional Setup Manager and for Oracle Fusion Applications. If this is not done, the Oracle Social Network integration will not be carried between the two applications.