DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Data Engineering
  3. Databases
  4. Query Logic Implementation in VBCS for ADF BC REST

Query Logic Implementation in VBCS for ADF BC REST

In this post, I will explain how to implement query logic against external REST service connections.

Andrejus Baranovskis user avatar by
Andrejus Baranovskis
·
Sep. 24, 18 · Tutorial
Like (1)
Save
Tweet
Share
7.13K Views

Join the DZone community and get the full member experience.

Join For Free

Oracle Visual Builder Cloud Service allows defining external REST service connections. In this post, I will explain how to implement query logic against such service. The connection is defined for ADF BC REST service.

Wizard provides an option to add query parameters: both static and dynamic. I have set one static parameter only Data=true, to return data only from the service. Also, I have created multiple dynamic parameters, the one used in this use case — q parameter. This parameter accepts query expression to filter data. Later in VBCS action chain, I will assign a value to this parameter, and service will be re-executed to bring filtered data:

Search form elements will be assigned with page scope variables to hold user query input. On the search button, click, VBCS action chain will be invoked to read these values and update query parameter. Page scope variables:

Variables firstNameQueryVar and lastNameQueryVar are assigned to search form fields, here is example:

The search button invokes an action chain:

An action chain does two things — calls JS function to construct query parameter and then assigns returned value to rest service query parameter to execute search:

JS function is mapped to accept input parameters from search form input fields:

JS function code — parameters are joined into ADF BC REST query string:

JS function result is mapped with page scope variable — the result is assigned to this variable:

REST service query parameter q variable is assigned with this value. Once value changes, query is automatically re-executed:

In my next post, I will explain how to implement filtering and pagination with transformation function, on top of service connection:

VBCS sample application code is available on GitHub (if you download ZIP from GitHub, make sure to extract it and create new archive including extracted content directly, without top folder).

REST Web Protocols Database Implementation

Published at DZone with permission of Andrejus Baranovskis, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • A Gentle Introduction to Kubernetes
  • How To Best Use Java Records as DTOs in Spring Boot 3
  • What Are the Benefits of Java Module With Example
  • Distributed Tracing: A Full Guide

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: