π§ Work in Progress β Baseline Under Development π§
This repository is a baseline toolkit intended to be battle-tested in practice. APIs, scripts, and automation may change frequently. Not ready for production use.
Contributions, testing, and feedback are highly encouraged to improve the project.
Automated toolkit for capturing Operaton webapp screenshots to replace Camunda screenshots in documentation.
- Documentation Scanning : Scan docs for image references and generate capture configs
- Process Deployment : Deploy BPMN/DMN processes to Operaton
- Data Generation : Create users, groups, process instances, and tasks
- Scenario Simulation : Create specific states (tokens, history, task states)
- Incident Creation : Generate intentional failures for error screenshots
- Screenshot Capture : Automated Puppeteer-based screen capture
- Screenshot Replacement : Copy captured screenshots to documentation
- Environment Reset : Clean wipe functionality for fresh starts
# 1. Install dependencies
make install
# 2. Configure environment
cp .env.example .env
# Edit .env with your Operaton instance details
# 3. Check connection
make check
# 4. Run the screenshot workflow
make screenshots-workflowThe complete workflow for updating documentation screenshots:
# 1. Scan documentation for image references
make scan-docs
# 2. Select a generated config (cockpit, tasklist, admin, or all)
cp cp output/scan/screenshots-admin.json config/screenshots.json
# 3. Set up the Operaton environment
make deploy # Deploy processes
make data # Generate test data
# 4. Capture screenshots
mak capture
# 5. Preview what will be replaced
make replace-screenshots
# 6. Actually replace files in documentation
make replace-screenshots-live
# 7. Commit changes in documentation repo
cd /path/to/documentation
git add -A && git commit -m "Update webapp screenshots"Run make help to see all available commands:
| Command | Description | Docs |
|---|---|---|
make install |
Install npm dependencies | |
make setup |
Full setup: install + create .env | |
make check |
Check connection to Operaton | π |
make status |
Show environment status | π |
| Command | Description | Docs |
|---|---|---|
make analyze |
Analyze documentation for screenshots to replace | π |
make scan-docs |
Scan docs, generate configs | π |
make replace-screenshots |
Preview replacements (dry run) | π |
make replace-screenshots-live |
Actually replace in docs | π |
make screenshots-workflow |
Show full workflow instructions |
| Command | Description | Docs |
|---|---|---|
make deploy |
Deploy BPMN/DMN processes | π |
make users |
Create users and groups only | π |
make data |
Generate full test data | π |
| Command | Description | Docs |
|---|---|---|
make simulate |
Run all simulation scenarios | π |
make simulate-tokens |
Create instances with tokens at various stages | π |
make simulate-history |
Generate completed instances for history views | π |
make incidents |
Create all types of incidents | π |
| Command | Description | Docs |
|---|---|---|
make capture |
Capture all screenshots (headless) | π |
make capture-debug |
Capture with debug output | π |
make capture-visible |
Capture with visible browser | π |
| Command | Description | Docs |
|---|---|---|
make reset |
Reset Operaton (with confirmation) | π |
make reset-force |
Reset without confirmation | π |
make clean |
Clean local output files |
make test # Run all chaos tests
make chaos-check # Test check-connection.js
make chaos-status # Test show-status.js
make chaos-deploy # Test deploy-processes.js
make chaos-data # Test generate-data.js
make chaos-simulate # Test simulate-scenarios.js
make chaos-incidents # Test create-incidents.js
make chaos-capture # Test capture-screenshots.js# Operaton Instance
OPERATON_BASE_URL=https://operaton-doc.open-regels.nl
OPERATON_REST_URL=https://operaton-doc.open-regels.nl/engine-rest
OPERATON_USERNAME=demo
OPERATON_PASSWORD=demo
# Screenshot Capture
SCREENSHOT_WIDTH=1920
SCREENSHOT_HEIGHT=1080
SCREENSHOT_SCALE=2
HEADLESS=true
OUTPUT_DIR=./output/screenshots
# Documentation Paths (required for scan/replace)
DOCS_PATH=C:/Users/username/Development/documentation/docs
STATIC_PATH=C:/Users/username/Development/documentation/static/img
# Replacement Settings
DRY_RUN=true
VERBOSE=false
# Debug
DEBUG=falseCommand Report Location
------------------------- ----------------------------------
make scan-docs config/generated/scan-report.md
make replace-screenshots output/replace-report.mdAfter running make scan-docs:
config/generated/screenshots-cockpit.json Cockpit webapp screenshots
config/generated/screenshots-tasklist.json Tasklist webapp screenshots
config/generated/screenshots-admin.json Admin webapp screenshots
config/generated/screenshots-welcome.json Welcome webapp screenshots
config/generated/screenshots-all.json All webapp screenshots
config/generated/scan-report.md Scan summary and statisticsoperaton-screenshot-automation/
βββ Makefile # Command interface
βββ package.json # Node.js dependencies
βββ .env.example # Environment template
βββ config/
β βββ screenshots.json # Active screenshot config
β βββ generated/ # Generated configs from scan
βββ docs/ # Script documentation
βββ processes/
β βββ bpmn/ # BPMN process files
β βββ dmn/ # DMN decision files
β βββ cmmn/ # CMMN case files
βββ scripts/
β βββ check-connection.js
β βββ show-status.js
β βββ deploy-processes.js
β βββ generate-data.js
β βββ simulate-scenarios.js
β βββ create-incidents.js
β βββ capture-screenshots.js
β βββ scan-docs.js
β βββ replace-screenshots.js
β βββ reset-environment.js
βββ tests/ # Chaos test suites
βββ output/
βββ screenshots/ # Captured screenshots
βββ replace-report.md # Replacement report
make reset-force
make deploy && make data
cp config/generated/screenshots-admin.json config/screenshots.json
make capture
make replace-screenshots
make replace-screenshots-livemake reset-force
make deploy && make data && make simulate
cp config/generated/screenshots-all.json config/screenshots.json
make capture
make replace-screenshots-livemake fresh # Reset + Deploy + Data + Simulate + Incidents + Capturemake check # Diagnose connection problems
DEBUG=true make checkmake capture-visible # Run with visible browser
DEBUG=true make capture- Check process XML validity
- Verify REST API permissions
- Check for existing deployments:
make list-deployments
- Ensure processes are deployed first
- Check job executor is running
- Wait for async jobs: incidents may take a few seconds
- Verify DOCS_PATH points to the docs folder
- Check documentation has webapps/ folder structure
- Images must be in webapps/cockpit/, webapps/admin/, etc.
- Set DRY_RUN=false or use make replace-screenshots-live
- Verify DOCS_PATH and STATIC_PATH are correct
- Check output/replace-report.md for details
- Add BPMN/DMN files to
processes/directory - Update
config/screenshots.jsonwith new screenshot definitions - Add deployment config to deploy script if needed
- Run
make deploy
Licensed under the Apache License, Version 2.0. See the LICENSE file for details.