Sunday, June 4, 2017

Oracle Planning & Budgeting Cloud June 2017 Update! Groovy Scripting!

It's been a while since I last wrote, I've been doing a rigorous  running program for the past couple of months in order to prepare for an ultra-marathon, and as a result I end up very tired after finishing work and my daily run! I'll try and get back to writing more frequently!

I've been waiting (like so many of you) for the latest PBCS/EPBCS June release on Test environments to play around with the latest features! Oracle published the list of updates here June 2017 Release,,, for me the thing that caught my attention is the introduction of Groovy scripting in Calculation Manager, the first one to write and elaborate on that was Celvin.

So today I finally got to play around with the feature and did write a very simple "Hello World" kind of script just to test and it was really fun!

So now you can go "Rules" under "Create and Manage", create a new script, switch to Script mode, on the right side next to Jump to line you have Script Type as shown below.


Now, I copied one of EPBCS's pre-built Groovy scripts and changed it to simply return an error message to indicate whether the rule was executed from the "Rules" launcher or the "Dataform" business rules launcher. Here is the script



The script is very simple, it will first check if there is a data grid from which this script is triggered and return a simple message. In order to execute a set of commands you need to use Groovy return function either in the simple way shown above, or by using a StringBuilder. I have yet to look at the Groovy documentation that should be part of the new release, it should describe in details the available functions and methods etc.

So now, I'll go and run the rule from "Rules" launcher



I'll get the following message...(The same concept is already applied in some of the pre-built EPBCS rules)



And If I run the rule from a dataform (any dataform)...



I'll get..



So it's officially here, Groovy scripting in the cloud! It's been there for a while for on-premise Planning, so it's really exciting to have it in the cloud.

Now we have a glimpse of the future of scripting, exciting times ahead :)



2 comments:

  1. Great stuff. Thanks for pointing this out. Groovy is a powerful scripting language and I am very curious on how it can be used. The small notes in the June 2017 update point to data validation in the form, so I guess the Groovy rule only applies to the "client" part and not to the server part. I can not wait to have a look for myself.

    Keep posting this good material!

    ReplyDelete
    Replies
    1. Thanks Arthur! It is definitely powerful! I'll write another post which shows how it can be used in specific focused calculations which in my opinion is super cool!

      Delete