Oracle by Example brandingCreating a Business Object Provider for Oracle Visual Builder Cloud Service

section 0Before You Begin

This 15-minute tutorial shows you how to develop a Business Object Provider (BOP) for Oracle Visual Builder Cloud Service and use it in an application.

Background

A BOP is a kind of extension, which in Oracle Visual Builder Cloud Service is defined as a collection of files that provide a custom function or resource that can be used to extend an application. A BOP enables you to create a connection to an external REST service that you want to use to provide business objects to your application.

You'll use a template to create a BOP that provides a connection to a JIRA implementation. JIRA software, created by Atlassian, provides issue tracking for project development. To use this particular BOP, you need access to a JIRA system, but the access can be read-only. However, the principles you will learn, and the basic structure of a BOP, apply to any service you want to connect to.

The images in this tutorial show the standalone version of Oracle Visual Builder Cloud Service. If you are using the Oracle Integration Cloud version, you will see an additional menu at the top of each page that lets you switch between Visual Builder and Integration Cloud.

Top menu
Description of the illustration vbcs_oic_menu.png

What Do You Need?

  • Access to Oracle Visual Builder Cloud Service
  • A supported browser (see Known Issues for Oracle Visual Builder Cloud Service for more information)

section 1Create a Web Application

In this section, you'll create a simple application using an application template and then create a BOP using an extension template.

  1. In your web browser, log in to Oracle Visual Builder Cloud Service.
  2. On the Home page, click + New Application and select Web.
    Oracle Visual Builder Cloud Service Home page
    Description of the illustration vbcsbp_cra_02.png
  3. On the first page of the Create Application wizard, enter the following:
    • Application Name: JIRA BOP Application
    • Description: BOP application

    The Application ID text field is automatically populated based on the Application Name.

    Click Next.

    Application Name page in Create Application wizard
    Description of the illustration vbcsbp_cra_03.png
  4. On the next page, select the Oracle Applications Cloud UI template, and then click Next.
    Application Template page in Create Application wizard
    Description of the illustration vbcsbp_cra_04.png
  5. On the last page, click Finish.

    By default, one tab with Home as its label is available.

    Application Navigation page in Create Application wizard
    Description of the illustration vbcsbp_cra_05.png

    Your application is created and opens in the Page Designer.


section 2Create and Configure a BOP

  1. Click the Main Menu Main menu icon and select Application Settings.
    Application Settings main menu item
    Description of the illustration vbcsbp_crb_01.png
  2. Click the Extensions tile.
    Application Settings page
    Description of the illustration vbcsbp_crb_02.png
  3. On the Extensions page, click the Business Object Provider tab.
    Business Object Provider icon on Extensions page
    Description of the illustration vbcsbp_crb_03.png
  4. Click + New Business Object Provider and select Create new.
    Create New Business Object Provider list selection
    Description of the illustration vbcsbp_crb_04.png
  5. On the first page of the Create New Extension wizard, enter the following:
    • Display Name: MyBOP
    • Extension ID: com.example.bop (at least two groups of letters or numbers separated by a period)
    • AMD Package Name: com.example.bop (automatically populated)
    • Description: JIRA BOP
    Create New Business Object Provider wizard
    Description of the illustration vbcsbp_crb_05.png

    Click Template.

    Note: AMD stands for Asynchronous Module Definition.

  6. On the Available Templates page of the wizard, select Jira BOP example, then click OK.
    Available Templates page of wizard
    Description of the illustration vbcsbp_crb_05.png

    You'll notice some other sample BOP templates that you can use. You also have the option of creating an empty extension.

    The Overview tab of the BOP opens.

    Available Templates page of wizard
    Description of the illustration vbcsbp_crb_06_result.png
  7. From the Overview page, click Sources to open the BOP files in the Resource Browser.
    Sources tab of BOP Overview page
    Description of the illustration vbcsbp_crb_07.png
  8. Expand the nodes in the Resource Browser, if necessary, and view the file names (you may need to widen your web browser window to see them). Your BOP is stored under user/extensions. This particular BOP accesses just one business object, an Issue.
    Sources tab of BOP Overview page
    Description of the illustration vbcsbp_crb_08.png

    For information on customizing the BOP by working with these files, see Using Oracle Visual Builder Cloud Service.

  9. Click the JiraBOPExtensionManager.js file to open it in the Resource Browser. To use this BOP, you'll need to modify the third argument of the CustomParameter.createSimple call to specify the JIRA server you want to access. To access the Apache JIRA server, for example, specify https://issues.apache.org/jira/. After you edit the argument, click Save Changes to save the file.
            getCustomParameters: function() {
                return [
                    CustomParameter.createSimple('baseUri',
                        'The base URI of the JIRA server',
                        'https://myjira.example.com/')
                ];
            }
  10. Click the JiraEntityProvider.js file to open it in the Resource Browser. This file defines the five fields of each JIRA issue that the BOP will retrieve: id, key, summary, project, and assignee.

section 3Test the BOP

  1. Click the Main Menu Main menu icon and select Data Designer.
    Main menu with Home selected
    Description of the illustration vbcsbp_test_01.png
  2. Click Business Objects.
    Data Designer with Business Objects selected
    Description of the illustration vbcsbp_test_02.png
  3. Click + Select from External Service.
    Empty Business Objects page with Select from External Service selected
    Description of the illustration vbcsbp_test_03.png
  4. On the Access page, select Catalog, the default, then lick Next.
    Access page of wizard
    Description of the illustration vbcsbp_test_04.png
  5. On the Catalog page, scroll down (if necessary) and select MyBOP, which is now available as a service. Click Next.
    Catalog page of wizard
    Description of the illustration vbcsbp_test_05.png
  6. On the Parameters page, click Next. The parameter is the base URI of the JIRA server, as defined in JiraBOPExtensionManager.js. The only reason to change this would be if you'd made a typo in the source code, such as omitting the final slash (/), or if you decided to specify a different JIRA server. A different BOP might have parameters that are left for you to specify.
    Parameters page of wizard
    Description of the illustration vbcsbp_test_06.png
  7. On the Business Objects page, select the Issue checkbox and click Next. (This simple BOP has only one business object.)
    Business Objects page of wizard
    Description of the illustration vbcsbp_test_07.png
  8. On the Fields page, click Add All to add all the Available Fields to the Selected Fields column.
    Fields page of wizard
    Description of the illustration vbcsbp_test_08.png
  9. After the fields are moved, click Next.
    Fields page of wizard
    Description of the illustration vbcsbp_test_09.png
  10. On the Authentication page, select None (the default), because you you do not need an Apache JIRA login to perform read operations.
    Authentication page of wizard
    Description of the illustration vbcsbp_test_10a.png

    If you have an Apache JIRA login, you can select Basic from the Authentication Mechanism drop-down list and enter your username and password for the JIRA server. You would need to do this if your BOP performed any write operations.

    Authentication page of wizard
    Description of the illustration vbcsbp_test_10b.png

    You can also select the Use different authentication for a logged in user check box and enter the authentication information. Whichever choice you make, click Next.

    Authentication page of wizard
    Description of the illustration vbcsbp_test_10c.png
  11. On the Test page, click Issue and view the retrieved data. You'll need to use the scroll bar or widen the browser window to see all the fields.
    Test page of wizard
    Description of the illustration vbcsbp_test_11.png

    You may see the error message Test Mapping Action failed. Status Code: 403 Unable to verify URL against whitelist : No matching entities. Please check your credentials and try again. If you do, click Previous and check your authentication credentials.

  12. Click Finish. You're transported to the Data Designer, on the Overview page for the Issue business object.
    Overview page for Issue business object
    Description of the illustration vbcsbp_test_12.png
  13. Click Data to go to the Data page for the Issue business object. Don't try creating a Query, because you can't query data retrieved from an external service.
    Data page for Issue business object
    Description of the illustration vbcsbp_test_13.png

more informationWant to Learn More?