Operator Catalogue

Cameleon ships with 13 operators across three standard libraries. This page is the functional reference — what each operator does, what it expects, what it produces.

For implementation details (run/rollback signatures, code), see the technical docs in doc/architecture/libs/.


Overview

OperatorLibraryDescriptionInputsOutputsFiringConfig
Sourcestd-ioEmits a static configured valueout_data DataStringANYvalue
Sinkstd-ioConsumes data (terminal output)in_data DataStringANY
FileLoaderstd-ioLoads a file via browser dialogout_data BinaryANYaccept
Forkstd-structDuplicates input to two outputs (AND-split)in_data Anyout_a out_b AnyANY
Joinstd-structWaits for all inputs, passes first through (AND-join)in_a in_b Anyout_data AnyALL
Mergestd-structFirst arrived passes through (XOR-join)in_a in_b Anyout_data AnyANY
Gatestd-structRoutes input based on a boolean condition (XOR-split)in_data Any, in_condition DataBoolout_true out_false AnyCOND
Barrierstd-structWaits for all inputs, routes each to paired outputin_a in_b Anyout_a out_b AnyALL
Transformstd-dataConverts any data to stringin_data Anyout_data DataStringANY
Formatstd-dataConcatenates two strings with separatorin_main in_meta DataStringout_data DataStringALLseparator
JSONParsestd-dataParses a JSON string into an objectin_data DataStringout_data DataJSONANY
JSONStringifystd-dataSerializes an object to JSON stringin_data DataJSONout_data DataStringANYpretty
Templatestd-dataReplaces {{key}} placeholders with valuesin_template DataString, in_data DataJSONout_data DataStringALL

Firing policies : - ANY — fires when at least one input is NEW (or no inputs for sources) - ALL — fires when all inputs are NEW - COND — fires when a custom condition is met (see operator details)


I/O — std-io

Entry and exit points of a pipeline. Data sources and sinks.

Source

Emits a static value configured in advance. This is the most common entry point of a composition — it injects an initial value into the pipeline without receiving anything.

No inputs — Source fires when all its outputs are EMPTY (ready to receive).

OutputTypeLabel
out_dataDataStringdata

Config

ParameterTypeDefault
valuestring"Hello from Source"

Sink

Consumes data and logs it. This is the terminal output of a pipeline — nothing comes out of a Sink. Use it to observe results in the CVM Log.

InputTypeLabel
in_dataDataStringdata

No outputs, no config.


FileLoader

Opens a file picker dialog and loads the selected file as binary data. Browser only — does not work in CLI mode. Async: the operator stays in RUNNING state until the user selects a file.

Supports cancellation via the CVM abort signal.

No inputs — FileLoader fires like a source.

OutputTypeLabel
out_dataBinarydata

Config

ParameterTypeDefault
acceptstring (MIME filter)"/"

Control Flow — std-struct

Routing, merging, and synchronization. Pure token routing — no data transformation. All plug types are Any, meaning they accept any data type.

Aligned with standard workflow patterns (van der Aalst, WCP).

Fork

Duplicates a single input to two outputs. Both branches receive the same data. This is the AND-split pattern (WCP-2): all branches are activated.

InputTypeLabel
in_dataAnydata
OutputTypeLabel
out_aAnyA
out_bAnyB

Firing : ANY — fires as soon as in_data is NEW.


Join

Synchronization barrier — waits for both inputs before producing output. Passes in_a through to out_data; in_b is consumed but its value is discarded. This is the AND-join pattern (WCP-3).

InputTypeLabel
in_aAnyA
in_bAnyB
OutputTypeLabel
out_dataAnydata

Firing : ALL — fires only when both in_a AND in_b are NEW.


Merge

First-arrived passes through. If both inputs arrive simultaneously, in_a has priority. This is the XOR-join pattern (WCP-5): only one branch is consumed per firing.

InputTypeLabel
in_aAnyA
in_bAnyB
OutputTypeLabel
out_dataAnydata

Firing : ANY — fires as soon as at least one input is NEW.


Gate

Conditional routing — examines a boolean condition and routes the input data to one of two outputs. This is the XOR-split pattern (WCP-4).

InputTypeLabel
in_dataAnydata
in_conditionDataBoolcondition
OutputTypeLabel
out_trueAnytrue
out_falseAnyfalse

Firing : COND — custom rule: fires only when both in_data AND in_condition are NEW. This is stricter than ALL because Gate uses a canFire() override.

Routing rule : if in_condition is truthy, data goes to out_true; otherwise to out_false. The unused output stays EMPTY.


Barrier

Synchronized passthrough — waits for all inputs, then routes each to its paired output. This is equivalent to Join + Fork but preserves the identity of each input: in_a goes to out_a, in_b goes to out_b.

Extension Cameleon — no standard WCP equivalent.

InputTypeLabel
in_aAnyA
in_bAnyB
OutputTypeLabel
out_aAnyA
out_bAnyB

Firing : ALL — fires only when both in_a AND in_b are NEW.


Data — std-data

Data transformation and formatting. Converts, formats, parses, and templates data flowing through the pipeline.

Transform

Converts any data to a string representation. Simple type conversion — equivalent to calling String(value).

InputTypeLabel
in_dataAnydata
OutputTypeLabel
out_dataDataStringdata

Firing : ANY.


Format

Concatenates two strings with a configurable separator. Useful for building labels, log lines, or display strings from two parts.

InputTypeLabel
in_mainDataStringmain
in_metaDataStringmeta
OutputTypeLabel
out_dataDataStringdata

Firing : ALL — waits for both inputs.

Config

ParameterTypeDefault
separatorstring`" \"`

JSONParse

Parses a JSON string into a structured object. If the input is not valid JSON, the operator transitions to FAILED state.

InputTypeLabel
in_dataDataStringdata
OutputTypeLabel
out_dataDataJSONdata

Firing : ANY.

Error : FAILED if input is not valid JSON.


JSONStringify

Serializes a structured object to a JSON string. Optionally formats with indentation for readability.

InputTypeLabel
in_dataDataJSONdata
OutputTypeLabel
out_dataDataStringdata

Firing : ANY.

Config

ParameterTypeDefault
prettybooleanfalse

When pretty is true, the output is indented with 2 spaces.


Template

String interpolation — replaces {{key}} placeholders in a template string with values from a JSON object. Missing keys are replaced with an empty string.

InputTypeLabel
in_templateDataStringtemplate
in_dataDataJSONdata
OutputTypeLabel
out_dataDataStringdata

Firing : ALL — waits for both the template and the data.

Example : template "Hello {{name}}" + data {"name": "Alice"}"Hello Alice".