Skip to content

Commit d384a67

Browse files
authored
Revise configuration documentation for clarity (#5)
Updated configuration documentation to reflect changes in parameters and transaction handling.
1 parent 6b981c9 commit d384a67

1 file changed

Lines changed: 26 additions & 21 deletions

File tree

‎docs/manual/configuration/basics.md‎

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ Listeners define how an adapter receives input. They are placed inside a `<Recei
4747
<ApiListener
4848
name="inputListener"
4949
uriPattern="booking"
50-
allowAllParams="false"
50+
allowedParameters="comma,separated,listOfParams"
5151
method="POST"/>
5252
</Receiver>
5353
```
5454

5555
Key attributes:
5656
- `uriPattern` — URL path segment (accessible at `/api/{uriPattern}`)
5757
- `method` — HTTP method (GET, POST, PUT, DELETE)
58-
- `allowAllParams` — whether to accept all query parameters
59-
58+
- `allowedParameters` — A comma separated list with query parameters that may be used
59+
- `allowAllParams` — Disable the use of query parameters completely
6060
## Pipeline and Exits
6161

6262
A pipeline contains an `<Exits>` block and one or more pipes. The `firstPipe` attribute specifies the entry point. Without `firstPipe`, pipes execute sequentially.
@@ -75,7 +75,7 @@ Each exit has a `name`, a `state` (SUCCESS or ERROR), and an HTTP response `code
7575

7676
## Pipes
7777

78-
Pipes are the processing units inside a pipeline. Each pipe has a `name` attribute and one or more `<Forward>` elements controlling flow. For a complete and up-to-date list of all available pipes and their attributes, see the [FF! Reference](https://reference.frankframework.org/#/components).
78+
Pipes are the processing units inside a pipeline and have control over the processing flow. As such each pipe must have an unique name using the `name` attribute and one or more `<Forward>` elements. For a complete and up-to-date list of all available pipes, possible sub-elements and their attributes, see the [FF! Reference](https://reference.frankframework.org/#/components).
7979

8080
### EchoPipe
8181

@@ -109,7 +109,7 @@ Validates the incoming XML message against an XSD schema. See the [XmlValidatorP
109109

110110
### SenderPipe
111111

112-
Wraps a sender to communicate with external systems (databases, services, etc.). See the [SenderPipe reference](https://reference.frankframework.org/#/Components/Pipes/SenderPipe) for all available attributes.
112+
Wraps a sender to communicate with external systems (databases, services, etc.). Unlike a `Pipe` senders do not control the flow of execution and may not be placed directly inside a `Pipeline` but must be wrapped by either a `SenderPipe` any type of `IteratingPipe`. See the [SenderPipe reference](https://reference.frankframework.org/#/Components/Pipes/SenderPipe) for all available attributes.
113113

114114
```xml
115115
<SenderPipe name="insertBooking">
@@ -122,7 +122,7 @@ Wraps a sender to communicate with external systems (databases, services, etc.).
122122
<Param name="price" xpathExpression="/booking/price"/>
123123
<Param name="fee" xpathExpression="/booking/fee"/>
124124
</FixedQuerySender>
125-
<Forward name="success" path="getDestinations"/>
125+
<Forward name="success" path="next-pipe-to-execute"/>
126126
</SenderPipe>
127127
```
128128

@@ -202,29 +202,31 @@ Executes SQL queries against a JDBC datasource.
202202
```
203203

204204
- `query` — SQL statement with `?` positional parameters
205-
- `datasourceName` — JNDI datasource name; `${instance.name.lc}` resolves to the lowercase instance name
205+
- `datasourceName` — DataSource name; defaults to `${instance.name.lc}` which resolves to the lowercase instance name
206206
- `<Param>` — binds values via XPath expressions; `/element` selects elements, `/@attr` selects attributes
207207

208208
#### Named Parameters
209209

210-
An alternative syntax uses named parameters with `useNamedParams="true"`:
210+
An alternative syntax uses named parameters:
211211

212212
```xml
213213
<FixedQuerySender
214214
name="insertBookingSender"
215-
query="INSERT INTO booking VALUES(?{id}, ?{travelerId}, ?{price}, ?{fee})"
216-
useNamedParams="true"
217-
datasourceName="jdbc/${instance.name.lc}">
215+
query="INSERT INTO booking VALUES(?{id}, ?{travelerId}, ?{price}, ?{fee})">
218216
<Param name="id" xpathExpression="/booking/@id"/>
219217
<Param name="travelerId" xpathExpression="/booking/travelerId"/>
220218
<Param name="price" xpathExpression="/booking/price"/>
221219
<Param name="fee" xpathExpression="/booking/fee"/>
222220
</FixedQuerySender>
223221
```
224222

223+
- The query-parameters in the SQL query may reference a specific parameter using `?{name}`
224+
- You do not need to specify the `datasourceName` attribute if you wish to use the default.
225+
225226
## Database Initialization with Liquibase
226227

227228
Frank!Framework uses Liquibase for database schema management. Enable it by setting `jdbc.migrator.active=true`.
229+
Each configuration may use their own changelog file. It is possible to change the name of the file and also to change the datasource it needs to apply the changelog to.
228230

229231
### DatabaseChangelog.xml
230232

@@ -259,8 +261,8 @@ Place this file in the configuration directory. It defines schema changes as ord
259261

260262
Important rules:
261263
- Never modify existing changesets after they have been applied. Always add new changesets.
262-
- The default datasource when using Frank!Runner is `jdbc/${instance.name.lc}` (e.g., `jdbc/frank2manual`).
263-
- Use `DROP ALL OBJECTS` via JDBC Execute Query to reset an H2 database during development.
264+
- The default datasource when using the Frank!Framework is `jdbc/${instance.name.lc}` (e.g., `jdbc/frank2manual`).
265+
- Use `DROP ALL OBJECTS` via JDBC Execute Query to reset an H2 database during development, this however does not reapply the migration changelog!
264266

265267
## XML Validation with XSD
266268

@@ -319,20 +321,23 @@ Use `<XsltPipe>` with an XSLT stylesheet to transform XML messages:
319321
```
320322

321323
## Transactions
322-
323-
Add `transactionAttribute` to the `<Pipeline>` element to wrap all operations in a database transaction.
324+
Transactions are configured in a `<Receiver>` or in a `<Pipeline>`. You can control the use of transactions via the `transactionAttribute` on either of the elements to wrap all operations in a database transaction. If configured on the `Receiver` and not the `Pipeline`, the `Pipeline` will inherit the given transaction controlled by the `Receiver`.
324325

325326
```xml
326327
<Pipeline firstPipe="checkInput" transactionAttribute="RequiresNew">
327328
```
328329

329330
| Value | Behavior |
330331
|-------|----------|
331-
| `RequiresNew` | Starts a new transaction for this pipeline |
332-
| `Required` | Joins an existing transaction or creates a new one |
333-
| `Mandatory` | Requires an existing transaction; fails if none exists |
332+
| `Required` | Ensures there is a transaction; inherits or create a new one if none exists. |
333+
| `Supports` | Support a current transaction; execute non-transactionally if none exists. |
334+
| `Mandatory` | Requires a transaction is present; throws an exception if no current transaction exists. |
335+
| `RequiresNew` | Always create a new transaction, suspending the current transaction if one exists. |
336+
| `NotSupported` | Do not support a transaction; remove it when present and always execute non-transactional. |
337+
| `Never` | Do not support a transaction; throw an exception if a current transaction exists. |
334338

335-
With transactions enabled, all database operations within the pipeline either succeed or roll back together (ACID semantics).
339+
- With transactions enabled, all database operations within the pipeline either succeed or roll back together (ACID semantics).
340+
- It is possible to have different transactions for data transport and data processing.
336341

337342
## File Layout
338343

@@ -344,8 +349,8 @@ configurations/
344349
Configuration.xml
345350
DatabaseChangelog.xml
346351
StageSpecifics_LOC.properties
347-
booking.xsd
348-
booking2destinations.xsl
352+
xml/xsd/booking.xsd
353+
xml/xsl/booking2destinations.xsl
349354
webcontent/
350355
index.html
351356
```

0 commit comments

Comments
 (0)