<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by JT Thomas on Medium]]></title>
        <description><![CDATA[Stories by JT Thomas on Medium]]></description>
        <link>https://medium.com/@jtoracle?source=rss-c69fdf3392ff------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*B4V5vynd0VrnSLMC89M7ag.png</url>
            <title>Stories by JT Thomas on Medium</title>
            <link>https://medium.com/@jtoracle?source=rss-c69fdf3392ff------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 07:19:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jtoracle/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Importing and Using Javascript libraries in your Visual Builder custom code]]></title>
            <link>https://medium.com/@jtoracle/importing-and-using-javascript-libraries-in-your-visual-builder-custom-code-4d2550bfd597?source=rss-c69fdf3392ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d2550bfd597</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[JT Thomas]]></dc:creator>
            <pubDate>Wed, 27 Jun 2018 23:33:19 GMT</pubDate>
            <atom:updated>2018-06-27T23:35:16.504Z</atom:updated>
            <content:encoded><![CDATA[<p>In a recent <a href="https://blogs.oracle.com/vbcs/variables%2C-modules%2C-and-functions%2C-oh-my-custom-client-code-in-visual-builder">post</a>, I shared the prescriptive model for creating custom code within Visual Builder. Namely, using Javascript modules at the App, Flow, or Page level to create custom functions within the module. In this post, I want to talk about importing and using external Javascript libraries so you can use functions, objects and variables within that library.</p><p>For this example, I will use the glmatrix library, a collection of Vectors, Matrices, and associated linear algebra operations. These types of operations can be used for more than just graphics so they live in their own library. The glmatrix library is provided in a “min” format. Essentially one free of whitespace and newline characters and in one file.</p><p>So, the library I am importing is the glmatrixmin.js library which can be downloaded from the “dist” directory within the project github page: <a href="https://github.com/toji/gl-matrix/tree/master/dist.">https://github.com/toji/gl-matrix/tree/master/dist.</a></p><p>First, you’ll need to import the library into your project. With Visual Builder, you can import resources at each of the levels, App, Flow, and Page and that resource will be accessible via that path. To import the file, right click on the project App, Flow, or Page node and select Import Resource.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/0*6xmQmSiD3aylUB0m.png" /></figure><p>The resource needs to be uploaded as a zip file. So compress the glmatrixmin.js into a zip and select it from your files system in the Import Resources dialog. The dialog will show the import location. Remember this as this is how we reference the file later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/0*9TiRdvfWp_NLExPq.png" /></figure><p>Now the file is imported, you can see it in your code view under the Resources folder of the “main” Flow within which it was imported.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/0*tkkxg_y3qu-HGxfB.png" /></figure><p>Now, we can write some custom code in our PageModule and reference the file to load it into our module. To do that we use a define statement, which provides the path to the file and the alias with which we will refer to the imported library in our code.</p><p>See the below code example, for the define statement and usage. The full path to the file is used combining the import location with the flow name and resources directory. Note, the .js file extension is not necessary. Also, note the alias “glmatrix” is used to reference the objects and functions within the library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/0*EWBel-ziuWme0kGV.png" /></figure><p><em>Originally published at </em><a href="https://blogs.oracle.com/vbcs/importing-and-using-javascript-libraries-in-your-visual-builder-custom-code"><em>blogs.oracle.com</em></a><em> on June 27, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d2550bfd597" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are you done with your call?]]></title>
            <link>https://medium.com/@jtoracle/are-you-done-with-your-call-33abc54db102?source=rss-c69fdf3392ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/33abc54db102</guid>
            <category><![CDATA[visual-builder]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[JT Thomas]]></dc:creator>
            <pubDate>Fri, 25 May 2018 21:45:00 GMT</pubDate>
            <atom:updated>2018-05-25T22:22:11.598Z</atom:updated>
            <content:encoded><![CDATA[<h3>Are you done with your call? Managing callbacks with a Promise in Visual Builder custom code | Oracle Visual Builder Cloud Service Blog</h3><p>In a previous <a href="https://blogs.oracle.com/vbcs/variables%2C-modules%2C-and-functions%2C-oh-my-custom-client-code-in-visual-builder">blog</a>, we talked about how to create custom code within Visual Builder. In this blog, we’ll discuss how to work with callbacks within that custom code.</p><p>If you are familiar with Javascript callbacks, read on, but if you need an introduction to callbacks and asynchronous operations and why this takes special care, here is a good <a href="https://medium.com/codebuddies/getting-to-know-asynchronous-javascript-callbacks-promises-and-async-await-17e0673281ee">primer</a>. In short, we need to manage this specifically because the return result of a custom function may not be available yet when it gets assigned within a callback. Since the callback gets scheduled to run later (asynchronously), your result can be returned undefined because the callback which populates that return value had not completed yet.</p><p>Let’s look at a specific example, getting a GPS location using the HTLM5 <a href="https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition">navigator.geolocation</a> API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UMwbLzHXMtAfWCiB.png" /></figure><p>Screenshot from: <a href="https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition">https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition</a></p><p>As shown above, the function takes three parameters called success, error, and options. Success and error are both callbacks and are used in this API because retrieving a location could take several seconds. If the function were to wait for the result, your app would be stuck waiting too. So, callbacks are you used to be “called back” when that information is available rather than blocking your code execution. But then, how do you deal with the situation described above where our success callback may not be called yet? Use a Promise, as discussed in primer I linked to at the beginning of the article.</p><p>Let’s implement this within Visual Builder custom code using a module function.</p><p>PageModule.prototype.getGeolocation = function() { return new Promise(function(resolve, reject) { var geolocation = navigator.geolocation; geolocation.getCurrentPosition(function(position) { var latitude = position.coords.latitude; var longitude = position.coords.longitude; var latlong = JSON.stringify({ lat: latitude, lng: longitude}); console.log(latlong.toString()); resolve(latlong); }, function(error) { console.log(error); reject(&quot;The error is: &quot; + error); }); });</p><p>}</p><p>Within our custom function getGeolocation, we are returning a Promise. This Promise wraps our call to navigator.geolocation and the two callbacks functions it expects as anonymous methods. This ensures our action chain custom function call will wait for the Promise to return (itself an asynchronous call) but will release the custom function from blocking execution at the same time. A successful retrieval of a geolocation calls our anonymous function for success and returns our assigned variable in the Promise resolve function, ensuring it is not undefined. Non-success calls the error function as an anonymous function and then calls the Promise reject function.</p><p>Using the above pattern within Visual Builder custom module functions will ensure:</p><ol><li>Visual Builder can reference your custom code within an action chain</li><li>Your callbacks will complete before a result is returned, ensuring a return result is not undefined</li><li>Allow you to also deal with error conditions within the same function</li></ol><p><em>Originally published at </em><a href="https://blogs.oracle.com/vbcs/are-you-done-with-your-call-managing-callbacks-with-a-promise-in-visual-builder-custom-code"><em>blogs.oracle.com</em></a><em> on May 25, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33abc54db102" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Variables, Modules, and Functions, OH MY!]]></title>
            <link>https://medium.com/@jtoracle/variables-modules-and-methods-oh-my-ccb591b80cd?source=rss-c69fdf3392ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/ccb591b80cd</guid>
            <category><![CDATA[custom-code]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[visual-builder]]></category>
            <dc:creator><![CDATA[JT Thomas]]></dc:creator>
            <pubDate>Tue, 15 May 2018 21:13:00 GMT</pubDate>
            <atom:updated>2018-05-16T00:43:16.681Z</atom:updated>
            <content:encoded><![CDATA[<h3>Variables, Modules, and Functions, OH MY! Custom Client Code in Visual Builder | Oracle Visual Builder Cloud Service Blog</h3><p>Not only does the new version of <a href="https://cloud.oracle.com/visual-builder">Visual Builder</a> (as of <a href="https://blogs.oracle.com/vbcs/a-new-oracle-autonomous-visual-builder-cloud-service-visual-and-coding-combined">18.2.5</a>) give you full access to modify your generated client source code it also makes it really easy to create and manage custom code within the client application. This custom code can be accessed and called from other custom code blocks and from visual editors like the action editor. To get the most out of your custom code, it is import to understand 3 key concepts and how they present themselves within Visual Builder.</p><h3>1) Variables</h3><p>Variables are cornerstone to working with code. With Visual Builder, you will use variables to interact with UI controls, REST interfaces, and general application logic. Visual Builder support standard Javascript types with built in types as well as custom types that can be declared and instantiated as needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/0*-4HFeWAv_bcjaIqb.png" /></figure><p>To create a variable, you use the variables editor found within the designer. It is denoted by a</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/62/0*6ag7QBIaYaDfSGE6.png" /></figure><p>symbol and allows you to quickly create new variables you wish to use within your module. Simply select a type (or create a custom type) and give it a unique name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/266/0*rG8uWqwdTCTJnHd5.png" /></figure><h3>2) Modules</h3><p>Variables and Functions are stored within the scope of a Module. Visual Builder presents three types of modules: The AppModule, the FlowModule, and the PageModule. You may also declare a variable within the scope of an Action Chain.</p><p>In the below screenshot, the hierarchy of the various module types is visually shown. At the top level, called “custom” in this case, you have your AppModule. An App can contain one or more flows, each with their own FlowModule, and each flow can contain one or more pages, each with their own PageModule. Within a page, there can be several UI events captured and each associated with and action chain. And within each module and/or action, we define our custom variables and functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/0*endhkj3QExOCulwJ.png" /></figure><h3>3) Functions</h3><p>To create a custom function, you use the Javascript editor, denoted by the</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/72/0*GePhKtdpR6z0zUM9.png" /></figure><p>symbol, for either the app, flow, page, or action. Within each you will see a Module defined that within you can create a custom function. Use the <strong>prototype </strong>function within the module to define your function. Below is an example of adding a custom function to the AppModule, it takes a string appends some additional text to it and returns that new string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/0*cqm037ZU9C-GjVMT.png" /></figure><h3>Putting it all together</h3><p>To put this all together, we are going to create some UI within which we can enter some text, hit a button to call the function and pass that text, then modify the string and bind it to an output control. To do this we need to use variables, actions, and custom module function.</p><p>The UI control that takes input is bound to a PageVariable we created within the page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/0*w_b6zOXUOXWsp6C8.png" /></figure><p>The output control is bound to the AppVariable we created at the app level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/0*ceU901T4_U1FvZfa.png" /></figure><p>Now, we create an Action Chain that gets called when the button is pressed. The Action chain calls my custom function and maps that PageVariable to that input.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hvYBvMP_KaeOhxNr.png" /></figure><p>Then the Action chain assigns the output of that function to my AppVariable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zeVuxx54dO_ilX9e.png" /></figure><p>Since those are already bound to my UI control, they update automatically when the action chain runs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/0*sP7e3JCBOf7yNVeS.png" /></figure><p><em>Originally published at </em><a href="https://blogs.oracle.com/vbcs/variables%2c-modules%2c-and-methods%2c-oh-my-custom-client-code-in-visual-builder"><em>blogs.oracle.com</em></a><em> on May 15, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ccb591b80cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[App Development Concepts for Oracle's Visual Builder Cloud Service]]></title>
            <link>https://medium.com/oracledevs/visual-builder-app-development-concepts-8cae101715e4?source=rss-c69fdf3392ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/8cae101715e4</guid>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[low-code]]></category>
            <dc:creator><![CDATA[JT Thomas]]></dc:creator>
            <pubDate>Mon, 02 Oct 2017 02:10:10 GMT</pubDate>
            <atom:updated>2017-11-09T00:40:14.082Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are new to app development, or more specifically, visual development, this article introduces some key concepts related to both. Visual Development is also known as Low-Code and/or Rapid Application Development (RAD). Oracle Visual Builder Cloud Service (VBCS) is a low code environment for quickly building and hosting responsive web and mobile apps.</p><p>First, let’s talk about what Visual Development is. Visual Development is drag-and-drop, it’s WYSIWYG, its declarative, and it’s fast! Basically, it means the bulk of your app (or all of it) can be created visually, without having to write code, by using designers to layout user interfaces, define data models, and express business logic. Sometimes code is needed but often times the visual design tools can get you very far (or all the way) to a production app in hours rather than weeks or months.</p><p>Every (useful) app requires three components. It requires data, business logic, and an user interface. Data refers to the information that is stored and/or retrieved as well the relationships between data elements. Business logic is custom behavior an application exhibits when an action is taken by the user or by the system. User Interface is the part of the application with which the end user directly interacts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*aOXyrgmFnzfl7QheM-4mJA.png" /></figure><p>Now that we have a grasp of these basics of an app, let’s discuss some key concepts with regard to visual app development. This next section will define 10 key concepts in each of those key areas, Data, Busines Logic, and User Interface. Let’s start with User Inteface Concepts.</p><p><strong>User Interface Concepts</strong></p><p><strong>1) UX First</strong></p><ul><li>UX First is a design methodology in which the app developer focuses on the user experience first and foremost, namely how the user interface presents the data and logic to the end user.</li><li>In Visual Development environments, Data and logic are generated as a result of UX design choices.</li></ul><p><strong>2)Drag and Drop</strong></p><ul><li>A Visual Design environment contains three primary areas:</li><li>Form</li><li>Component palette</li><li>Property Inspector</li><li><strong>Drag</strong> a component from the component palette</li><li><strong>Drop</strong> it onto the form where you want it to be displayed</li><li><strong>Set </strong>properties of the components to change look and feel</li></ul><p><strong>3) Responsive User Interface</strong></p><ul><li><strong>Responsiveness</strong> is the ability for an app user interface to change the way it looks depending on the type of device form factor</li><li>Layout and component sizes are automatically managed by the app and change with the form factor</li><li>Specific behavior can be set for each component and form factor</li></ul><p><strong>4) Actions</strong></p><ul><li><strong>Actions </strong>are events that are captured from user interface and drive a series of behaviors as a result of that event</li><li>For example, when a specified button is pressed</li></ul><p>— Read a value from another user interface field and display it in a message “Hello World”</p><p>— Send an email</p><p>— Create a new business objects</p><p>— Run some custom code</p><p><strong>Data Concepts</strong></p><p><strong>5) Business Objects</strong></p><ul><li><strong>Business Objects (BO) </strong>are a set of <strong>fields</strong> upon which a user can perform a set of <strong>CRUD</strong> operations</li><li><strong>Custom BOs </strong>are stored within the local database in the backend</li><li><strong>External BOs </strong>represent an external service, so the data is stored in that service, but you can interact with it within your app</li></ul><p><strong>6) CRUD</strong></p><ul><li><strong>Actions</strong> that can be taken upon a business object:</li><li><strong>Create</strong> to add a new row to a business object</li><li><strong>Read</strong> to retrieve a row, set of rows, or the whole dataset from a business object</li><li><strong>Update </strong>to change values in an existing row (or set of rows) in a business object</li><li><strong>Delete </strong>to remove a row (or set of row) or a whole dataset from a business object</li></ul><p><strong>7) Relationships</strong></p><ul><li>Business Objects, i.e. data, can have <strong>relationships</strong> with one another</li><li><strong>Parent-Child</strong>, or Master-Detail, relationships are those in which a BO can “contain” another BO</li></ul><p>– Some of the data comes from the parent and some from the child</p><ul><li><strong>Reference BOs </strong>are fields that connect to other BO fields</li></ul><p>– The data lives in the reference BO</p><p><strong>Business Logic</strong></p><p><strong>8) Workflow</strong></p><ul><li><strong>Business Logic Workflow</strong> is the set of steps a process follows</li><li>A <strong>workflow </strong>has a <strong>begin</strong> state, and <strong>end</strong> state, and several states in between</li><li>A begin state is called a <strong>Trigger </strong>or<strong> Action</strong></li><li>A <strong>Trigger</strong> is in the <strong>data</strong> and an <strong>Action</strong> is in the <strong>UI</strong></li></ul><p><strong>9) Conditionals and Criteria</strong></p><ul><li>How a workflow moves through states from begin to end is based on <strong>conditional logic</strong></li></ul><p><strong>– If this, then…</strong></p><ul><li><strong>Criteria </strong>specify how the condition is checked</li></ul><p>– If <strong>field</strong> equals <strong>true</strong></p><p>– If <strong>amount</strong> is <strong>greater</strong> than <strong>$$$</strong></p><p>– If<strong> </strong>string<strong> contains </strong>substring</p><p><strong>10) The App Lifecycle</strong></p><ul><li>The <strong>App Lifecycle </strong>is the set of stages that take an app from <strong>development</strong>, through <strong>testing</strong>, and finally to <strong>production</strong></li></ul><p><strong>— dev/test/prod</strong></p><ul><li>To <strong>publish</strong> an app, move the app through the app lifecycle</li><li>Dev apps are fluid and change a lot</li><li><strong>Test</strong> apps are <strong>Staged</strong> and accessible to others</li><li><strong>Prod</strong> apps are <strong>Live</strong> and cannot be modified by a developer</li></ul><p>— a new <strong>version</strong> must be created</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8cae101715e4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/visual-builder-app-development-concepts-8cae101715e4">App Development Concepts for Oracle&#39;s Visual Builder Cloud Service</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Aggregating Data in Charts with Visual Builder — Oracle Cloud]]></title>
            <link>https://medium.com/oracledevs/aggregating-data-on-visual-builder-charts-9ebc868c5a7d?source=rss-c69fdf3392ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ebc868c5a7d</guid>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[visual-builder]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[charts]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[JT Thomas]]></dc:creator>
            <pubDate>Wed, 13 Sep 2017 20:48:13 GMT</pubDate>
            <atom:updated>2017-09-14T03:26:38.083Z</atom:updated>
            <content:encoded><![CDATA[<p>Charts are a great way to help users visualize data. Occassionally, however, there can be too much information or certain types of information that just end up making a chart too busy for the end user to quickly get useful information out of it. To help solve this challenge, Visual Builder September release offers a declarative way to aggregate data within a chart.</p><p>Let’s look at a specific use case. Suppose we are as sales organization that need to track expenses related to a customer. With Visual Builder we quickly created a tabular format to edit and view the expense information but now we want to visualize that with charts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ThOWSt3KFV9yQtovkhv8Sg.png" /></figure><p>With several customers(opportunities) and expenses this information can get unwieldy very fast. So let’s look at visualization with charts. Visual Builder provides several chart types: Bar, Line, Area, Pie, Funnel, Donut, and Bubble.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*vx8c9m1-M7NDmYldUw0ttQ.png" /></figure><p>Dropping a Pie chart onto the form allows me to select the business object (Expenses), the Slices values (Amount), and the Slice Colors (Category). Notice how busy the chart gets with several entries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LGn9OOdU46u8i3V_ehCtPg.png" /></figure><p>Let’s look at some aggregation options. An obvious one would be to aggregate the individual Category entries to get the total sum by Category. This will provide a similar chart as above but with only 4 entries, one per Category.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*vNOB4nk9jQrPLdrMm5yEvw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*H3AI4JAsWNe2lwZ3GtqCkw.png" /></figure><p>Another interesting way to aggregate would be to look at the Expenses over a certain time period. Let’s use a bar chart for that and look at the difference between showing all expenses with a date vs aggregating for a time period, like every quarter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*IsqzyvIjVzh-0MXf-QNdww.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mx8wjUl5wDZ88WCHGzhWRA.png" /></figure><p>So, in summary, there are several types of aggregations you can use on Charts now; Average, Count, Minimum, Maximum, and Total. And depending on the Group by field you may be able to further organize your data, like by quarter, month, or year, with a Date field.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ebc868c5a7d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/aggregating-data-on-visual-builder-charts-9ebc868c5a7d">Aggregating Data in Charts with Visual Builder — Oracle Cloud</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Working with Visual Builder's Business Object REST API — Part 2: Create, Update, and Delete]]></title>
            <link>https://medium.com/oracledevs/working-with-visual-builder-business-object-rest-apis-part-2-create-update-and-delete-84e16e3ee60b?source=rss-c69fdf3392ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/84e16e3ee60b</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[low-code]]></category>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[visual-builder]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[JT Thomas]]></dc:creator>
            <pubDate>Fri, 08 Sep 2017 01:22:27 GMT</pubDate>
            <atom:updated>2017-09-08T17:58:18.858Z</atom:updated>
            <content:encoded><![CDATA[<p>In <a href="https://medium.com/oracledevs/working-with-visual-builder-business-object-rest-apis-b0be6aad52f3">Part 1</a>, we looked at accessing Visual Builder business object REST APIs. We focused on how to enable access, where to find the endpoints and resource descriptions, and reading the business object with a GET request. In the next part, we’ll look at CREATE, PATCH (update), and DELETE, which take a little extra setup.</p><p>Since GET (read) is a benign operation (meaning no creation or destruction of data), basic authentication is enough to provide access. In general though, for business object access, basic auth is a reasonable approach (compare with OAuth) because these types of operations are generally used for service to service interaction, rather than a specific user interacting with the business object via a user interface on a personal browser client. This means username/password are also generally stored within the backend and not on the client.</p><p>However, since CREATE, PATCH, and DELETE will touch the data and are potentially destructive, an additional requirement is needed to ensure the proper service (and not a hijack from cross-site scripting for example) is making the request. To allow a server to use these functions, Visual Builder needs to be made aware of the origin of the request. First, it must be whitelisted in the Visual Builder Administration page, and second, each request must include an ORIGIN header with the matching URL or IP address.</p><p>As mentioned, first we need to whitelist the service that wishes to make CREATE, PATCH, and DELETE calls. This is found in the Visual Builder Administration page, which is accessed via the hamburger icon at the top right of the service page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*TagTUregd7pFuzqhp8LLfw.png" /></figure><p>Within that Adminsistration page, you will find an Allowed Origins settings pane, in which you can add a new IP or URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cYVxdVcByprQhPf_evzXAQ.png" /></figure><p>Click the New Origin button to add your server IP or base address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*jVk1VCdnvhAVJxxO1xHjjA.png" /></figure><p>Now you can make the POST, PATCH, or DELETE request by adding an Origin header to call that provides the matching IP or base address. The below example cURL for a CREATE call shows the origin IP. It also shows a new argument for the JSON payload that will be sent with POST and PATCH. The auth token has been obscured with “-” for security purposes.</p><pre>curl -i -H &quot;Authorization : Basic anQ-------------------1AQnIw&quot; <br>-H &quot;Content-Type: application/vnd.oracle.adf.resourceitem+json&quot; <br>-H &quot;Origin:http://my.server.com&quot; <br>-d @new_cust.json <br>-X POST <a href="https://abcsdev-fsma.builder.us.oraclecloud.com/design/TestAppJT/1.0/resources/data/Customer">https://instance-iddomain.builder.us.oraclecloud.com/design/BOsAtREST/1.0/resources/data/Customer</a></pre><p>You may notice a new argument -d in this cURL. -d is uses to specify a data file. new_cust.json is found in the local directory from which I am making the cURL request. The json payload is contains the name : value pairs for the new Customer entry. Below is an example JSON body for this business object.</p><pre>{</pre><pre>     &quot;name&quot;: &quot;New Company&quot;<br>     &quot;state&quot;: &quot;NY</pre><pre>}</pre><p>For an UPDATE, the cURL looks almost identical, except it uses a PATCH command instead of POST and only the fields that will be updated should be in the JSON payload. Finally, you must specify which Customer by using the ID in the URL (which represents the primary key).</p><pre>curl -i -H &quot;Authorization : Basic anQ-------------------1AQnIw&quot; <br>-H &quot;Content-Type: application/vnd.oracle.adf.resourceitem+json&quot; <br>-H &quot;Origin:http://my.server.com&quot; <br>-d @new_cust.json <br>-X PATCH <a href="https://abcsdev-fsma.builder.us.oraclecloud.com/design/TestAppJT/1.0/resources/data/Customer">https://instance-iddomain.builder.us.oraclecloud.com/design/BOsAtREST/1.0/resources/data/Customer</a>/1</pre><p>And for DELETE, no payload is required but you must again specify which row will be deleted by including the primary key in the resource endpoint.</p><pre>curl -i -H &quot;Authorization : Basic anQ-------------------1AQnIw&quot; <br>-H &quot;Content-Type: application/vnd.oracle.adf.resourceitem+json&quot; <br>-H &quot;Origin:http://my.server.com&quot; <br>-X DELETE <a href="https://abcsdev-fsma.builder.us.oraclecloud.com/design/TestAppJT/1.0/resources/data/Customer">https://instance-iddomain.builder.us.oraclecloud.com/design/BOsAtREST/1.0/resources/data/Customer</a>/1</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84e16e3ee60b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/working-with-visual-builder-business-object-rest-apis-part-2-create-update-and-delete-84e16e3ee60b">Working with Visual Builder&#39;s Business Object REST API — Part 2: Create, Update, and Delete</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Working with Visual Builder business object REST APIs]]></title>
            <link>https://medium.com/oracledevs/working-with-visual-builder-business-object-rest-apis-b0be6aad52f3?source=rss-c69fdf3392ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0be6aad52f3</guid>
            <category><![CDATA[low-code]]></category>
            <category><![CDATA[visual-builder]]></category>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[JT Thomas]]></dc:creator>
            <pubDate>Sat, 02 Sep 2017 01:11:49 GMT</pubDate>
            <atom:updated>2017-09-08T01:24:07.120Z</atom:updated>
            <content:encoded><![CDATA[<p>In Visual Builder Cloud Service, your business objects are accessible via REST. This blog demonstrates how to use those REST APIs from an external source using cURL command-line tool.</p><p>As a reminder, business objects (BOs) in Visual Builder are a set of fields upon which users may perform CRUD (Create-Read-Update-Delete) operations. Usually, those CRUD operations are performed within an Visual Builder generated User Interface form. However, external services may also call upon those BOs using REST. For example, a Process Cloud Service (PCS) process may need to update a BO after a process is complete, like changing a status field from “requested” to “approved.”</p><p>First, let’s define a simple business object within the Visual Builder data designer. This business object is called Customer and contains two fields: Name and State.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t-D-CxG50peuoXepWnPJ6w.png" /></figure><p>Let’s add a few rows of data by running the app and entering some new Customers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pbehTBWpq8TyJn7zIl23gQ.png" /></figure><p>One more setting in Visual Builder and we can access these objects remotely. In the Applications &gt; Security page, set the Enables basic authentication for business object REST APIs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*CwEVUizpTkfLy9WoyL-yrA.png" /></figure><p>Now let’s use an external tool to access the REST APIs. For illustration, I will use curl from a MacOSX terminal command line. First we need to know the endpoint for the API call. This can be found in the Application &gt; General page under the Catalog API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D_Nx3QJI0sN1c3uClx53iw.png" /></figure><p>Since this app is in Development we will select the top URL which contains the describe file and will give us the endpoints.</p><p><a href="https://oracleabcs1-abcspoc.builder.us.oraclecloud.com/design/BOsAtREST/1.0/resources/data/describe?metadataMode=minimal">https://oracleabcs1-abcspoc.builder.us.oraclecloud.com/design/BOsAtREST/1.0/resources/data/describe?metadataMode=minimal</a></p><p><strong>Part 1: The Resource endpoints and GET request</strong></p><p>The curl request requires a Basic header with the base64 encoded username:password of the a user with the Authenticated User role. An additional header which sets the Content-Type to application/vnd.oracle.adf.resourcesitem+json is also required.</p><p>The below screenshot, shows the request and output. (Portions of the user token has been obscured for security).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hkhe2e8WlEmNKWnELtMZGQ.png" /></figure><p>In this output, we see a resource called Customer. If we were to call that describe endpoint we would see the fields and action allowed as well. But more importantly, we can figure out the endpoint for our BO with this output.</p><p><a href="https://oracleabcs1-abcspoc.builder.us.oraclecloud.com/design/BOsAtREST/1.0/resources/data/Customers">https://oracleabcs1-abcspoc.builder.us.oraclecloud.com/design/BOsAtREST/1.0/resources/data/Customers</a></p><p>Call the same GET request against this endpoint and the response will contain all of the rows of data within that business object. To look at just one of the rows, add the primary key, which is the id of that row after the BO endpoint.</p><p><a href="https://oracleabcs1-abcspoc.builder.us.oraclecloud.com/design/BOsAtREST/1.0/resources/data/Customers">https://oracleabcs1-abcspoc.builder.us.oraclecloud.com/design/BOsAtREST/1.0/resources/data/Customers</a>/2</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*gforaYyjS5sIRrFfl6wLDQ.png" /></figure><p><a href="https://medium.com/@jtoracle/working-with-visual-builder-business-object-rest-apis-part-2-create-update-and-delete-84e16e3ee60b"><strong>Part 2: Create, Updating, and Deleting operations on the business object</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0be6aad52f3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/working-with-visual-builder-business-object-rest-apis-b0be6aad52f3">Working with Visual Builder business object REST APIs</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>