Ruby SDKFeature Clients

CEL Client

CEL client for debugging CEL expressions within Hatchet.

This class provides a high-level interface for testing and debugging CEL (Common Expression Language) expressions used in filters and conditions.

result = hatchet.cel.debug(
  expression: 'input.value > 10',
  input: { value: 15 }
)
if result.result.status == 'success'
  puts "Output: #{result.result.output}"
else
  puts "Error: #{result.result.error}"
end

It is available on the main client as hatchet.cel.

Methods:

NameDescription
debugDebug a CEL expression with provided input and optional metadata.

Functions

debug

Debug a CEL expression with provided input and optional metadata.

Useful for testing and validating CEL expressions and debugging issues in production.

result = hatchet.cel.debug(
  expression: 'input.count > 5 && metadata.env == "prod"',
  input: { count: 10 },
  additional_metadata: { env: 'prod' }
)

Parameters:

NameTypeDescriptionDefault
expressionStringThe CEL expression to debug.required
inputHashThe input, which simulates the workflow run input.required
additional_metadataHash | nilAdditional metadata simulating metadata sent with an event or workflow run.nil
filter_payloadHash | nilThe filter payload simulating a payload set on a previously-created filter.nil

Returns:

TypeDescription
CELEvaluationResultA result containing either a CELSuccess or CELFailure.

Raises:

TypeDescription
RuntimeErrorIf no response is received from the CEL debug API.
HatchetSdkRest::ApiErrorIf the API request fails.

Last updated on August 24, 2026

On this page