Skip navigation
1 2 Previous Next

Visual Builder Cloud Service

29 posts

With the release of the new Oracle Visual Builder Cloud Service - we are happy to announce our new blog - which you can find at:

https://blogs.oracle.com/vbcs

Join us there.

Over the weekend we rolled out a new cloud service — Oracle Visual Builder Cloud Service. Those who’ll check out the demo videos will see a lot of resemblance to Oracle Application Builder Cloud Service, which makes sense since VBCS is just a rename of ABCS.

 

The reason we renamed the service is that we believe the new name better reflects the unique features of this service in the landscape of application building in general and at Oracle specifically. Oracle has a lot of cloud services that deal with the application development space — but the unique thing to ABCS has always been the visual way you would go about creating your application, business services, and even your business logic.

This is why we chose to have VISUAL as part of the service name.

 

At this stage this is just a pure rename, and beyond the banner of the product you won’t see any changes in functionality. But we are planning to add many more features and capabilities in upcoming release to help make app development simpler and to further extend the types of apps you can build with the service.

We took the rename opportunity to update our getting started demos on our youtube channel to reflect the latest product UI which has changed quite a bit over the past year.

 

We are also moving our team to blog on the new Medium platform — and you should be able to follow us looking for the “VBCS” tag.

One thing that didn’t change is the fact that you can still get a free trial and experience the product on your own. So go ahead give the new Oracle Visual Builder Cloud Service a spin, and let us know if you have any questions on the VBCS community.

In the May 2017 release of Oracle Application Builder Cloud Service we introduced integration with Oracle Process Cloud Service as a key new capability for your applications.

This integration allows you to create processes that map to business objects you created in Oracle ABCS, start the processes from your user interface or from triggers on your business objects, and interact with process steps, to-do lists, and activities from your application's UI.

 

Process Cloud Service (PCS) gives you a visual way to define complex processes that involve interaction across multiple people in your organization, along with capabilities to do conditional and parallel steps. Learn more here.

 

Here is a quick video showing you the basic integration between Oracle ABCS and Oracle PCS:

 

 

Learn more about this integration in our documentation.

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!

One of the key new features added in the February release of Oracle Application Builder Cloud Service is support for business rules.

These are business logic pieces that you can associate with your custom business objects.

ABCS now supports the ability to define:

  • Triggers that will execute on specific events related to your business components (for example when a value in a record is being updated) - you visually define the conditions and actions that will be executed in those events. As you'll see in the video demo below - you can define the whole logic in an easy visual way. For the more advanced developers - we also enable you to write groovy scripts that define more complex logic.
  • Validators - these are checks that can be associated to specific fields or to objects and can verify their validity. Using expressions you can check for example if a combination of values in fields in a record is valid, and notify the user if there is an error. (For example - only managers can have a salary bigger than 100).

 

Check out the video below for examples of how you can use these features:

 

By the way, currently this functionality is in controlled availability and won't show up by default in your trial accounts.

Contact your accounts team if you require this for your production instances.

Application Builder Cloud Service 17.1.3 release allows users to expose an external web service as a business object by creating a custom business object provider (BOP). In this blog we will create a Business object leveraging the REST APIs provided by GitHub using the custom BOP template that comes out of the box.

 

Evaluate the REST resource

 

GitHub exposes a set of REST APIs to fetch information regarding the user’s account.The complete list of all resources that can be fetched and the authentication schemes available can be seen here https://developer.github.com/v3/

For the purposes of this blog I have chosen https://api.github.com/users/shraybansal/repos to fetch the repositories information for the user shraybansal, whose account consists of two public test repositories.  If the user provides the Basic Auth credentials during authentication, then the REST request fetches information regarding private and public repositories associated with the authenticated user. Note that the REST API only fetches information of public repositories the user is associated with if no credentials are provided.

 

Even though GitHub supports Cross Origin Resource Sharing (CORS) and allows AJAX requests from all origins, an important detail to note is that in this blog we have leveraged the BOP Authenticator which implicitly takes care of the CORS request made through BOP. If BOP Authenticator is not leveraged during configuration then CORS will have to be enabled on the server to allow AJAX requests from the ABCS instance. Moreover, the REST APIs should be SSL enabled (https).

 

To begin, invoke your REST endpoint in a REST client to evaluate the fields that you require in your Business Object. I have used Postman, which provides a Chrome plugin, to invoke the GET request for the GitHub repository resource and selected id, repo_name and git_url to represent fields in the ABCS business object.

 

Field

Data Type

Description

id

Number

Id of the repository

repo_name

String

Name of the repository

git_url

String

The URL to access the repository

 

 

Configure showcase BOP Provider

 

In the Extensions section of the Application Settings create a new BOP Extension and give the package name as com.test

Note: In case any other package name is used then replace com.test references used in this blog with the package name provided.

 

25.PNG

Click on Template and choose the showcase BOP provided with the ABCS instance. The showcase BOP is an example of how the Application Builder APIs are being used in the BOP configuration through Employee and Department entities.

This action creates the files required for configuring a BOP and arranges the files in a defined structure in the Resource Browser.

 

 

Modify the Entity Provider

 

To add the entity definition we will have to include the github repository entity to the existing entity definitions in the MyCustomEntityProvider.js file

In the existing code add the call to the _createGitHub method just before the _createDepartment method.

 

var github = this._createGitHub();

 

Add the github variable to the _entities array.

 

this._entities = [github, employee, department];

 

Define the GITHUB_ID variable and add the implementation of the _createGitHub entity in the code just before the _createEmployee method.

 

MyCustomEntityProvider.GITHUB_ID = 'com.test.github';
MyCustomEntityProvider.prototype._createGitHub = function() {
        var id = DataModelFactory.createProperty({
            id: 'id',
            name: 'ID',
            type: PropertyType.KEY
        });
        var repo_name = DataModelFactory.createProperty({
            id: 'name',
            name: 'repo_name',
            type: PropertyType.TEXT
        });
        var git_url = DataModelFactory.createProperty({
            id: 'git_url',
            name: 'git_url',
            type: PropertyType.TEXT
        });
        return DataModelFactory.createEntity({
            id: MyCustomEntityProvider.GITHUB_ID,
            singularName: 'GitHub Detail',
            pluralName: 'GitHub Details',
            description: 'BO representing details of GitHub Repo of the user',
            properties: [id, repo_name, git_url]
        });
    }; 

The code should look like this in the Resource browser

Click on Save before proceeding.

 

Create the implementation file

 

Create a Github.js file under the js directory.This file will hold the implementation of the READ operation which will be defined in the operations provider.

 

   

Add the implementation code to the file. This code is similar to the Employee and Department javascript files.

 

define([
    'operation/js/api/OperationResult'
], function (
        OperationResult
    ) {
    'use strict';
    var Github = function() {
    };
  
    Github.getRepos = function(url, authenticator, operationData) {
       var ajaxObj = {
            method: 'GET',
            url: url,
            dataType: 'json'
        }; 
          
    // Include REST call here which performs the real operation retrieving your Github data
  var self = this;
        return new Promise(function (fulfil, reject) {
         authenticator.invoke( ajaxObj ).then(function (response) {
                var arr = Github._parseDetails(response);
                return fulfil(OperationResult.success(arr));
            });
        });
  };
     Github._parseDetails = function (response) {
        var res = [];
        var data = response.getData();
        data.forEach(function(items) {
            res.push(items);
        });
        return res;
    };
    return Github;
});

The code in the Github.js file should look like this:

Click on Save before proceeding.

 

Modify the Operations Provider

 

The next step is to modify the operations provider MyCustomOperationProvider.js to define the operations allowed on the github entity.For simplicity sake we will add just the READ operation in the MyCustomOperationProvider.js file

Add the BOPAuthenticators and Resource APIs in the define block along with the reference to the Github javascript file created in the previous step to the array of dependencies

'bop/js/api/operation/BOPAuthenticators',  
 'bop/js/api/resource/Resource',
  'com.test/js/Github'

 

The define block should look like this:

 

The dependencies will be passed to the definition function as function arguments, listed in the same order as the order in the dependency array. The function is called to define the module once all dependencies have loaded.

function (
        BOPAuthenticators,
        Resource,
        OperationBuilder,
        OperationInput,
        Pagination,
        Operation,
        Department,
        Employee,
        Github 
    ) 

 

Add the dependencies parameter as the argument in the function that is referenced by MyCustomOperationProvider variable. The dependencies parameter is a required attribute in the authenticator implementation.

var MyCustomOperationProvider = function(dependencies)

 

Declare _resources array variable and the _authenticator, which holds the instance of the default authenticator for invoking rest services returned by the getDefault method of BOPAuthenticators, in addition to the _operations array

var self = this;
this._resources = [];
this._authenticator = BOPAuthenticators.getDefault(dependencies, {

            getResources: function() {
                return self._resources;
            }
   });

 

Add _initForGithub() call just before the _initForEmployees() method

After the additions the function would resemble

 

var MyCustomOperationProvider = function(dependencies) {
       this._operations = [];
       var self = this;
       this._resources = [];
        this._authenticator = BOPAuthenticators.getDefault(dependencies, {
            getResources: function() {
 return self._resources;
            }
        });
        this._initForGitHub();
        this._initForEmployee();
        this._initForDepartment();
    };

 

Define the GITHUB_ID variable, which should be the same as defined in the MyCustomEntityProvider.js.

Add method getAuthenticator and associate a function which returns an instance of the _authenticator variable

 

MyCustomOperationProvider.GITHUB_ID = 'com.test.github';
MyCustomOperationProvider.prototype.getAuthenticator = function() {

        return this._authenticator;
    };


After the modifications the code should look like this:

 

 

Add the method _initForGithub that internally calls _getAllRepos method, which associates a function that returns an Operation instance based on the current builder configuration provided by the user. The operation type Operation.Type.READ_MANY is leveraged for retrieving collection data and is available for example when client drops the Table into an empty page.

Moreover, we will also add the list of resources to be whitelisted that are exposed by this BOP in the _getAllRepos method.

 

MyCustomOperationProvider.prototype._initForGitHub = function() {
        var github = Abcs.Entities().findById(MyCustomOperationProvider.GITHUB_ID);
        if (github) {
            this._operations.push(this._getAllRepos(github));
        }
    };
  
   MyCustomOperationProvider.prototype._getAllRepos = function(github) {  
                var self = this;  
                var url = 'https://api.github.com/users/shraybansal/repos';  
        this._resources.push(  
            Resource.create({  
                id : 'github.fetch',  
                template : url,  
                entity : MyCustomOperationProvider.GITHUB_ID  
            })  
        );  
       
        return new OperationBuilder({  
            name: 'Get all Repos',  
            type: Operation.Type.READ_MANY,  
            performs: function(operationData) {  
                return Promise.resolve(Github.getRepos(url, self.getAuthenticator(), operationData));  
            }  
        }).description('Fetch all registered employees with all relevant information.').  
            takes(new OperationInput({  
                entity: github  
            })).  
            returns(github).  
            build();  
    };  

 

Click on Save Changes. After adding the two methods the code should look like this:

 

 

Modify the manifest.json file

 

We will now modify the manifest.json file to include the GitHub.js file to the runtime list of resources.

"resources": [
            "js/Department.js",
            "js/Employee.js",
            "js/Github.js",
            "js/MyCustomConditionVisitor.js",
            "js/MyCustomEntityProvider.js",
            "js/MyCustomOperationProvider.js"                          
        ]

 

The manifest.json file should look like this

 

Click on Save Changes and Reload the extension to complete the BOP configuration process.

 

Create Business Object

 

Navigate to Business Objects by going through the Menu and clicking on the Data Designer.

 

    

 

Click on the Business object from external service button and you will see your Business Object Provider (BOP) in the REST Services catalog. Select the BOP and click on Next.

Select the GitHub Detail Business Object and click on next.

 

Drag and drop git_url and repo_name to the Selected fields column. Click Next

Provide Basic Authentication credentials required for accessing the REST resource. Click Next.

 

22.PNG

Wait for the Changes Saved pop up to appear and click Finish.

Check the Data tab to see the data from the REST API

 

More information regarding the Business Object Provider can be seen through the documentation: Creating Business Objects

ABCS Extension APIs are documented here: JavaScript Extension Development API for Oracle Application Builder Cloud Service: Home

Subscribe to the ABCS Youtube channel: https://www.youtube.com/channel/UCFMTiIZAE6f3Ib91sY6Ms3g

One of the key new capabilities introduced in the latest release of Oracle Application Builder Cloud Service (ABCS) is on-device mobile application creation.

 

ABCS has been able to create responsive mobile apps that run through the browser and adjust to your phone size and orientation for a while. Now it has the ability to create an app that is invoked and runs directly on your phone – providing a native android or iOS look and feel and connecting to the data you store in the ABCS database.

 

Below you can see an 8 minute demo showing you the end-to-end process.

 

Here are the basic steps you'll need to follow:

 

First create a regular web application in ABCS - this is where you can create all your custom business objects.

 

Once you have those ready, go to your application settings and turn on resource sharing.

This enables other applications in the same instance to access your business objects (conforming to the security settings you have for your app).

Screen Shot 2017-02-08 at 4.40.18 PM.png

Next go to the Oracle ABCS main menu and create a new Mobile application.

Going through the wizards you'll be guided to select the name and template for your app, and then you'll select the layout of your first page.

Just like in the regular ABCS case, here you will also see a what-you-see-is-what-you-get view of your page in a mobile phone simulator.

Screen Shot 2017-02-08 at 4.42.02 PM.png

 

Next click to add data to your page, this will bring up a wizard that will let you choose the application that contains your business objects.

Once you select that, you can choose the specific object whose data you want to use - and continue to define the fields that will be shown on the page.

Screen Shot 2017-02-08 at 4.43.47 PM.png

Next you can click to add a ‘details’ page, as well as a ‘create’ page.

For each one of those you'll be able to specify the exact look and feel and the fields you'll want to show.

Once done, you can run your application in the phone emulator directly in your browser.

Screen Shot 2017-02-08 at 4.39.24 PM.png

Want to run the application on your phone?

Get the "Oracle Mobile Application Accelerator" application from the Google or iTunes stores, and then you'll be able to click the + sign in the MAX app to add your application to your phone.

 

ABCS will show you a barcode in your browser. When you scan it with your Oracle MAX app, the application automatically downloads to your phone.

Now you can test its functionality on your own device.

Screen Shot 2017-02-08 at 4.38.08 PM.png

 

As you can see in the video above - this makes it dead simple to create an on-device app - within 7 minutes you complete the full process without writing a single line of code manually.

We are happy to announce that Oracle Application Builder Cloud Service has been updated with a major new version.

You’ll notice all these features in your instance (whether you are using a production or a trial account) starting today.

In this blog entry we are going to focus on the 3 “big-ones” in this entry. But you should also read the full list of new features see the documentation.

 

On-device Mobile Application Creation

When you choose to create a new application in ABCS you’ll have a choice of creating a web app – which take you through the experience you are already familiar with - or create a mobile application.

The Mobile option will take you to the Oracle Mobile Application Accelerator (Oracle MAX) – which creates mobile optimized applications that are deployed on the mobile device.

MAX is tuned for the unique aspects of mobile apps helping you create applications that are native looking with design patterns and templates optimized for mobile interaction.

MAX apps can access custom business objects that you created in “regular” ABCS application – all you need to do is turn on the regular app's resource sharing.

Want to learn more about MAX? Since MAX has been, and still is, included in Oracle Mobile Cloud Service – you can find several videos about it here.

 

max_newapp.png

 

Business Object Providers (BOP)

Ever wanted to incorporate external data (not from Oracle SaaS) into your ABCS app? Well now you can!

Adding to ABCS's extensibility features you can now add custom Business Object Providers – or BOPs for short.

A BOP defines a mapping to an external REST exposed object through a set of javascript files.

Once a BOP has been created, you can import it into your application, and it will appear as a service you can access in your service catalog.

You can then use it like you would use any other business object.

 

extensions-bop-list-sm.png

 

Declarative Business Rules

This feature is in control availability status and won't show up in your environment automatically.

When enabled you’ll see that your custom business object can now be enhanced with triggers, validators and business function.

All of these allow you to incorporate more complex business logic around your data objects providing logic that will be executed on the server.

Using this feature you can define for example an action that will take place on one object every time that you add a record to another object.

 

data-designer-rule-newfield-sm.png

 

There are several other new feature in this release, so make sure to read the full doc, and let us know what you think.

When you define or edit a custom business object in ABCS, the system does two critical things. Firstly, a table is created (or updated) in the ABCS schema. This table persists the data that is managed by the business object. Secondly, ABCS generates a REST API for retrieving and manipulating data. The REST API includes operations for querying, inserting, updating and deleting data. Pages that you create in ABCS make use of this API for performing the requested actions, for example, an Edit form on a Contact object will automatically call the PATCH operation on the Contact REST API.

 

In some cases (primarily for integration with other systems), it may be desirable to invoke the REST API for a business object from outside ABCS. In this blog post, I'll show how you can call the REST API of a custom business object from an external client.

 

Define the Business Object in ABCS

  1. Create a new application.
    • Start by creating a new application. The id of the application will appear in the URL for the REST API. In this example, I name the application HR Application, and provide HRApp as the id.

      1createapp.png

  2. In the page designer, create a business object.
    • Create a business object using either approach of creating it from the page designer (drop a table onto a page), or from the Business Objects tab in the Data Designer. In this case, I've created a business object called Employee and added fields for firstname, lastname, hiredate, and salary.

      2createbusinessobject.png
      Here is how the object looks in the Data Designer:

      3businessobject.png

  3. To simplify example, allow anonymous access to the application.
    • To simplify this example, I've used the Security Settings panel to enable anonymous access to my application and pages.

      4security.png
  4. Publish the app and add data.
    • Stage, then Publish the application. Now, run the published application and add some data. Note the URL for your application.

      5runapp.png

 

Access the REST API

  1. Identify REST URL and call from curl.
  1. API documentation
    • The REST API for the business objects contain descriptive metadata. To access the metadata of the object, you can request the /describe resource of the business object as shown below.

      7describe.png

 

In a later blog post, we will cover aspects of invoking the REST API for a secure service.

As we've shown in a previous blog entry that Oracle Application Builder Cloud Service is able to add REST services that were created using Oracle ADF as a source of data.

In the video below you'll see how you can use this approach to get data from Oracle HCM and build an Oracle ABCS application with ease.

Oracle HCM publishes a set of REST interfaces - which are built on Oracle ADF - so integration is straight forward.

 

Once you add the service to ABCS, you can use it as a base for pages, including leveraging the built-in support for advanced query capabilities.

In the demo below we are building a simple application that let us track the cars of the various employees - something that can be used by the guards at our facility for example.

We use a REST service to get a list of the employees, and then create a custom ABCS business object that tracks the details of a car associated with a specific employees.

 

Check it out:

For some more complex tasks in Oracle ABCS you might need to resort to coding.

 

In the example video below you'll see such an example.

In the application we want to check if an event that a person wants to register for has open spaces.

If there are open spaces we just need to process the registration and save the details.

If however there isn't open space we want to notify the person that they are on a wait list and perform a bit of a different processing adding an indicator to our data that the person is on the wait list for the event.

 

To achieve this, we are going to need to:

  • Traverse a relation ship between to related custom object
  • Execute a query on a custom object with a specific condition
  • Analyze the values in the row that was returned
  • Conditionally navigate to one of two recipes flows

 

Here is a quick demo showing you how we did this:

And here is the code used in the sample:

 

require([

    'operation/js/api/Conditions',

    'operation/js/api/Operator'

], function (Conditions, Operator) {

    var lab = Abcs.Entities().findById('Lab');

    var id = lab.getProperty('id');

    //condition is to find a lab with the id that is in the page's drop down box

    var condition = Conditions.SIMPLE(id, Operator.EQUALS, $Person.getValue('ref2Combo_Box'));

    var operation = Abcs.Operations().read({

        entity: lab,

        condition: condition

    });

    //if query returned value we loop over the data and check the capacity and registration

    operation.perform().then(function (operationResult) {

        if (operationResult.isSuccess()) {

            operationResult.getData().forEach(function (oneRecord) {

                if ((oneRecord.Capacity - oneRecord.Registered) < 1) {

                    $Person.setValue('Waitlisted', true);

                    reject("error");

                } else

                {

                    resolve("ok");

                }

            });

        }

    }).catch(function (operationResult) {

        if (operationResult.isFailure()) {

            // Insert code you want to perform if fetching of records failed

            alert('didnt worked');

            reject("error");

        }

    });

});

Oracle Application Builder Cloud Service makes it very easy to create a parent/child relationship between two objects - in fact it can create this relationship for you automatically when you drop a new table on the edit or details page of another object.

However, when such a relationship is created the child object "belongs" to the parent object - and is not accessible as a "stand-alone" object.

 

If you want to have the ability to create pages that directly access the child object on its own, then you should create the relationship between the two objects with a reference field.

The video below shows you how to do this and the difference between the solutions: