System Hyperon makes possible to define different kinds of different meanings scripts. All functions have one thing in common, they always return value. In opposite to parameters end value is not defined directly by matrix of value, but set by running (especially calculating) function and getting the result.

Tutorial: Hyperon Concepts: Functions.

Function list #

To see all functions in library in main toolbar select Parameterization and Functions.

Possible operations on functions:

  • new function - creates new function
  • import - requires XLSx file with correct function definition
  • Mark from file - require loading txt file with names of functions, those which are in the file and on the environment will be checked on the functions list
  • Compare with extract - require extracted file, makes a comparison between file and the environment, gives an information which element are the same, which changed and which are only in file or only on the environment.

Actions which are available if any function is selected (checkbox checked):

  • Mass export to XLSx - creates zip file with multiple functions (first user must check functions for export)
  • Codes export - exports txt file with names of the functions
  • Extract - creates extract file, including names of functions and timestamp of last edition
  • Assign Region - ascribes functions to region and version, possible for multiple functions only if non of them is already assign to region
  • Detach Region - deletes ascription to region and version
  • Set tag - allows mark with tag multiple functions at once
  • Remove - deletes all checked functions

Filter function (on top of the list) is an operation that extracts from the list of functions those which are in limits of specified filter criterion. Filter form has three fields :

  • Last publish from,
  • Last publish to
  • Modified by.

Below you will learn how to define and edit functions.

Tutorial: Calling function.

Operations on many records

There is an option to act on many functions at the time, but there are limited options to choose from. Firstly on list of function check checkbox (on left side of every function) for those you want to act on. Then click on swipe menu in top right corner. There are few more options that weren’t available earlier:

  • Mass export to XLSx
  • Codes export- export function unique code (.txt format)
  • Extract functions
  • Assign to region (more about regions in the Chapter 8.2)
  • Detach regions
  • Set categories (more in Chapter 4.4)
  • Remove- delete selected functions

Mass export to XLSx

Using this operation is also possible for one function. Exports functions to .zip file. After clicking file will be created and may be downloaded. Inside that file are files type .js with functions bodies and parallel of functions in XLSx file.

XLSx parallel file has only one fold 'Data' with table built from six columns:

  • name,
  • type,
  • function,
  • function_args – function arguments,
  • categories,
  • region.

Those columns are filled with basic information about selected functions accordingly to definition in Hyperon application.

Extract functions

Creates a XLSx file with three columns table: 'Code', 'SHA', 'Region'.

Function type #

For now there are two type of functions will be dealing with:

  • Rhino
  • Groovy (recommended)

Choice is up to user, there are no limits in using any of those types, the difference is only in programming language. Rhino was used in the past and it is still supported but, considering programmers preferences, we recommend using Groovy.

Add new function  #

Go to Parameterization, Functions and from toolbar chose Import XLSx file to add function or click

Then screen will show where new function should be defined.

Any time you may decide to cancel your changes by "Cancel" button (and cancel every change made after last save of the function)

Or you can save changes

As always, obligatory is to give some basic information like name (code of function should be unique) of the function and select a type: rhino or groovy. Then optionally choose Region and set tags.

Beside those, there are three sections to be use:

  • Arguments - to define every argument from the outside of function, that is going to be use in it
  • Tester - allows to run trial function in safe environment
  • Action Console (with operations: [Execute] and [Clear console]) shows latest actions from tester
  • Code console

While making new argument have to give it a name and declare type- choose from:

  • Boolean ( Yes / No, 1 / 0, True / False, Tak / Nie ) for logic values
  • Integer for numbers
  • BigDecimal – java BigDecimal (rounding values) for decimal numbers
  • Java.util.Date –data format
  • String – letters and signs
  • Java.lang.Object for any other cases

Any kind of argument may be declare inside Java.lang.Object and change any time inside function. To add new argument to function click button "+ Argument".

Editing existing function  #

To make changes in existing function click on chosen function name, on the functions list, and in it top right corner chose operation 'edit' :

Then provide any changes it’s necessary, using instruction from the subchapter Add new function.

Function editor operations  #

As it was before, user still can Edit, Pin and Clone function as still may look into History or in roll down menu, in the right corner, there is a possibility to edit name, Export to XLSx, Assign region and Remove (delete). What's more there is a possibility to change Console theme which allows you to set different coloristic of console: