JetBrains / Using it
Rename in the IDE
Rename a job type, topic, class, bean, message, signal, process, decision, form or error once, and every diagram and every line of code that names it follows.
A name that a diagram and its code share is a string in both, so neither side can find the other by resolving a symbol. Rename reads the links Penstock already knows (see Code links in the IDE) and changes both sides in one step.
From the code
- Put the caret on the name: a string literal that an API takes the name in, a method that a
@JobWorkertakes its job type from, a@Beanmethod, or a bean or worker class. - Press Shift+F6, the IDE's own Rename.
- The dialog lists every place that writes the name, in diagrams, forms and code. Untick what should stay.
- Confirm. The whole rename is one step in the IDE's undo.
From the diagram
Change one of these values in the properties panel. Penstock asks how many places still hold the old value and offers the rename in a notification. Nothing is written until you say so.
What a rename covers
| Job type | The task definition's type in the diagram, and @JobWorker(type=), jobType("") and the equivalents in the code. |
| Topic | camunda:topic, and topicName(""), subscribe("") and @ExternalTaskSubscription. |
| Class and bean | camunda:class and camunda:delegateExpression, and the class or the @Component, @Service, @Named or @Bean declaration itself. |
| Message and signal | The name on the message or signal, and the calls that correlate a message or broadcast a signal. |
| Process | The process id, every call activity that names it, and the calls that start it. |
| Decision | The decision id, every business rule task that names it, and the calls that evaluate it. |
| Form | The form key or id in the diagram, the form's own id, and the calls that name it. |
| Error | The error code, and BpmnError and the handlers that name it. |
Files in the project and in the repositories listed under linked in penstock.yaml are both reached, whichever side you start from. Workers in Python, Go, JavaScript and the other supported languages are found by their text, the same way code links find them.
What a rename leaves alone
- Element ids. A rename moves a name and leaves every id where it is.
- Variables. Nothing can promise that every read and write of a variable is known, so Penstock does not offer to rename one.
Instances that are already running
A process id, a job type and a message name are what a deployed engine knows. Renaming one changes what happens to instances that are already running: an instance keeps the old name and its next step may no longer be found. The dialog says so and offers Check running instances. It asks the engine of the profile in force, only when you press it, and reports how many active instances there are, how many external tasks wait on a topic and how many subscriptions wait on a message.
Camunda 8 activates jobs itself and does not report what is waiting for a job type, and it does not expose message subscriptions. The button says so rather than guessing.