Friday, April 29, 2022

VBCS - Dependent or Cascading Select dropdown

Use Case:

  • Create a Web application
  • Create 2 business objects - Category and Food
  • Drop Select(one) component on web main page and associate with Category BO. 
  • Drop 2nd Select(one) component and associate with Food BO. Add a default filter criteria - Category as -1.
  • Add an event on 1st Select(one) to filter only the food names to that cateory type. Filter criteria- Category type as 

Parent child BOs:


Steps in detail with screenshots:

Create new application.


Create 2 Business Objects.




















Take Select(one) component and add data source.










Add event >> assign >> put Filter Criteria for Food Name SDP.





Preview and test.






VBCS - Parent Child Relationship between Business Objects

Use Case:

  • Extend the EmployeeApplication . See my previous blog: https://soalicious.blogspot.com/2022/04/vbcs-sample-web-application-employee.html
  • Create 2nd Business Object "Address"
  • Create a reference between Address and Employee using employeeId
  • Drop a table in the Main page of Employee list and associate the Address BO.
  • Add 1st Filter criteria not to show any default addresses.
  • Add 2nd filter criteria in the employee list event to show only addresses belongs to the selected employee. 

Parent child relationship:


Steps in detail with Screenshots:

Add Business Object - Address.




Default fields:


Add all required fields and a reference Address to Employee BO using Employee id.


All the fields added:


Add one address row.


Go to the employee list main page:


Add a Heading as Address



Add a table >> Quick start >> Add data


Select Address BO.


Add all fields to show


Add field criteria not to show any address rows by default.



employeeId equals to "-1"



Select employee table >> Events


Select event



Add an assign


Click assign


Go to addressListSDP >> filter Critetia >> click to add condition >> employeeId equals to $variables.employeeId






Preview 


Select one employee >> it will show referenced Addresses of that employee.


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



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...