--- title: "Execute Circuit" url: https://docs.catalyst.zoho.com/en/sdk/java/v1/serverless/circuits/execute-circuit/ description: "This page describes the method to make use of circuits to organize and orchestrate tasks in your Java application with sample code snippets." last_updated: 2025-11-19T15:07:41Z service: Serverless type: general related_links: - name: "Execute Circuit - API" url: /en/api/code-reference/serverless/circuits/execute-circuit/#ExecuteCircuit - name: "Circuits" url: /en/serverless/help/circuits/introduction --- # Execute a Circuit [Catalyst Circuits](https://docs.catalyst.zoho.com/en/serverless/help/circuits/introduction) allow you to define, organize, and orchestrate a sequence of tasks to be carried out automatically. You can enable concurrent or sequential executions of Catalyst functions in a circuit, and additionally include conditions, data, and paths in it and automate the workflow. > **Note:** Circuits is currently not available to Catalyst users accessing from the EU, AU, IN, JP, SA or CA data centers. The sample code below illustrates executing a circuit by referring to its unique Circuit ID and passing key-value pairs as the input JSON to the circuit. It also illustrates obtaining the circuit's execution details by referring to its unique `Execution ID` saved in the execution history of the circuit. `ZCCircuitDetails` is used to refer to the circuit, and `ZCCircuitExecutionDetails` returns the circuit execution details. #### Sample Code Snippet **Package Imports** ```java import org.json.simple.JSONObject; import com.zc.component.circuits.ZCCircuit; import com.zc.component.circuits.ZCCircuitDetails; import com.zc.component.circuits.ZCCircuitExecutionDetails; import com.zc.component.circuits.ZCCircuitExecutionStatus; ``` ```java //Executes the circuit by referring to its Circuit ID and passes the input JSON ZCCircuitDetails userBackupCircuit = ZCCircuit.getInstance().getCircuitInstance(1239000000L); JSONObject execInputJson = new JSONObject(); execInputJson.put("key", "value"); ZCCircuitExecutionDetails circuitExecution = userBackupCircuit.execute("Case 1",execInputJson); String executionId = circuitExecution.getExecutionId(); //Returns the Execution ID //Returns the circuit's execution details by referring to the Execution ID of the circuit. //You can write your own success logic here. ZCCircuitDetails userBackupCircuit = ZCCircuit.getInstance().getCircuitInstance(1239000000L); ZCCircuitExecutionDetails circuitExecution = userBackupCircuit.getExecutionDetails(executionId); if(circuitExecution.getStatus().equals(ZCCircuitExecutionStatus.SUCCESS)) { //Success logic } //Aborts the circuit execution by referring to the Execution ID of the circuit ZCCircuitDetails userBackupCircuit = ZCCircuit.getInstance().getCircuitInstance(1239000000L); userBackupCircuit.abortExecution(executionId); ```