Functions
Create customized functions to customise your workflows
Introduction to Functions
Functions in DBSync Cloud Workflow are reusable components that allow users to execute specific operations within their integration processes. They help streamline workflows by reducing redundancy and enabling efficient data processing. Functions can be leveraged to transform, manipulate, and validate data as it moves between different applications.
User-Defined Functions
User-Defined Functions (UDFs) allow users to create custom functions from the ground up, tailored to their specific integration needs. Unlike built-in functions, which come pre-configured within DBSync, UDFs provide flexibility by letting users define their own logic and processing rules.
Key Features of User-Defined Functions
Customization – Users can write their own functions to handle specific data operations.
Reusability – Once created, functions can be used across multiple workflows.
Scalability – Supports complex logic for handling large-scale data transformations.
Integration Support – Functions can process data from both cloud and on-premise applications.
Creating a User-Defined Function
All User Defined Functions have to be followed with the header "//@UserDefined" for DBSync to recognize it as User Defined Function. When done so, it is populated in the UserDefined list of the Mapping page.
Navigate to the Functions section within DBSync Cloud Workflow.
Click on Create New Function.
Define the function name and input parameters.

Write the function logic using the provided scripting language.
Save and test the function to ensure proper execution.
Deploy the function within a workflow to automate data processing.
Example 2
The following Example helps a user to define the color priority. Below is the code snippet of a User Defined Function and, Test method to execute it .
Example 3
The following Example 3 explains using user defined functions and public functions and calling public functions from user defined functions, below is the code snippet of a user defined function and Test method to execute it.
Testing Functions
To test a User Defined Function, it has to be accompanied by a method generally started with header "//@Test". The user must save the created Function before testing it.
The following code snippet shows the Test method required to test the User defined function for name:
Code
Testing
The following screen shows the User Defined Function along with Test method required to execute it.
After writing the Test method, immediately after the UDF, it is best a practice to Save. The Save button is located at the top right corner of the page .
Here, a user is prompted to select the available Test Methods in a pop-up. As a result, s/he can select the appropriate name and click on "Run Tests" button.
Finally, the number of code lines executed is shown on the Top ribbon.

Last updated