--- title: "Execute Function" url: https://docs.catalyst.zoho.com/en/sdk/java/v1/serverless/functions/execute-function/ description: "This page describes the method to execute functions in your Java application with sample code snippets." last_updated: 2025-11-19T15:07:41Z service: Serverless type: general related_links: - name: "Execute Function - API" url: /en/api/code-reference/serverless/functions/execute-function/#ExecuteFunction - name: "Functions" url: /en/serverless/help/functions/introduction --- # Execute function The function group in Catalyst is created and defined using either the online editor or the Command Line Interface (CLI). The function group can be executed to verify its functionality. ### Execute Function If a function endpoint is needs to be executed, then the following code snippet can be used. Here, the function's parameters are constructed as JSON objects and passed through the `executeFunction()` method. The `function ID` is an auto-generated numeric long integer value. #### Sample Code Snippet **Package Imports** ```java import org.json.simple.JSONObject; import com.zc.functions.ZCatalystFunction; ``` ```java //Create a JSONObject For Adding Parameters JSONObject jsonobj = new JSONObject(); //Add Parameters as key-value pairs to pass them to the method jsonobj.put("Name", "Amelia"); //Execute the method referring the function groupId with the JSON object Object result = ZCatalystFunction.getInstance().getFunctionInstance(1510000000054095L).executeFunction(jsonobj); ``` > **Note:** You can also pass the function name as a string to the `getFunctionInstance()` method instead of using the function ID.