Skip to main content

Quickstart Guide

Get up and running with Wolf DSL in under 10 minutes. This guide will walk you through creating, validating, and running your first Wolf DSL flow.

Prerequisites

Before you start, ensure you have:

  • Java 8+ installed
  • Maven 3.6+ or Gradle 6+
  • Your favorite IDE (VS Code, IntelliJ IDEA, or Eclipse)

1. Project Setup

Create a new directory for your Wolf DSL project:

mkdir my-wolf-project
cd my-wolf-project

Create a pom.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.example</groupId>
<artifactId>my-wolf-project</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>

<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<wolf.version>1.0.0</wolf.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>com.intuit.dsl.flow</groupId>
<artifactId>wolf-maven-plugin</artifactId>
<version>${wolf.version}</version>
<configuration>
<flowDirectories>
<param>src/main/resources/flows</param>
</flowDirectories>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

2. Create Your First Flow

Create the flow directory:

mkdir -p src/main/resources/flows

Now create your first Wolf DSL flow at src/main/resources/flows/hello-world.flow:

// hello-world.flow - Your first Wolf DSL flow

// Define the data structure
Schema Greeting {
string message
string name
number timestamp
}

// Create static data
value helloData -> Greeting {
message: "Hello"
name: "Wolf DSL"
timestamp: 1640995200000
}

// Transform the data
Mapping greetingTransform input helloData output Greeting {
Greeting.message = helloData.message + ", " + helloData.name + "!"
Greeting.name = "Transformed: " + helloData.name
Greeting.timestamp = ${currentDate("ms")}
}

// Define the main flow
Flow helloFlow {
Start helloData {
transition {
greetingTransform
}
}
greetingTransform {}
}

3. Validate Your Flow

Run the validation to ensure your flow is syntactically correct:

mvn compile

If everything is correct, you should see a successful build. If there are syntax errors, the build will fail with helpful error messages.

4. Understanding Your Flow

Let's break down what your hello-world.flow does:

Schema Definition

Schema Greeting {
string message
string name
number timestamp
}

Defines the data structure with three fields.

Static Data

value helloData -> Greeting {
message: "Hello"
name: "Wolf DSL"
timestamp: 1640995200000
}

Creates a static data instance following the Greeting schema.

Data Transformation

Mapping greetingTransform input helloData output Greeting {
Greeting.message = helloData.message + ", " + helloData.name + "!"
Greeting.name = "Transformed: " + helloData.name
Greeting.timestamp = ${currentDate("ms")}
}

Transforms the input data by:

  • Concatenating message and name with punctuation
  • Adding a prefix to the name
  • Setting timestamp to current time

Flow Control

Flow helloFlow {
Start helloData {
transition {
greetingTransform
}
}
greetingTransform {}
}

Defines the execution path: start with helloData, then transition to greetingTransform.

5. Next Steps

Congratulations! You've created your first Wolf DSL flow. Here's what to explore next:

Learn Core Concepts

Try More Examples

Set Up Your IDE

Advanced Topics

Common Issues

Build Fails with "Grammar not found"

Make sure your flow files are in the correct directory structure and use the .flow extension.

Syntax Errors

Wolf DSL is whitespace-sensitive. Ensure proper indentation and check for missing brackets or semicolons.

IDE Not Recognizing .flow Files

Install the appropriate Wolf DSL plugin for your IDE. See the Installation Guide for IDE setup details.


You're now ready to start building powerful workflows with Wolf DSL! The declarative syntax makes it easy to express complex business logic while the runtime handles all the performance optimization for you.