rewrite

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package rewrite turns models written for Camunda 7 into the model format of this engine (MIG-04): JUEL becomes JavaScript, Groovy logging becomes log, external task topics become task types, the http-connector becomes a notification or an HTTP call, and message names with expressions become senergy:messageName. It works on the XML, so that layout and diagram stay untouched, and reports what it rewrote, what needs a manual check and what it cannot rewrite.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Duration added in v0.1.2

func Duration(value string) (string, bool)

Duration rewrites a repeating interval used as the duration of a timer, e.g. R/P1D, to its period: Camunda waited once for it as well. Other values are returned unchanged and false.

Types

type Checked

type Checked struct {
	// the BPMN that runs; the given one if it is in the format of the engine already
	Xml     string
	Process *bpmn.Process
	// what keeps the model from deploying: the parts the conversion cannot rewrite, then the
	// issues of the converted model
	Issues []model.Issue
	Report Report
}

Checked is a model as the engine runs it: converted where it is written for Camunda 7 or the old designer, then validated under the rules of a namespace.

func Check

func Check(xml string, rules bpmn.Rules) (Checked, error)

Check converts a model on the fly, as deploy, prepare and the validation of models do, and validates the result. Stored models stay as they were submitted, because the designer of the web-ui edits only its own format. An error means the XML could not be read.

func (Checked) Hints

func (this Checked) Hints() []model.Issue

Hints say on a save or a validation that the model is converted when deployed and name what to check then; they do not keep the model from deploying.

type Finding

type Finding = model.Issue

Finding names an element and what happened to it.

type Report

type Report = model.ConversionReport

Report lists what the rewrite changed (Rewritten), what runs but may behave differently and should be checked (Check), and what keeps the model from running (Unsupported).

func Rewrite

func Rewrite(xml string) (string, Report, error)

Rewrite rewrites a model. An error means the XML could not be read at all.

It is also the detector of the format: a model in the format of this engine has nothing the rewrite looks for, so it comes back unchanged, byte for byte, with an empty report and without validation, which is then up to the caller. Only the parts of a mixed model that are written for Camunda are rewritten; rewriting a result again finds nothing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL