Skip to content

Reference: workflow-definition operations

Every operation kind available inside workflowDefinition { } and the DSL builder for each. For the conceptual overview, see concepts: workflow definition.

All operations descend from AbstractOperationDefinition and have common fields: operationName (unique within the workflow), operationLabel (UI-visible), operationDoc (optional help text), inputData (list of data references the operation reads), and outputData (list of data references the operation produces).

Method operation

Calls a method declared in dependencies. The method's auto-generated DSL function is the entry point; arguments mirror the method's data interface.

nativeTest(
    solverLog = solverLog,         // workflow output ref bound to the method's "solverLog" output
) {
    executionControl = configValueModel.execution     // method config ← workflow config
    solverLog        = configValueModel.solverLogConfig
}

The function name is camelCase from the method's id (simscale.test:native-test:1.0.0 → nativeTest). Outputs are named arguments; configuration is the trailing-lambda body.

Underlying type: MethodOperationDefinition.

Inline operation

A computation expressed as a value-model lambda — no method call.

operation(
    operationName  = "double_length",
    operationLabel = "Double the length",
    operationDoc   = "…",
    inputData      = listOf(inputLength),
    outputData     = listOf(outputLength),
) {
    mapOf(outputLength to (configValueModel.factor * inputLength.value))
}

The lambda body returns a Map<DataReference, Value> — for each output ref, the value-model expression that produces it. The platform evaluates the expression directly.

Underlying type: InlineOperationDefinition.

Nested workflow operation

Invokes another workflow type as if it were a method.

testInlineOperations(
    result = innerResult,
) {
    edgeLength = configValueModel.edgeLength
}

Function name is camelCase from the workflow type's id. Like a method operation but the underlying call is a child workflow run rather than a method invocation.

Underlying type: NestedWorkflowOperationDefinition.

Operation group

Groups several operations as a single named unit.

operationGroup("preprocess") {
    operation(/* … */)
    nativeTest(/* … */)
    nativeTest(/* … */)
}

The group itself doesn't compute anything — it's structural. Visible in SimKit Web UI as a collapsible parent in the operation tree.

Underlying type: OperationGroupDefinition.

Operation group with condition

Like operationGroup, but the body executes only if a condition holds. Requires analysisStrategy = DYNAMIC at workflow level.

operationGroupWithCondition(
    "optional_remesh",
    condition = configValueModel.refineMesh equal true.asValueModel(),
) {
    nativeTest(/* the remesh step */)
}

If the condition is false at run time, the body is skipped; data that would have flowed through skipped operations needs alternative sources for downstream consumers.

Underlying type: OperationGroupWithConditionDefinition.

Operation group with parameter

Iterates over a list-typed parameter and executes the body once per element. Requires analysisStrategy = DYNAMIC.

operationGroupWithParameter(
    "sweep_edge_length",
    parameter = configValueModel.edgeLengths,
) { currentEdgeLength ->
    nativeTest(/* … */) {
        edgeLength = currentEdgeLength
    }
}

The parameter is a ValueList<T>; the lambda receives one value of type T per iteration. Use cases: parametric sweeps, optimization loops, sensitivity analysis.

Groups can nest. An inner group's list may come from the enclosing group's value (for example, the speeds of the current load condition): it is evaluated separately for each enclosing value, so the body runs only for the combinations that belong together. A condition group inside a parameter group is evaluated per value the same way.

An operation inside the group that has no input data (for example a generator that builds a mesh from the configuration alone) still runs once per value, and its configuration reads the current value like any other operation of the group.

Underlying type: OperationGroupWithParameterDefinition.

Atomic operation

Common base for the leaves above. Not directly authored — you write operation(...), nativeTest(...), etc. The type exists for framework-side polymorphism.

Underlying type: AtomicOperationDefinition.

Breakpoint

Pause-point inserted between operations. Not an operation per se — a marker that pauses the workflow run when reached.

breakpoint("after_meshing") {
    label("After meshing")
    doc("Pause to inspect the mesh before solving.")
}

When a run reaches a breakpoint, the workflow run state goes to PAUSED; the user resumes via simkit run resume or from Workbench.

Underlying type: Breakpoint.

Data mapping

Operation inputData and outputData lists reference data by symbol. The symbols come from: - The workflow's dataInterface { } — its own inputs and outputs. - A previous operation's outputs. - A parametric group's iteration parameter.

DataMappingEntry is the underlying type; the framework's data- mapping resolver verifies each input is connected to a producer of the right data type at build time.

Analysis strategy

analysisStrategy {
    WorkflowDefinitionAnalysisStrategy.DYNAMIC   // or STATIC (default)
}

STATIC — graph shape known at parse time. No top-level conditional or parametric groups.

DYNAMIC — graph shape depends on configuration. Required for top-level conditional / parametric groups. The runner re-analyzes the graph when configuration is set.

If you use a conditional or parametric group at top level and forget to flip to DYNAMIC, the build fails with a clear error.

Symbols in scope

Inside workflowDefinition { }: - configValueModel — the workflow's configuration. - A symbol per dataInterface { } entry (input or output), typed to the data type declared. - A method-call function per method dependency (camelCase id). - A nested-workflow-call function per workflow-type dependency. - Schema-DSL and value-model factories for in-line value construction (e.g. MockMeshValueModel.fromDefaults { … }).

Cross-references