跳到正文
Penstock

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.

ProTeam in a pipeline. Without Pro, the IDE's own Rename still works and touches only the code it always did.

此内容尚不支持你的语言。

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.

  1. Put the caret on the name: a string literal that an API takes the name in, a method that a @JobWorker takes its job type from, a @Bean method, or a bean or worker class.
  2. Press Shift+F6, the IDE's own Rename.
  3. The dialog lists every place that writes the name, in diagrams, forms and code. Untick what should stay.
  4. Confirm. The whole rename is one step in the IDE's undo.

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.

Job typeThe task definition's type in the diagram, and @JobWorker(type=), jobType("") and the equivalents in the code.
Topiccamunda:topic, and topicName(""), subscribe("") and @ExternalTaskSubscription.
Class and beancamunda:class and camunda:delegateExpression, and the class or the @Component, @Service, @Named or @Bean declaration itself.
Message and signalThe name on the message or signal, and the calls that correlate a message or broadcast a signal.
ProcessThe process id, every call activity that names it, and the calls that start it.
DecisionThe decision id, every business rule task that names it, and the calls that evaluate it.
FormThe form key or id in the diagram, the form's own id, and the calls that name it.
ErrorThe 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.

  • 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.

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.