JetBrains / Using it
The Penstock tool window
The Penstock tool window shows your project as a tree of processes, workers, messages, decisions and forms, and runs the command line for you.
What the tree contains is described once, for every tool, in Your project as a model. This page is about the IDE: where it is and what its buttons do.
Open it
- Click Penstock in the tool window bar on the left of the IDE.
- The tree lists your project. Double-click a node to open it. On a diagram element, it selects the element on the canvas.
- Right-click a node for its actions. The menu always starts with Open, and ends with the command-line actions.
- Type to search the tree.
When the project has no diagrams the tree says No diagrams in this project and offers Start from an example. See The example project.
The window is anchored to the left stripe of the IDE. The first-run tour points it out.
What the tree holds
Each node below is shown only when the project has something to put in it. Opening a node selects the element on the canvas, or opens the code.
| Start from an example | Only in a project with no diagrams. Camunda 8 order process and Camunda 7 order process. A confirmation dialog, then the files are written, and a notification says where. |
| Debug | While the debugger is stopped in a worker, a delegate or a listener: Paused at the task, and Active for the other active elements of that instance. It empties when the program resumes. Pro. |
| Code | With Pro, what the code links give. Without it, a line that offers Buy or Sign In…. |
| Migrate to Camunda 8 | Every file with its status (ready, converts, needs work, blocked), its findings, and the Java code with what each class becomes. It comes first when the project has Camunda 7 files to migrate. |
| Processes | Each process with its elements, the processes it calls and the ones that call it, and its tests with how much of it they cover. |
| Tests | Every process test, by class. Run or debug any of them, a class or all. |
| Workers | Each job type, topic, class and bean, with the code that implements it. A worker nothing implements is marked, once the project implements any of them. Check Workers on… is on this node. |
| Element Templates | The element templates of the project, with the worker each came from. A template whose variables no longer match its worker is marked. Each offers Create Job Worker… (Spring), Create Node Worker… and Create Python Worker…. |
| Variables | Each variable, who sets it and who reads it, in the diagrams and in the code. A name nothing sets is marked, and so is one a letter away from a name that is set. |
| Messages | Each message name and the elements that send and catch it. |
| Errors | Each error code, who throws it and who catches it. One that is thrown and not caught, or caught and never thrown, is marked. |
| Decisions | Each decision, with the tasks that call it. A decision a task names and the project does not have is listed as missing. |
| Forms | Each form, with the tasks that use it. A form that is named and not in the project is listed as missing. |
| Deployment | The profiles, with the address of each and when you last deployed to it. |
| Files | Every diagram file, by folder or in a flat list. |
Group by Files turns the tree round: file by file, each with its processes, decisions and forms, then Deployment. The nodes for code, tests and workers are only in the other view.
The toolbar
| Run Penstock | A menu of command-line actions: Check, Scenarios, JUnit Tests, Code, Docs, Format, Diff Since…, Export… and Doctor. Each runs penstock on the selected file or folder and shows the output in the Run window. Scenarios lists the ways through each process (scenarios list). Format rewrites the files (fmt --write), as do JUnit Tests and Docs, which write what they generate. Diff Since… asks for a commit, branch or tag to compare with. Export… asks for a folder and a format, SVG or PNG; SVG needs nothing and PNG needs puppeteer in the project. It uses the project's penstockw when there is one, and npx @kern0x1b/penstock-cli when there is none, which downloads the command the first time. It runs only in a trusted project. Scenarios, JUnit Tests, Code and Docs need Pro. |
| Reload from Disk | Re-reads the project from disk. The tree also refreshes by itself when a file changes. |
| Run All Process Tests | Runs every process test. Shown when process tests exist. Pro. |
| Group by Files | Turns the tree round: file by file, with each process's elements and what runs them. A toggle. |
| Show Folders | Switches between a tree of folders and a flat list. A toggle. |
| Open penstock.yaml | Opens the project's configuration, or creates it when there is none. |
Whether the view is grouped by files, and whether it shows folders, are kept in ~/.penstock/preferences.json.
Right-click actions
- Open opens the file, or selects the element.
- Copy ID copies the process id, decision id, job type or other name to the clipboard. It takes the IDE's own Copy key.
- Find Usages in Code lists the code that names it, in a tab called Code using the name. It also takes the IDE's own Find Usages key. Pro.
- Go to Implementation opens the method or class that runs a worker. With several implementations a tab called Implementations of the name lists them. It takes the IDE's own key. Pro.
- Run Tests and Debug Tests. Pro.
- Deploy sends a file or a process to its profile. On a profile under Deployment it sends every diagram, after a confirmation.
- Check Workers on… on the Workers node. See Check Workers.
- On Migrate to Camunda 8: Convert to Camunda 8…, Convert All…, Migration Report and the worker skeleton actions (Job Worker Skeleton…, Node Worker Skeleton…, Python Worker Skeleton…). See Camunda 7 to 8.
- On an element template: Create Element Template… on a worker, and the three worker generators on a template. Pro.
- Without Pro, a Code line offers Buy or Sign In….
What you see
- A tree with a count beside each node, and a warning icon where something is wrong.
- The output of a Run Penstock action in the Run window, with file names you can click.
Common problems
- The tree is empty.
- The project has no
.bpmn,.dmnor.formfiles that Penstock can see. Build folders are skipped. Press Reload from Disk. - The Run Penstock actions do nothing, or an error says the project is not trusted.
- Trust the project. See Troubleshooting in the IDE.
- The first command is slow.
- Without a
penstockwin the project, Penstock runsnpx @kern0x1b/penstock-cliand downloads the command line the first time.penstock initadds the wrapper, which pins a version. - There is no Go to Implementation.
- Code links are a Pro feature, and nothing in the project implements this worker.