All notable changes to this project will be documented in this file.
- Auto-stacking: Elements in same lane + same column are automatically stacked vertically (90px spacing)
- No more manual
(column, y_offset)tuples needed for gateway branches - Just use the same column number - stacking happens automatically
- Manual override still supported via
(column, y_offset)format
- No more manual
- Simplified layout config: Gateway outputs can now share same column without explicit offsets
# Before (v3.1) - required explicit y_offset "Success Path": (3, 0), "Error Path": (3, 90), # After (v3.2) - auto-stacking "Success Path": 3, "Error Path": 3, # Automatically 90px below
- Lane-by-lane processing: Elements processed one lane at a time for better Modelio integration
- Data object positioning: Data objects now positioned below their source task (determined from data associations)
- Y-offset support in layout: Layout entries can now use
(column, y_offset)tuple format for vertical stacking"Element": 5- column 5, default Y position"Element": (5, 70)- column 5, 70px below default position
- Default config values: Updated
DATA_OFFSET_X=90(near task right edge),DATA_OFFSET_Y=10(small gap below task)
- BPMN_Export.py: Data associations now correctly exported using BpmnDataObject metamodel
- Uses
getTargetOfDataAssociation()for Task→Data associations (StartingActivity) - Uses
getSourceOfDataAssociation()for Data→Task associations (EndingActivity) - Previously data associations were missing from exported configs
- Uses
- Y-offset rules clarified: Positive y_offset moves elements DOWN within lane
- Complete element type reference: All 30+ element types documented with descriptions
- Sequential vs parallel guidance: Clear rules for when to use y_offset (parallel branches only)
-
BPMN Export/Import: New
BPMN_Export.pymacro to export existing diagrams to Python configuration- Captures all elements with exact positions and sizes
- Uses lane-relative Y coordinates for proper positioning
- Supports diagram cloning and migration between projects
-
Lane-Relative Positioning: New positioning mode for exact diagram recreation
- Elements format:
("Name", TYPE, "Lane", x, y_offset, width, height) y_offsetis relative to lane top, not absolute Y coordinate- Handles Modelio's dynamic lane resizing automatically
- Elements format:
-
New Element Types:
- Tasks:
SCRIPT_TASK,BUSINESS_RULE_TASK,SEND_TASK,RECEIVE_TASK, genericTASK - Gateways:
INCLUSIVE_GW,COMPLEX_GW,EVENT_BASED_GW - Events:
SIGNAL_START,CONDITIONAL_START,SIGNAL_END,TERMINATE_END,ERROR_END - Intermediate Events:
INTERMEDIATE_CATCH,INTERMEDIATE_THROW,MESSAGE_CATCH,MESSAGE_THROW,TIMER_CATCH,SIGNAL_CATCH,SIGNAL_THROW
- Tasks:
- Backward Compatible: Column-based positioning still works (3-tuple elements format)
- Dynamic Imports: Gracefully handles missing element types in older Modelio versions
BPMN_Helpers.py- Enhanced helper library with new positioning and element typesBPMN_Export.py- New export macro for diagram extraction
- Clarified BPMN data association rules: Events CAN have data associations, Gateways CANNOT
- Start Events: Output associations only (Start -> Data)
- End Events: Input associations only (Data -> End)
- Gateways: NEVER allowed - causes E205 orphan error
- Added detailed table and examples showing valid/invalid data associations
- Data objects simplified: Removed
positionparameter - data objects are now always placed below the lane center- Format changed from
(name, lane, column, "above|below")to(name, lane, column) - Simplifies configuration and provides consistent visual layout
- Format changed from
- Data associations simplified: Removed
directionparameter - now auto-detected based on element types- Format changed from
(source, target, "input|output")to(source, target) - Direction is automatically determined: Task→DataObject or DataObject→Task
- Format changed from
- Data Association semantics: Corrected
StartingActivity/EndingActivityandSourceRef/TargetRefsettings for proper BPMN complianceoutput: SetsStartingActivity = Task,TargetRef = DataObjectinput: SetsEndingActivity = Task,SourceRef = DataObject
- Lane-by-lane positioning: Data objects are now positioned lane-by-lane (top to bottom) to handle Modelio's automatic lane expansion when data objects extend beyond boundaries
- Data Objects: New
DATA_OBJECTelement type for representing documents and data in processes - Data Associations: Connect tasks to data objects
data_objectsconfiguration section:(name, lane, column)data_associationsconfiguration section:(source, target)- New configuration options:
DATA_WIDTH(default: 40) - Width of data objectsDATA_HEIGHT(default: 50) - Height of data objectsDATA_OFFSET_X(default: 20) - X offset from column centerDATA_OFFSET_Y(default: 80) - Y offset from lane center
- Updated
CLAUDE_INSTRUCTIONS.mdto v2.1 with data object examples - Updated
API_REFERENCE.mdwith complete data object/association documentation
- Two-file architecture: Separates reusable helper library from process configuration
BPMN_Helpers.py- Standalone helper library to install once in Modelio macros foldercreateBPMNFromConfig()- Single function to create entire process from configuration dict- Element type constants (
START,END,USER_TASK,SERVICE_TASK,MANUAL_TASK,EXCLUSIVE_GW,PARALLEL_GW,MESSAGE_START,MESSAGE_END,TIMER_START) - Configuration-based approach with
CONFIGdictionary - Support for Claude, ChatGPT, Gemini, and LM Studio/Qwen
- AI now generates ~50-100 lines of configuration instead of 500+ lines of full scripts
- Faster generation, fewer syntax errors, easier debugging
- Process scripts use
execfile()to load helper library
- Added
docs/QUICK_START.md- Step-by-step setup guide - Added
docs/API_REFERENCE.md- Complete configuration reference - Added
docs/APPROACHES.md- Comparison of single-file vs two-file approaches
The following versions used a single-file approach where all helper functions were included inline in each generated script.
- Guards for gateway conditions (displayed on sequence flows)
- Configurable task dimensions (
TASK_WIDTH,TASK_HEIGHT) - Tasks are resized to ensure text fits properly
- Increased default
SPACINGto 150 for better readability
- Events and gateways keep their original dimensions
- Log output now shows element dimensions
- Critical fix: Manual unmask now works correctly by placing elements at the Y position inside their lane
- Unmask at (0,0) was failing - must unmask inside the correct lane
- Lane Y position calculation for manual unmask
- Detailed unmask logging with lane name and Y position
- Manual unmask fallback for elements not auto-unmasked
- Automatic retry for missing elements after wait timeout
- Detailed attempt logging during wait phase
- Shows found/missing elements count per attempt
- Lists missing element names (truncated to 12 chars)
- Discovery: Modelio auto-unmasks elements when diagram is created
- Wait mechanism to check for element availability
- No longer need to manually call unmask() for initial display
- Removed explicit unmask calls for all elements
- Added polling loop to wait for elements
- Detailed reposition logging
- Lane change detection with before/after comparison
*** LANE CHANGED ***markers in output
- Lane change detection during repositioning
- Comparison of lane bounds before and after each move
- Read lane Y positions once before repositioning
- Use fixed Y values to avoid lane drift
- Complete BPMN template with all helper functions
- Support for all common BPMN element types
- Message and Timer start/end events
createBPMNDiagram()function with automatic layout
- Initial template structure
- Basic BPMN element creation functions
- Lane and flow support
BPMN data associations have specific semantics (auto-detected based on element types):
| Direction | Arrow | BPMN Properties |
|---|---|---|
| Task → DataObject | Task produces data | StartingActivity=Task, TargetRef=Data |
| DataObject → Task | Task consumes data | SourceRef=Data, EndingActivity=Task |
Typical pattern for data flowing between tasks:
Task A --> Data Object --> Task B
When data objects are positioned below tasks, they may extend beyond lane boundaries. Modelio auto-expands lanes to accommodate this, which shifts subsequent lanes down. Solution: position data objects lane-by-lane and re-read lane coordinates after each lane.
Modelio automatically unmasks elements when a diagram is created, but:
- Auto-unmask is non-deterministic - sometimes all elements appear, sometimes only partial
- Waiting does not reliably help - Modelio appears to freeze in some state
- Solution: Quick check (3 attempts, 50ms) then manual unmask fallback
Manual unmask must be done at the correct Y position:
# WRONG - will fail
diagramHandle.unmask(elem, 0, 0)
# CORRECT - inside the lane
diagramHandle.unmask(elem, 100, laneY[laneName])| Metric | Single-File | Two-File |
|---|---|---|
| Lines per script | 500-700 | 50-150 |
| AI generation time | ~45 sec | ~15 sec |
| Syntax error rate | ~30% | ~0% |
| Bug fix effort | Edit every file | Edit once |