Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>GoRules JDM EditorNew to Visual Studio Code? Get it now.
GoRules JDM Editor

GoRules JDM Editor

TheCaffinatedDeveloper

|
21 installs
| (0) | Free
VS Code extension for editing GoRules JDM (JSON Decision Model) files with the JDM Editor
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

GoRules JDM Editor for VS Code

A powerful VS Code extension that provides a visual editor for GoRules JDM (JSON Decision Model) files, allowing you to create, edit, and simulate decision models directly within VS Code.

Features

  • Visual JDM Editor: Edit JSON decision models using an intuitive visual interface
  • JSON Mode Toggle: Switch between visual editor and raw JSON editing
  • Integrated Simulator: Test your decision models with custom input data
  • Real-time Preview: See changes instantly as you edit
  • Monaco Editor Integration: Advanced code editing for function nodes
  • Theme Support: Works with both light and dark VS Code themes

Installation

Option 1: Install from VSIX (Recommended for testing)

  1. Download the gorules-vscode-0.0.1.vsix file
  2. Open VS Code or Cursor
  3. Press Cmd+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux)
  4. Type "Extensions: Install from VSIX..."
  5. Select the downloaded .vsix file

Option 2: Install from VS Code Marketplace (Coming Soon)

  1. Open VS Code or Cursor
  2. Go to Extensions (Cmd+Shift+X or Ctrl+Shift+X)
  3. Search for "GoRules JDM Editor"
  4. Click Install

Usage

Opening the JDM Editor

  1. Open any JSON file in VS Code
  2. Use one of these methods to open the JDM Editor:
    • Command Palette: Press Cmd+Shift+P and type "GoRules: Open with JDM Editor"
    • Right-click: Right-click on the JSON file and select "Open with JDM Editor"
    • Editor Button: Click the toggle button in the editor title bar

Using the Visual Editor

The JDM Editor provides a visual interface for creating and editing decision models:

  • Add Nodes: Use the "+" button or drag node types from the palette
  • Connect Nodes: Drag from node outputs to inputs to create connections
  • Edit Properties: Click on nodes to edit their properties
  • Delete Elements: Select nodes/edges and press Delete

Running Simulations

  1. Open the JDM Editor
  2. Click on the "Simulator" panel (bottom of the editor)
  3. Enter your input data in JSON format
  4. Click "Run" to execute the simulation
  5. View the results, performance metrics, and execution trace

Toggling Between Modes

  • Visual Mode: See your decision model as a visual graph
  • JSON Mode: Edit the raw JSON structure directly
  • Toggle: Use the toggle button in the editor title bar or the "GoRules: Toggle Mode" command

Supported Node Types

The JDM Editor supports all standard GoRules node types:

  • Input Node: Define input data structure
  • Output Node: Define output data structure
  • Decision Table: Create rule-based decisions
  • Function Node: Write custom JavaScript functions
  • Expression Node: Create mathematical expressions
  • Switch Node: Create conditional branching
  • And/Or Nodes: Logical operations

Configuration

Default Input Data

You can configure default input data for simulations in VS Code settings:

{
  "gorules.defaultInput": {
    "customer": {
      "country": "US",
      "age": 30
    },
    "order": {
      "amount": 100
    }
  }
}

Examples

Simple Decision Model

{
  "nodes": [
    {
      "id": "input-1",
      "type": "input",
      "position": { "x": 100, "y": 100 },
      "data": {
        "name": "customer",
        "type": "object"
      }
    },
    {
      "id": "decision-1",
      "type": "decisionTable",
      "position": { "x": 300, "y": 100 },
      "data": {
        "name": "calculateDiscount",
        "rules": [
          {
            "condition": "customer.country == 'US'",
            "output": { "discount": 0.1 }
          }
        ]
      }
    },
    {
      "id": "output-1",
      "type": "output",
      "position": { "x": 500, "y": 100 },
      "data": {
        "name": "result"
      }
    }
  ],
  "edges": [
    {
      "id": "edge-1",
      "source": "input-1",
      "target": "decision-1"
    },
    {
      "id": "edge-2",
      "source": "decision-1",
      "target": "output-1"
    }
  ]
}

Requirements

  • VS Code 1.96.0 or later
  • Cursor (compatible)
  • Node.js 18+ (for simulator functionality)

Development

Building from Source

# Clone the repository
git clone https://github.com/your-username/gorules-vscode-extension.git
cd gorules-vscode-extension

# Install dependencies
yarn install

# Build the extension
yarn compile

# Package the extension
yarn package

Project Structure

gorules-vscode/
├── src/
│   ├── extension.ts          # Main extension logic
│   └── webview.js           # Webview React application
├── dist/                    # Compiled extension files
├── media/                   # Static assets
├── package.json             # Extension manifest
└── README.md               # This file

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

License

This extension is licensed under the MIT License.

Support

  • Issues: Report bugs and request features on GitHub
  • Documentation: Visit the GoRules documentation
  • Community: Join the GoRules community discussions

Changelog

0.0.1

  • Initial release
  • Visual JDM editor integration
  • JSON mode toggle
  • Integrated simulator
  • Monaco editor support
  • Theme compatibility

Made with ❤️ for the GoRules community

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft