Friday, February 18, 2022

#903 Bringing it all together - OIC + OHIP + Simphony

The thing with OIC Integration is that it does the plumbing in the background. It's not that exciting demoing integrations directly from the OIC tester so that's why I created a Visual Builder front end to demo some of the compelling functionality. Those of you who know me appreciate the fact that I'm not the greatest when it comes to developing UIs. Not that I don't appreciate art and design - below are some of the pictures adorning my humble abode in Bavaria -

So with that said on to my demo VB app - 
Visual Builder is Oracle's low-code solution for building and running native mobile and web apps. When I say low code, I really mean low code - 99% declarative.

The goal of the app is to demo usage of the OHIP and Simphony apis in a visual manner. There are 2 user personas, firstly, the guest, who can update her guest profile, reserve rooms etc. The second persona is the Front Office person. He can specify how the guest is going to pay for the room (assign credit card to reservation). He can also assign a vacant and inspected room to the guest, then check them in. Finally, he can do what all hotels should do - order an ice cold beer to be sent up to the guest's room.

The apis I will be using have been covered in previous posts - so the focus here is more on the VB side.
Visual Builder is simple to use and simple to explain - so for you neophytes out there - pay attention!

You see the icons on the right - 
  • first icon that looks like a mobile phone is where you create native Mobile Apps
  • second icon, where I am, allows me to create Web Apps
  • third icon is for Service Connections - getting access to data from the outside world. I use service connections to pull in the required OIC OHIP and Simphony related integration apis.
  • fourth icon is for Business Objects - I will create a few of these as app data stores.
Let's ignore the other icons for now.

Service Connections


One sees the following dialogue, when one clicks on the + 

So it is very easy to import these api definitions from OIC Integration. Now to the Business Objects -

Business Objects

These 3 are related to the guest. Think of logging into your hotel booking app - Bonvoi or something similar. Guest Profile includes details such as name, contact info etc. Any changes made will be synced to the Profile in Opera Cloud.

Payment Methods includes credit card info etc. Necessary when booking a room. 

StayRequest should really have been called reservations as it includes the reservation data.

These Business Objects have their own REST apis, so I can update them easily within my app. For example, if the guest user makes a change to their credit card details then I simply invoke the following api - declaratively of course. 

So now to the Web App - 

Web App

I have a few pages, as you can see. The main page is called main-start and is pre-seeded when I create a web app.

So let's try out the app - 

I click on my guest profile - 

I have the opportunity to change the email address, which I do - 

The relevant OIC integration is invoked on clicking Save.

I can also view the payment methods - my credit card data - 

I can easily specify what should happen on clicking Save - by creating an Action Chain - more about them later.

Now to the first use case - reserving a room - 

Room available for €75 - I'll reserve that 

That's another reservation added - 

Now to the 2nd persona - the front office person - He chooses the relevant reservation - 

As you can see there are a couple of steps here - All of these could be executed in one call to OIC, however, I have broken them down, just for visibility purposes. First thing our front office person does, let's call him Uncle Paudge - an elderly gent, but gets on great with guests of a certain ilk - is to Assign a Payment Method to the reservation. We used the preferred payment method already set up for the guest here.

Naturally, the relevant OIC integration has been invoked - 

Now to finding a room for our guest - 

Looks like room 405 is the only one available, but no worries, this is a room with a great view of the lake.

Now Uncle Paudge can officially check in the guest -

Finally, the guest deserves a welcome pint, so Uncle Paudge clicks on the Order Welcome Drink for Customer (yes, I've renamed it) button -

This invokes the Simphony integration described in the post here
This sends a text to the guest, advising them to hurry on up to the room for a ice cold beer.

Visual Builder details

Using VB to demo usage of OIC integrations is very easy, remember also VB is part of the OIC toolkit and is tightly integrated with OIC Integration and Process. Granted, my UI is very basic, however, you can create very compelling UIs with VB. VB has the concept of application and page variables - this makes it very easy to pass data between pages. 

Here is an example on the reservation code variable from the page above - 

Note the Pass On URL setting - this allows me to pass the reservation code, when navigating to this page.

Here are the relevant button properties on the calling page - 

Note the Action Chain, let's look at it - 
note the ability to set the variables (Input Parameters)

The action chains for invoking OIC integrations are similar - Note the rich list of actions available -

Setting the OIC request payload is easy - 

VB variables can be simple such as of type String, however, you can also create variables based on types eg. Business Object Types or REST response types. This makes it very easy to manipulate data in VB apps.

Net, net - it is definitely worth looking at Visual Builder for creating mashups on top of your app apis. Happy Developing!

No comments: