Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docs/documentation/user-guide/process-engine/templating.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,32 @@ payload of a `operaton:connector`.
</bpmn2:serviceTask>
```

:::caution

For inline script sources (script tasks, listeners, conditions, and input/output parameters),
script or template languages other than JUEL are subject to
[dynamic script-source detection][script-source]. If the script content starts with `${` or
`#{` after leading and trailing whitespace is trimmed for detection, Operaton treats it as
an expression that resolves to a script source. The content is evaluated as an expression
first, rather than passed directly to the script or template engine, which may cause errors
or unexpected output.

If those characters are part of the template itself, prefix the content with a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add empty line to separate the paragraph

recognized by the script or template language, or use an external resource instead. For
example, an inline FreeMarker template can start with an escaped FreeMarker comment:

```xml
<operaton:inputParameter name="message">
<operaton:script scriptFormat="freemarker">&lt;#-- Keep this as an inline FreeMarker template. --&gt;${name} likes:
&lt;#list icecreamtypes as ict&gt;
* ${ict}
&lt;/#list&gt;
</operaton:script>
</operaton:inputParameter>
```

:::

## Use XSLT as Template Engine

### Use XSLT Template Engine with an embedded process engine
Expand Down
Loading