In part 1 of this blog, we discussed the basics of risk governance, introduced the SAS Risk Governance Framework solution within SAS Risk Stratum and discussed the user’s ability to customize the solution’s screen definition files. The purpose of this blog is to continue to discuss SAS Risk Governance Framework and the customizable user experience that it offers.
To review, risk governance describes the rules, conventions, processes, and mechanisms by which decisions about risks are taken and implemented. It is inevitable that institutions experience risk (whether planned or unplanned) as a result of their business processes, and with effective risk governance, organizations can benefit from the changes that risk can bring while minimizing the negative consequences.
Groovy Function Editor
Groovy is a programming language that runs on the Java platform but also has features inspired by other programming languages such as Python, Ruby, and Smalltalk. Groovy is simple to understand and maintain, and it integrates seamlessly with all existing Java classes and libraries.
The SAS Risk solution comes with an extensive list of pre-loaded Groovy functions with prewritten code in the Groovy programming language. The solution’s Groovy Function Editor is a user interface (UI) component that enables the user to view or modify the existing Groovy functions or create and test new custom functions that use Groovy. Groovy functions have many uses. They can be used in expressions, to define configurations, as a filter criterion, or to specify UI behavior.
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.
Creating a Groovy Function
As previously mentioned, the solution allows users to use Groovy programming language to create their own Groovy function as well as modify it. Creating a Groovy function lies on the Administration page of the SAS Risk Stratum solution on the Groovy Function Editor tab. On that tab, there is an option to Create new Groovy Function once the Scope is set to rmc-sampl (note: to view all of the pre-loaded Groovy functions, Scope should be set to rmc).
Users can then name their new function before clicking Create. Then, the window displays the Java syntax that defines a custom function. Below is an example of a function that was newly created called DemoTest. You can see the code displayed on the left (highlighted in green), and on the right, the function can be tested by entering an argument and clicking Test, which then displays the results (highlighted in red).
Editing a Groovy Function
Not only can users create a new Groovy function, but they can also edit the function. The screen capture below is a zoomed in view of the code from the screen capture above.
The original code above can be modified to edit the function. In the screen capture below, the highlighted areas in red are where the changes are made.
After making the above changes, there are now two argument fields on the right-hand side rather than one. Once each argument is entered, they are displayed in the Results window at the bottom right.
To Learn More
SAS Risk Governance Framework includes documentation on all the pre-loaded Groovy functions found within a risk solution. This documentation is available on the Function Documentation subtab within the Documentation tab on the Administration page.
To learn more about SAS Risk Governance Framework, visit the e-course available through the SAS Learning Subscription: Course: SAS® Risk Governance Framework: Solution Overview.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.