Wednesday, April 27, 2022

VBCS - SDP vs ADP

In VBCS, we are using tables to list or fetch or populate the data. This table component can be populated in VBCS using following two ways:

  1. SDP(Service Data Provider): 
    • This is mostly used when we have Business Objects in VBCS and wanted to populate data using it.
  2. ADP(Array Data Provider): 
    • It provides more flexibility to populate and manipulate data than SDP. 
    • This can be used to populate data using Business Objects, Third Party servics or Static data.
    • Storing data in ADP (rather than SDP) is useful whenever you want to further modify the data on the client side. For example, if you are looking to create updatable tables in your UI.
IN future POCs, we will see how to create a ADPs and use them.

OIC | Convert UTC Date and Time to another timezone in Oracle integration cloud servic

About:

  • OIC provides date and time in UTC format. Sometimes as per project requirement, we require to change the UTC format to another timezone. 
  • Oracle provides OOTB XSLT function fn:adjust-dateTime-to-timezone() to achieve this objective.
  • The fn:adjust-dateTime-to-timezone() function adjusts an xs:dateTime value to a specific time zone  or removes the time zone component from the value.
Format:
fn:adjust-dateTime-to-timezone(dateTime-value, timezone-value)

dateTime-value: the dateTime value that is to be adjuated.

timezone-value : A duration that represents the time zone to which dateTime-value is to be adjusted. timezone-value can be an empty sequence or a single value of type xs:dayTimeDuration() between -PT14H to PT14H. This component also can include minutes like this for IST, PT5H30M.

Use case: we will convert UTC to IST and UK timezone using XSLT function.


Implementation Steps:

Step1: For this POC, we have Scheduled integration

Step2: Drop an assign activity on the integration canvas and create following variables:

currentDateTime: /nssrcmpr:schedule/nssrcmpr:startTime

IndiaTimeZone: string(fn:adjust-dateTime-to-timezone(nssrcdfl:dateTime(/nssrcmpr:schedule/nssrcmpr:startTime),nssrcdfl:dayTimeDuration('PT5H30M')))

UKTimeZone: string(fn:adjust-dateTime-to-timezone(nssrcdfl:dateTime(/nssrcmpr:schedule/nssrcmpr:startTime),nssrcdfl:dayTimeDuration('PT1H')))


Steps with Screenshots:





Testing output:



Note: we can also use fn-adjust-time-to-timezone funstion to adjusts an xs:time value to a specific time zone or removes time zone component from the value.

Reference for more details about the XSLT function:

https://www.ibm.com/docs/en/i/7.2?topic=functions-fnadjust-datetime-timezone-function



Tuesday, April 26, 2022

VBCS - Sample WEB application | Employee CRUD operation web application

Use case:

  1. Create a web application
  2. Create an Employee business object
  3. Page to list all the employees.
  4. Page to on board new employee
  5. Page to view all employee details
  6. Page to update an employee
  7. Page to delete an employee

Steps in detail with screenshots:

Home >> Visual Builder


New Application


Provide application name >> Finish



Navigation hamburger >> Business Objects


Business Object


Provide Business Object Name


By default,  we have 5 fields:
Id, CreatedBy, CreationDate, LastUpdatedBy,LastUpdatedDate


Created new field: FirstName, LastName, Age, EmailAddress


Create web application





See the structure of the web apps.


Take Table component


Go to Quick Start


Add Data to Business object


Select Employee BO.


Add fields to show in the employee list.



Add create Page


Select same BO.


Select fields to create for onboard new employee.


Add edit page


Select Employee BO.


Add fields that need to be updated.


Add Detail Page.


Select Employee BO.


Select fields to show details



Add delete action


Select Employee BO.


Finish


The final page looks like below:


All the pages created under main folder.



Lets go to Preview and test .


Click On board


Add an employee


Employee created.


Same way added another employee.

The page looks little messed up so modified the page formats.



Select one employee row and click update employee.

Update the employee fields.


You can see the employee fields have been modified.


Clcik on Employee detail.


See the employee details.


Select employee and delete employee.


The employee gets deleted successfully.


Go to the Business Object >> Data and see all the current employee data.



Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...