Skip to main content
The Transform By JDM command (Command Type: 1017) transforms the current data into a new object by applying JDM (JSON Decision Model) mapping rules. It supports optional state usage during transformation.

Overview

The Transform By JDM command provides functionality for:
  • Applying complex mapping rules defined in a JDM JSON object
  • Transforming input data into a completely different output structure
  • Optionally leveraging state from the execution context during transformation

Command Type

Command Type ID: 1017

Parameters

ParameterTypeDescriptionRequired
jdmobjectThe JSON object containing the JDM mapping rules for transforming the dataYes
timeoutnumberThe timeout for the command in millisecondsYes
useStatebooleanIf true, uses the current execution state during transformation. Defaults to falseNo

Usage Examples

Basic Field Mapping

{
  "command": "transform-by-jdm",
  "params": {
    "jdm": {
      "nodes": [],
      "edges": []
    },
    "timeout": 5000
  }
}

Transform with State

{
  "command": "transform-by-jdm",
  "params": {
    "jdm": {
      "nodes": [],
      "edges": []
    },
    "timeout": 10000,
    "useState": true
  }
}

JDM Structure

The jdm object follows the gorules/zen JSON Decision Model format — a graph of nodes and edges describing transformation logic. Refer to the gorules/zen documentation for the full JDM specification.

Common Use Cases

  • Complex Transformations: Apply non-trivial multi-field transformation logic in one step
  • Rule-Based Mapping: Use decision model rules to conditionally map data
  • State-Aware Transforms: Include execution state context in the transformation