Deploying Language Resource Files

After resource files have been created (that is, translations completed, key attribute values set, etc.), those files must be deployed to the node before they can be used in the application.

The way in which you deploy the resource files depends the type and current deployment status of the application. For more information see Deploying Language Resource Files.

The following describes the procedure for deploying resource files when an extension point had been previously defined:

Procedure

  1. In TIBCO Business Studio, create a new SOA project: File > New > TIBCO SOA Resources
  2. On the Select a wizard dialog, select TIBCO SOA Project under the TIBCO SOA Platform folder, then click Next.
  3. On the Project dialog, enter a project name (this example uses the name “Lang-Spanish”), then click Next.
  4. Accept the defaults on the Asset Type Selection dialog—click Next.
  5. On the Composite Project dialog, ensure “Empty SOA Project” is selected, then click Finish.
    Note: Throughout these steps, you should save your project periodically.
  6. Copy the resource files to the root folder of the SOA project, as follows:
    1. Copy the translated locale and eventLocale files from your file system (this example will use locale.es.xml and eventLocale.es.xml) to the clipboard.
      Note: These steps illustrate adding resource files for a single language (Spanish). To add more than one language, modify the steps according to include all of the resource files needed.
    2. In the Project Explorer in Business Studio, right click on the root of the project, then select Paste from the context menu. The files are added as shown below:
  7. Add a web.xml deployment descriptor to the Composites folder in the project, as follows:
    1. Right click the Composites folder, then select New > File.
    2. Name the file web.xml, then Finish.

      The file is created as shown below:

  8. Right click the web.xml file in the Project Explorer, then select Open With > Text Editor.
  9. Paste the following text into the opened web.xml file:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?><web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"></web-app>
  10. Save and close the web.xml file.
  11. Add a WebApp component to the composite by selecting WebApp from the Component Types palette, then clicking in the composite.

    The composite should appear as follows:

  12. Display the Properties view for the component, select the General tab, then enter a name for the component in the Name field—this example will name the component “Spanish”:

    Also notice the version number for the component on the General tab. Later versions of the component take precedence. Therefore, if you deploy resource files to the same extension point with different component versions (for example, 1.0.0 and 1.2.0), the one with the higher version takes precedence.

  13. On the Implementation tab, select the Deployment Descriptor (web.xml) option, then click the -none- link to the right of “WebXml File”:
  14. On the Select web.xml dialog, navigate to and select the web.xml file under the Composites folder in your SOA project, then click OK.
  15. On the Properties tab of the Properties view, enter a value for the contextRoot and defaultConnector.

    The contextRoot can be any name.

    The defaultConnector must be the same HTTP connector used by the BPM runtime (which can be seen in TIBCO Administrator—the default is “httpConnector”):

  16. Ensure that “TIBCO SOA Platform Extension Capability” is enabled:
  17. On the General tab, click the override link:

    The projectName.override.requirements view is displayed.

  18. Click the Resources tab, which is displayed on the bottom of the projectName.override.requirements view.
  19. Use the Browse button to add the resource files:
  20. In the Project Explorer, right click the composite, then select Open With > Text Editor from the context menu:
  21. Insert an extension point reference into the composite file, inside of the <sca:Componentelement>. This specifies that resource files are being added to an application that was deployed with an extension point. The extension point reference names the extension point that is being referenced, as well as the location of the resource files in the SOA project, and the location to which they need to be mapped in the deployed application:

    Use the following text for the extension point reference:

    <scaext:extension xmi:id="_FYNUQEntEeC1W-tBHP1Z0A" name="LanguagePackInstallWebApp" requiredVersion="1.0.0" extensionPoint="com.tibco.n2.workspace.language-pack.extension-point"> <webapp:web-app-update xmi:id="_FYNUQUntEeC1W-tBHP1Z0A"> <static-resource xmi:id="_FYNUQ0ntEeC1W-tBHP1Z0A" location="/projName/eventLocale.ll.xml" path="/JSXAPPS/base/locale/eventLocale.ll.xml"/> <static-resource xmi:id="_FYNUREntEeC1W-tBHP1Z0A" location="/projName/locale.ll.xml" path="/JSXAPPS/base/locale/locale.ll.xml"/> </webapp:web-app-update></scaext:extension> 

    Change the values in the following attribute, as described:

    • extensionPoint - This is the name of the extension point. If you are updating resource files in the Workspace application, this value must be the following (as this is the extension point name that is hard-coded into the Workspace application):
      com.tibco.n2.workspace.language-pack.extension-point

      If you are updating resource files in a custom WCC application, this must be the name of the extension point that was defined when the application was deployed. For more information, see Deploying an Application After Customizing.

    • location - This specifies the location of the resource files in the SOA project. Specify the name of your SOA project in the projName part of the value, and the appropriate country code in the ll part of the value.
    • path - This specifies the relative path that the resource files are to be mapped in the deployed application. Specify appropriate country code in the ll part of the value.
  22. Save the project.
  23. Create a DAA by doing the following:
    1. In the Project Explorer, right click the composite, then select Create DAA from the context menu:

    2. On the Select Archive Location dialog, select Deployment Artifacts in your SOA project, then click Next.
    3. On the Select Distribution dialog, ensure the Do not use a distribution file option is selected, then click Next.
    4. On the DAA Specification dialog, ensure the Save DAA Spec option is selected, then click Finish.

      The DAA should now appear in the Deployment Artifacts folder:

  24. Using TIBCO Administrator, deploy the DAA file to the appropriate node.

    For information about deploying applications using TIBCO Administrator, see the TIBCO Administration guide. (For a tutorial of deploying applications using TIBCO Administrator, see the How to Implement and Deploy the WelcomeUsers Application.)

    Note that you may need to clear your browser cache to see the change in the application.

    The deployed language should now be available in the application: