Posts

Showing posts from March, 2019

OJET: Logging with js-logger

Image
One of the common challenges in Enterprise Application is the the Logging. In Java EE / Jakarta EE you can use Java Logger with one of their famous implementations such us log4j for logging in a file system or database easily and also monitor them using Elastic or other log monitoring tools. How can I log in JavaScript? Obviously it exists the console.log for logging into the BROWSER Console . However, for Enterprise Application we will require to log the information somewhere to be consumed!!!. There are million of Logger modules in NPM For logging in an Enterprise way we are not going to re-invent the wheel. We can use one of the numerous logging modules you can find in NPM :). js-logger: Lightweight, unobtrusive, configurable JavaScript logger as they define it! https://www.npmjs.com/package/js-logger log4js: Yes looks like our famous log4js . It is a very famous implementation. We can format, create our own appenders etc..Much more complete than js-logger. loglevel: h

OJET: Calling a REST Service

During my journey from a pure Java EE / Jakarta EE developer using JAX-RS, JSON-B, Jersey etc...  for Java - REST integration to JavaScript (in this case Oracle JET) I was checking the alternatives of calling REST services from JavaScript. Things has changed a lot since I was doing mostly Vanilla and JQuery JavaScript for some "quick fixes". Here I bring examples of making a GET request to a REST Service. The rest of operations only needs little bit more configuration, but this post is just to have a look into history in JavaScript and ways of calling a REST service (only making a GET, not a POST, PUT or DELETE) If you want to execute the code: https://github.com/DanielMerchan/ojet-examples It is fundamental that you read about JavaScript Promise Object and have a fully understand on it. Vanilla JavaScript < ES6+ Yes, during my career I had to deal with JavaScript in its early stages to make AJAX calls and requests. Basically this makes use of XMLHttpRequest

OJET: Build and Deploy in an Application Server

Image
There are some other sources where an Oracle JET Application is packaged and deployed as a WAR in Oracle WebLogic Application Server (Arda Eralp) https://blogs.oracle.com/ardaeralp/deploy-oracle-jet-application-to-weblogic-server (Andrejus Baranovski's) http://andrejusb.blogspot.com/2016/07/serving-oracle-jet-application-from.html They may look bit old or maybe because they call directly grunt tasks by using the grunt-cli . In this post I will update a bit these posts in Oracle JET 6.1.0 and the usage of ojet build (instead of calling the grunt tasks) for also building the corresponding WAR file. The example can be found in my GIT repository: https://github.com/DanielMerchan/ojet-examples Let's start... Install grunt-war module in your Oracle JET Application. npm install grunt-war --save-dev Create a war.js (or call it whatever you want) in /scripts/grunt/config folder under your souce files. This is a sample code inside of it, check https://www.npmjs.com/packag

BPM: Increase the UX with Active Waiting

Image
Hi, I had some projects in the past where Oracle BPM has been involved and I have been asked many times on how can we improve the experience of Initiating an Asynchronous Process and redirecting Automatically to the first Human Task UI when available The code of this post can be found in my GitHub https://github.com/DanielMerchan/ActiveWaitingDemo Architecture of the Active Waiting Demo The following diagram describes the Architecture of the Demo. 1. The ADF UI Application starts a Asynchronous BPM Process by calling the start asynhronous interface exposed by the BPM Process. 1.a : The First Activity of the BPM Process registers in a CUSTOM database table the Process Info. This information is needed by useful administrative SOA API which is used to retrieve the Audit Trail and other statuses of a BPEL / BPM Process.   Note: The BPM Process has 3 Timer Activities to simulate processing before a Human Task is reached 1.b: The Poller starts first trying to get the