Skip navigation

Do you need to provide access to the data in the business objects you created in Oracle Application Builder Cloud Service to outside systems?

Need to update data in a row from another interface? Need to upload data programmatically into an ABCS object?

All of these scenarios can be addressed using the REST interfaces exposed on the business objects you create in your application.

With these interfaces your business objects become reusable business services in ABCS that can be used by other applications even if they weren't built with ABCS.

 

If you'll look in your business object data designer window you'll see two new fields that provide the URLs for the REST interfaces for your objects.

One gives the URL to the object meta-data - hitting it in your browser will show you information about the object and the fields it exposes.

The second URL is the one used to actually access and manipulate the data.

Screen Shot 2017-05-26 at 12.15.53 PM.png

 

You can open a new tab in your browser and paste these URL into the browser to see the results returned from them.

Note that these URL are not accessible to outside users by default - for security reasons.

To allow access to these objects go to the application settings->Security and check the box marked: Enable basic authentication for business object REST APIs

 

Screen Shot 2017-05-26 at 12.17.18 PM.png

 

To access the data and manipulate it the apps accessing it will need to provide a user/pass combination. Then any security roles you defined on the objects will further restrict or allow them specific operation on the data.

 

One more thing to take into account is that ABCS also has CORS security in place - so you would want to add the URL of the server on which the apps that you run reside to your allowed services in the ABCS Administration.

 

Screen Shot 2017-05-26 at 12.12.15 PM.png

Now other systems can access and manipulate data in your application.

In the may 2017 release of Oracle Application Builder Cloud Service there are a set of new templates for creating Business Object Providers (BOPs).

BOPs allow you to extend ABCS to access data from other applications using REST interfaces.

While creating a full functioning BOP that supports the full set of CRUD operations and support sorting and pagination can requires some coding, creating a read-only BOP is quite trivial with the new template.

 

Here is a quick video showing you how to achieve this task

Since ABCS is built on standard technologies like jQuery and Knockout, you can easily dip into code to enable dynamic hiding and displaying of components based on changes in the page data model. You just have to know how to get a reference to the model. This post shows you how to do just that.

 

Let say you are building an app to submit sessions to JavaOne or OOW. The page may look like this:

i1.png

Fields are stored in Session BO and first field is Lookup named ref2Session with two values - OOW and J1 - and based on which value is selected the goal is to show/hide different sections of the page which end-user needs to fill-in.

To implement this add Custom Code into the page (location on page does not matter) and in its Property Inspector expand Generated Page Model section and locate definition of Observables - the variable name will be needed later to refer to value of the radio-box. In this instance the variable name is Observables.Session_EntityDetailArchetype:

 

var PageViewModel = function() {

 

       

    // ....

       

    self.Archetypes = {

        Session_EntityDetailArchetype: archetypeFactory.create(self.Entities['Session_'], {

            type: 'ENTITY_DETAIL',

            id: 'Session_EntityDetailArchetype'

        })

    };

   

    self.Observables = {

        Session_EntityDetailArchetype: self.Archetypes.Session_EntityDetailArchetype.getObservables()

    };

   

    // ....

   

};

 

Next, expand Model section and add into the constructor CustomComponentViewModel function code like this (lines 9 to 30):

 

1

 

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

 

    //....

 

 

    var CustomComponentViewModel = function (params, componentInfo) {

        AbcsLib.checkThis(this);

        this.params = params;

 

        //....

    

        this._listener = this.pageViewModel.Observables.Session_EntityDetailArchetype.

                item.ref2Session.currentIDSingle.subscribe(function(value) {

            if (value === "1") {

                // Business div

                $( "#panel-2057663409" ).hide();

                // Technology div

                $( "#panel--2035082722" ).show();

            } else {

                // Business div

                $( "#panel-2057663409" ).show();

                // Technology div

                $( "#panel--2035082722" ).hide();

            }

        });

     

    };

 

    CustomComponentViewModel.prototype.dispose = function() {

        this._listener.dispose();

    };

 

    //....

 

where:

  • this.pageViewModel is prefix to access Observables variable we identified earlier
  • Observables.Session_EntityDetailArchetype is the variable which refers to archetype's observables
  • item.ref2Session is the way to reference observable with value of ref2Session property of Session entity. Holds currently selected value in the radiobox. Note! the item.ref2Session.currentIDSignle code calls an internal, non-public API. I put it here to get people unblocked but note that this API may change. In 17.2.5, which will be in production in June, we have introduced a public API for accessing reference properties. I will update the blog when 17.2.5 goes live.
  • subscribe is listener function on value changes
  • panel-2057663409 is ID of div you want to hide or show (you need to Inspect the page in Chrome to identify ID value)

Make sure you properly dispose of the listener in line 28 or your application will quickly start running out of memory!

Let say that you have a Session BO that has two Boolean properties: trackBusiness and trackTechnology. These two checkboxes which control visibility of Business and Technology sections. In this case, the custom code would look like:

 

1

 

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

 

//....

 

 

var CustomComponentViewModel = function (params, componentInfo) {

    AbcsLib.checkThis(this);

    this.params = params;

 

    //....

 

    this._listener2 = this.Observables.Session_EntityDetailArchetype.

            item.trackBusiness.subscribe(function(value) {

        if (value) {

            // Business div

            $( "#panel-2057663409" ).show();

        } else {

            // Business div

            $( "#panel-2057663409" ).hide();

        }

    });

 

    this._listener3 = this.Observables.Session_EntityDetailArchetype.

            item.trackTechnology.subscribe(function(value) {

        if (value) {

            // Technology div

            $( "#panel--2035082722" ).show();

        } else {

            // Technology div

            $( "#panel--2035082722" ).hide();

        }

    });

 

 

};

 

CustomComponentViewModel.prototype.dispose = function() {

    this._listener2.dispose();

    this._listener3.dispose();

};

 

 

//....

We are happy to announce the May 2017 edition of Oracle Application Builder Cloud Service!

This new version has many new features that you can start using today to build even more advanced applications.

 

Here are some of the key new capabilities

 

Oracle Process Cloud Service Integration

Create processes and associate them with business objects that can trigger the process execution. Built-in UI components for representing task lists and process activities make it easy to incorporate interaction with the processes into your application's pages.

 

Screen Shot 2017-05-08 at 10.14.09 AM.png

 

Oracle JET Composite Components Architecture Support

Pick up UI components that conform to the Oracle JET Composite Components Architecture and add them to your UI designer's component palette. ABCS knows how to read the component meta-data to allow you to integrate it into both the design-time and run-time experience.

 

REST Access to ABCS Business Objects Data

Business object created in Oracle ABCS can be exposed through a REST interface allowing external systems to read, create, update and delete data.  Security settings restrict which objects are exposed and the required authentication.

 

Screen Shot 2017-05-08 at 10.08.42 AM.png

 

Mobile Apps Access to Oracle SaaS Services

Create on-device mobile apps that present and update Oracle SaaS data.

 

New Business Object Provider Templates

New templates give you additional samples when creating reusable business services that connect to external systems through REST services.

Screen Shot 2017-05-08 at 10.10.17 AM.png

Many Other Features

Other new features include redesigned UI table definition flow, customizable error messages, support for the modernized Oracle SaaS look and feel, and more.

 

Screen Shot 2017-05-08 at 10.04.11 AM.png

 

For more on new features see the new features doc.

Check out the Oracle Documentation Page for more info, and let us know if you have any questions!