Umple Code Generator
Supported languages
| Language | language value | Notes |
| -------- | ---------------- | ------------------------------ |
| Java | Java | Full-featured, default target |
| Python | Python | Some limitations |
| PHP | Php | Full implementations |
| Ruby | Ruby | Experimental |
| C++ | RTCpp | Real-time C++ with headers |
| SQL | Sql | CREATE TABLE DDL + foreign keys|
Workflow
- Read
references/umple-modeling-syntax.md. - Write a valid Umple model for the user's domain.
- Call the Umple Online API (see below).
- Parse the generated code from the response.
- On error, read the message, fix the code, retry (up to 3 times).
- Split into per-class files and present to the user.
- If helpful, read
references/generated-api-patterns.mdto explain what was generated.
API
Endpoint: POST https://cruise.umple.org/umpleonline/scripts/compiler.php
Content-Type: application/x-www-form-urlencoded
| Parameter | Value |
| --------------- | -------------------- |
| language | See table above |
| languageStyle | codegen |
| umpleCode | The Umple source code|
| filename | model.ump |
Use whatever HTTP tool is available (WebFetch, curl, fetch, etc.).
Response parsing
Success: code appears after a <p>URL_SPLIT delimiter. Strip HTML tags and decode entities (< → <, > → >, & → &, " → "). Files separated by //%% NEW FILE ClassName BEGINS HERE %%.
Error: response contains <span class="umple-message-error">. Strip HTML tags to read the error.
Output
- Show the Umple source in an
umplecode block. - Present generated code split into per-class files.
- Save files:
<name>/model.umpand<name>/<ClassName>.java(etc.).
Same model can generate multiple languages — only the language parameter changes.
Guardrails
- Always read the syntax reference before writing Umple code.
- Prefer a smaller valid model over guessing syntax.
- One association per class pair — never define the same relationship from both sides.