3 min read

Model summary

2roles
1processes
2events
1canvases
root
namespace
HelloWorld
Start1Start1Greet the worldGreet the worldEnd1End1
Canvas: Root

Minimal model

Source file 01-minimal-model.prl

This is the smallest valid Primmel model that contains a real canvas. It exists to show the language’s skeleton with no distractions — no data, no compliance, no branching.

If you read only one example file, read this one. Every larger model extends the patterns here.

The complete file

root HelloWorld

version "v1.0.0-dev1"

metadata {
  title "Minimal Primmel model"
  schema "Primmel 0.1"
  edition "1"
  author "Primmel project"
  shortname "HelloWorld"
  namespace "HelloWorld"
}

role Org {
  name "Organization"
}

role Greeter {
  name "Greeter"
}

start_event Start1 {
}

end_event End1 {
}

process Greet {
  name "Greet the world"
  actor Greeter
}

canvas Root {
  elements {
    Start1 {
      x 0
      y 0
    }
    Greet {
      x 0
      y 100
    }
    End1 {
      x 0
      y 200
    }
  }
  process_flow {
    Edge1 {
      from Start1
      to Greet
    }
    Edge2 {
      from Greet
      to End1
    }
  }
  data {
  }
}

What’s going on

The root declaration names the entry-point canvas. The version identifies this model revision. The metadata block gives tooling what it needs: schema "Primmel 0.1" declares the DSL schema (used by parsers), and namespace is the prefix other models use to import this model’s elements (via the Namespace#ElementID pattern).

Roles

role Org { name "Organization" } is the conventional generic organization-wide role. role Greeter is a more specific role, used by the Greet process below.

Events

start_event Start1 and end_event End1 are the boundaries of the flow. Both are empty declarations — an ID is all they need.

Process

process Greet is one unit of work. The actor Greeter clause binds it to a role. In a real model it would also carry modality, validate_provision, and reference_data_registry clauses; this minimal version omits them.

Canvas

canvas Root is the diagram. The header’s root HelloWorld would normally point to a canvas named HelloWorld; here, the root name is HelloWorld but the canvas defined is Root. In practice the root canvas is conventionally named Root — real-world models follow this pattern, and the root line uses the model’s namespace name to keep things readable.

The canvas has three blocks:

  • elements { ... } — every node on this diagram, each with x and y layout coordinates.
  • process_flow { ... } — the directed edges between nodes.
  • data { ... } — empty in this minimal example. In a real model it would list the data registries visible on the diagram with their coordinates.

Edges

Edge1 { from Start1 to Greet }
Edge2 { from Greet  to End1 }

Each edge has a unique ID, a from source, and a to target. In larger models edges can also carry description (a label) and condition (a measurement expression, used on gateway outgoing edges).

The diagram it implies

Rendered as a flowchart, this model produces a single vertical line:

  ●  Start1


  ■  Greet      (actor: Greeter)


  ●  End1

That is the whole flow: start, do the work, end. Every larger model in the corpus adds branches, data, and compliance on top of this skeleton.

What this model deliberately leaves out

Construct Where it shows up
class, enum, data_registry Data and registries
exclusive_gateway, timer_event Process flow
provision, measurement, note, table Compliance and measurement
approval, approve_by Approval workflow
.prd, .prm, .pws integration Implementation package

Model elements

Minimal Primmel model5 elements
Roles2
  • OrgOrganization
  • Greeter
Processes1
  • GreetGreet the worldactor: Greeter
Events2
  • Start1start
  • End1end