

The information in context.log is used for debugging purpose. We can get the values added inside "log" key of a java function output map.

Using the basicIO.getParameter statement you will be able to obtain the values that are contained as arguments. If there are 20 records in the form, the 20 together become one collection object enabling the java function to be executed for the 20 records in one function call. The collection object will include the employee ID (key) and the hours (value). This collection object allows you to make a loop to execute this function for all the records that are there in the form.
Create a java library update#
When the assigned collection data value is used in deluge these string values yield integer values that are used to update records in the application. For instance, the pay calculated in java function will return string values. It can be used for further processing like updating records with the values derived using the java function. If you require any other data type like integer, you can assign collection data type to your return value. If your process is satisfied with the string data returned, you can go ahead with it. Java function returns a string value only. To call a java function in a deluge script, you need to use the statement indicated in the image below. In this example, “pa圜alc = thisapp.calculateSalary(recDetails.toString()) ” refers to the java function, which contains the value as collection data value. If a user wants to write a new class or function, it needs to be written after the runner method and called from the runner method.Execution begins with the runner method, and it should not be removed.By default, the function and the class name are the same, and should be not be changed.By iterating pa圜alc value, we can update "Weekly_Pay" field with salary detail. We have assigned java function return value to "pa圜alc" collection data in deluge function. This function is created to calculate each employee's pay in java function and use the values obtained to update records using deluge.įetchRecords will create a collection data that contains each record in Employee_Details form in format. It serves as the container in which the argument value passed from deluge is received in a java function. A parameter is the variable assigned for the value of an argument. To run a program, you need to define parameters in java functions. If you have the necessity to add more arguments to the same function at a later stage, you can access the Function Properties in the builder (click the Settings icon). At the event of creating a java function, you can specify an argument. An argument is the instance that is passed to the method on running a function. Similar to deluge function, java also requires you to specify arguments based on which your function runs. Java functions cannot be renamed after creation.Īrguments and parameters in java functions.Argument: Java functions accept only string values.Return Type: Return value of a java function will only be of Collection data type.

Create a java library code#

Java is a widely used programming language. A function is a set of statements that is invoked in an application to perform a certain action or yield a desired result based on the logic in the code.
