Sample Applications
The runnable WinForms editor and the workflow execution server
Two sample applications ship with the solution: a full WinForms diagram editor that exercises the framework end to end, and a headless server that executes saved diagrams as queued jobs over HTTP. Both are the fastest way to see the framework working before writing code.
Table of Contents
WinForms Editor Sample
Beep.Skia.Sample.WinForms hosts SkiaHostControl in a full editor shell. The main form wires the canvas, palette, property grid and menus together and adds family-specific analysis commands to the menu bar.
Editor Features
| Area | What the sample demonstrates |
|---|---|
| Canvas | Drag-and-drop placement from the in-canvas palette, selection, resize, zoom/pan, grid and snapping |
| Editing | Undo/redo, copy/paste, delete, arrange (bring to front/send to back) and align commands driven from the menu |
| Templates | Loading the built-in diagram templates through the Templates menu |
| Validation | Diagram validation with an error/warning report in the status bar |
| ECAD | Electrical rules check (ERC) over the diagram's ECAD components, reporting violations by severity |
| Security | STRIDE analysis over asset nodes, materializing generated threat nodes onto the canvas for inspection |
| Project management | Critical-path (CPM) calculation with project duration and critical task list, plus Gantt timeline generation |
| Automation | Running the diagram as a workflow in-process and reporting status and elapsed time |
| Property grid | Editing the selected component's NodeProperties with write-back to the canvas |
| Export | PNG, SVG and PDF export plus print preview from the host control |
Dialog Forms
The sample includes focused dialogs that are useful as integration references:
| Form | Purpose |
|---|---|
CodePreviewForm | Shows generated code (for example flowchart code generation) before copying it out |
CommentsForm | Lists, adds and resolves collaboration comments anchored to components |
DiagramAssistForm | Drives assisted generation from a description into a diagram |
ExecutionServiceForm | Submits workflows to the execution service and watches job state |
ExpressionTesterForm | Evaluates ETL expressions interactively against sample rows |
ExtensionsForm | Installs, updates and removes extension packages and reloads the palette |
TextPreviewForm | Shows generated text artifacts (DDL, XMI, BPMN XML, code) with copy support |
Workflow Server Sample
Beep.Skia.Sample.Server is a thin ASP.NET transport adapter over the execution SKU. All routing and status codes live in WorkflowRequestRouter, so the same facade can be hosted by anything else.
Routes
| Method and path | Purpose |
|---|---|
GET /api/workflows | List published workflows |
POST /api/workflows?name=... | Publish a diagram DTO (request body) as a workflow |
GET /api/jobs?state=&limit= | List jobs, optionally filtered by state |
POST /api/jobs?workflowId=&submittedBy= | Submit a job; the body carries the inputs JSON object |
GET /api/jobs/{id} | Job detail including node states |
POST /api/jobs/{id}/cancel | Cancel a running job |
POST /api/jobs/{id}/pause | Pause a job at the next safe point |
POST /api/jobs/{id}/resume | Resume a paused job |
Command Line
Beep.Skia.Sample.Server [options]
--url <prefix> Listen URL (default http://localhost:5199)
--concurrency <n> Max parallel jobs (default 2)
--demo Publish a demo workflow at startup
--publish <file> Publish a saved diagram (skia_layout.json) at startup
--help Show this help
Submitting a Job
# Start the server with a demo workflow published
dotnet run --project Beep.Skia.Sample.Server -- --demo
# List workflows and grab the id, then submit a job
curl http://localhost:5199/api/workflows
curl -X POST "http://localhost:5199/api/jobs?workflowId=<id>&submittedBy=me" \
-H "Content-Type: application/json" -d "{ \"threshold\": 10 }"
# Inspect and control it
curl http://localhost:5199/api/jobs/<jobId>
curl -X POST http://localhost:5199/api/jobs/<jobId>/pause
curl -X POST http://localhost:5199/api/jobs/<jobId>/resume
Running the Samples
# WinForms editor (Windows, .NET 10)
dotnet run --project Beep.Skia.Sample.WinForms
# Workflow server
dotnet run --project Beep.Skia.Sample.Server -- --demo
# Both are part of the solution; a full build compiles them
dotnet build Beep.Skia.Solution.sln
Restoring the solution requires the private TheTechIdea.Beep.* feed; see Troubleshooting if restore fails. The MAUI head is excluded from the CI filter, so the samples build without MAUI workloads.