This page describes how an update or upgrade of Webdesk 4.x works and how to carry it out safely. It explains what Webdesk does automatically when a new program version starts (database schema, module upgrade scripts, registration) and which settings play a role. The audience is system administrators and consultants.
The page applies to Webdesk 4.x operated as a WAR file in a Tomcat or as a container image. The update with the Windows installer (setup-...exe) is described on the page Webdesk Update; this page complements it with the background and the procedures for WAR and container operation. The initial installation is described under Webdesk 4.
The table shows from which Webdesk version the minimum required Java version changed and which additional Java version was already supported. The boundaries were checked against the compiler level of the build of the respective version (source/target or release in the Maven configuration) and, where available, are backed by the release notes. Version numbers are not strictly chronological: hotfix versions of older lines also appear after newer major versions and keep the Java requirement of their line.
|
Webdesk version |
Minimum Java |
Additionally supported |
|---|---|---|
|
4.0.0 to 4.1.1 |
Java 7 (derived from the build, not explicitly named in the release notes) |
none |
|
4.1.2 to 4.19.x |
Java 8 |
none (Java 11 is not yet supported) |
|
4.20.0 to 4.57.x |
Java 8 (from 4.56.0 at least update 163, see New features in 4.56) |
Java 11 from 4.20.0 (release notes 4.20.0: Java 11 requires at least Tomcat 9) |
|
4.58.0 to 4.61.x |
Java 11 (release notes 4.58.0: "Webdesk is now based on Java 11") |
none |
|
4.62.0 to 4.63.x |
Java 11 |
Java 17 from 4.62.0 (release notes 4.62.0: Nashorn is embedded to enable operation with Java 17); additional JVM parameters required, see Webdesk with Java 17 |
|
4.64.0 and later |
Java 17 (Breaking Changes 4.64) |
none; Java 11 is not sufficient |
Java 21 or later is not mentioned in the release notes or in the build; use Java 17 for 4.64 and later. When operated as a container image, Java and Tomcat are already included in the image.
When an update crosses a Java boundary:
--add-opens (setenv.sh or wrapper.conf) and remove the parameter -Dnashorn.args=--no-deprecation-warning (Webdesk with Java 17, New features 4.64).webdesk-webapp/Dockerfile) is based on a Tomcat 9 image with JDK 17. The Windows installer also ships a Tomcat 9.--add-opens: Depending on the way Webdesk is operated, the following parameters are required when the JVM starts (list according to New Features 4.64):
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens java.base/jdk.internal.module=ALL-UNNAMED --add-opens java.base/jdk.internal.reflect=ALL-UNNAMED --add-opens java.base/java.lang.module=ALL-UNNAMED --add-opens jdk.crypto.ec/sun.security.ec.point=ALL-UNNAMED --add-opens jdk.dynalink/jdk.dynalink.linker.support=ALL-UNNAMED --add-opens java.base/sun.util.calendar=ALL-UNNAMED --add-opens java.base/java.util.concurrent.locks=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMEDSet the parameters where the JVM is started, e.g. through the environment variable
JDK_JAVA_OPTIONS (this is how the catalina.bat supplied with the Windows installer sets some of them) or through the Tomcat start options. In a container they must be passed to the container's JVM; the Dockerfile of the web application does not set them itself.At its core, an update consists of replacing the program files and restarting. Webdesk performs all further steps itself during startup, in this order:
webdesk-sessionFactory.schemaUpdate, default: enabled). The schema update does not perform renames, deletions or data migrations; that is what the module upgrade scripts are for.PoStartup.executeIndexManager, default: enabled; errors here only cause a warning in the log).webdesk.disableTimeLineChecks).webdesk.runRegistration (see below).webdesk.luceneIndexing, default: enabled).|
Property |
Description |
Possible value(s) |
|---|---|---|
|
webdesk.runRegistration |
Controls whether and how the registration runs at startup (values see below). The value 1 is automatically reset to 0 after the registration. Can also be set as the environment variable |
0, 1, 2, 3, 4 (default: 1 if not set or invalid; the supplied template sets 1) |
|
webdesk.runRegistrationInThread |
If true, the registration runs in a background thread ("Webdesk Artifact Registration") while Webdesk is already starting. If false, it runs in the foreground and startup finishes only afterwards. |
true, false (default: true) |
|
webdesk-sessionFactory.schemaUpdate |
If true, Hibernate adds missing tables and columns at startup. If false, the schema is not adjusted; Webdesk then assumes that the database already matches the program version. There is no |
true, false (default: true) |
|
PoStartup.executeIndexManager |
If true, the database indexes are checked at startup and missing ones are created. This can take long on large databases. The template |
true, false (default: true) |
Each module (po, wf, ta, gw, ...) has its own version number, a consecutive integer that is independent of the Webdesk release number. The current state per module is stored in the database and shown in the action "Modules" in the column "Version". The program brings the target version for each module. At startup:
Module ... is up-to-date)..../update/vNN/ are executed for every version in between (NN is the respective version number). First the prepare.xml files of all pending versions run, then the upgrade.xml files version by version. After each successfully completed upgrade.xml the new version number is saved in the database.If the stored version is higher than the target version (older program version against a newer database), no script is executed; the stored version number is merely set to the lower target version. See the section "Rolling back".
The scripts reside in the module under /at/workflow/webdesk/<module>/<implFolder>/update/vNN/ and are named prepare.xml or upgrade.xml. The root element is arbitrary (usually <upgrade>); its child elements are processed in order:
|
Element |
Description |
Attributes |
|---|---|---|
|
<sql> |
Executes the SQL statement contained in the element. |
|
|
<js> |
Executes the JavaScript file whose name is given in the element. The file resides in the same |
|
|
<java> |
Executes the Java class named in the element (fully qualified name). The class must derive from |
|
|
<rename> |
Renames a system parameter (bean property). |
|
|
<condition> |
Encloses any other elements, which are executed only if all given conditions are met. Without attributes the condition is always met. |
|
Important for error handling: failOnError is false by default. A failed step is then only recorded in the log, and the upgrade continues and counts as successful.
There is no separate mask with a log of the upgrade steps. The results are in the Webdesk log (file webdesk.log or error.log in the folder webdesk-logs below the Cocoon work directory, as well as on the console or in the container log). Relevant messages:
|
Log message |
Meaning |
Action required |
|---|---|---|
|
|
Start and end of the upgrade of a module. |
None. |
|
|
Which file is currently being executed. |
None. |
|
|
A step with |
Check every message. Some steps are deliberately designed so that they may fail on certain databases; if in doubt, ask support. |
|
|
A step with |
See "If an upgrade step fails". |
The program files of a new version bring actions (act-descr.xml), configurations, text modules (i18n.xml), jobs, connectors, key values, help texts and menu templates. The registration transfers them to the database. Without registration, the database contents stay at the level of the previous version: new actions, menu entries and captions are then missing.
The registration runs in two phases: phase 1 ("ESSENTIALS") registers everything except the text modules, phase 2 ("LABELS (i18n)") the text modules. It is compute-intensive and can take several minutes.
|
Value |
Behavior at startup |
Typical use |
|---|---|---|
|
0 |
No registration. |
Normal operation without an update. |
|
1 |
Full registration (both phases) ignoring the INI file cache; afterwards the value in |
Default for an update. Runs only once. |
|
2 |
Full registration on every startup (first everything except text modules, then the text modules). The INI file cache is used. |
Test and development systems. |
|
3 |
Registration without text modules on every startup. |
When text modules are not to be touched. |
|
4 |
Like 2, but after completion the Webdesk JVM exits with exit code 0. According to the source code intended only for automated deployments and updates with Kubernetes (not documented in the template). |
One-off update container, see section Container. |
Notes:
webdesk.properties. If this file does not exist (e.g. in a container), nothing is reset and the value 1 applies on every startup. If the value is set through the environment variable WD_WEBDESK_RUNREGISTRATION, the variable remains authoritative: remove it after the update or set it to 0, otherwise a full registration runs on every startup.REGISTRATION HAS FINISHED (or REGISTRATION All Phases finished!) appears in the log.actions.ini and textmodules.ini in the subfolder inifiles of the cache directory) remembers for every act-descr.xml and i18n.xml when the file was last changed. A file that is not newer than the remembered state is skipped. If the cache is ignored, all files are read again. The cache is bound to its database: if the database connection changes, it is discarded.allowUpdateOnVersionChange) is set on them. Newly created configurations do not get it (so they are not overwritten afterwards). The flag of all text modules can be set or removed in bulk with the actions "Unlock all Textmodules in Database" and "Lock all Textmodules in Database" in "Extended Tasks" (see Extended Tasks); "Unlock all Textmodules in Database" allows the registration to overwrite all shipped text modules with the original values.In the action "Extended Tasks" (Extended Tasks), the registration can be started during operation, e.g. if webdesk.runRegistration was set to 0 or individual modules failed:
Warning: The message "Registration successfully finished!" also appears when the registration of individual modules has failed, because errors are only written to the log per module. Always verify success in the log. Do not run the registration during business hours.
webdesk.properties and enc.key (located on the classpath of the web application, usually WEB-INF/classes) and, if applicable, tacon.properties of the TA connector. Without the encryption key, stored credentials can no longer be decrypted.log4j2.xml, log files are not appended to but started anew when the new version starts.webdesk.properties, enc.key, logs).webdesk.runRegistration = 1 in webdesk.properties. Reason: after the first start the value is 0, so the registration would otherwise be skipped and new actions, menu entries and captions would be missing. The module upgrade scripts run independently of this setting, always.webdesk.properties and enc.key must afterwards be back on the classpath (WEB-INF/classes) of the new web application, as must any other customer-specific files stored there.WebdeskStartup PoStartupImpl.start() finished after ... and REGISTRATION HAS FINISHED AFTER ...; the latter appears once per phase).webdesk.properties. Configuration and key (webdesk.properties, enc.key) must be provided as before. Alternatively, the following settings can be set through environment variables of the form WD_<PROPERTY> (dots become underscores, upper case; e.g. webdesk.connection.url becomes WD_WEBDESK_CONNECTION_URL): database connections (webdesk.connection.*, shark.connection.*, webdesk.dialect), webdesk.ta.if6020impl.rmi, cluster settings, webdesk.runRegistration, webdesk.disableTimeLineChecks and a few more.webdesk.runRegistration = 4. It performs the schema update, module upgrades and the full registration, and then terminates itself. Only then start the regular containers with value 0; or
WD_WEBDESK_RUNREGISTRATION after the update or set it to 0 (see above).
Note: The web application image contains Tomcat 9 and the session storage through Redis (context.xml). The Redis service must be reachable for the new container.
Couldn't upgrade module, Registration of ... module failed or Action Registration failed!. Messages Upgrade script couldn't be executed normally! have been reviewed.is up-to-date for all modules, i.e. all upgrade steps are complete.webdesk.runRegistration is back at 0 (do not leave operation permanently at 2, 3 or 4).tacon.properties according to the notes of the target version.What the code does in case of an error:
upgrade.xml or prepare.xml aborts (message Couldn't upgrade module ...), Webdesk does not start. The remaining modules are then not processed.prepare.xml files of the pending versions run again.Procedure:
Couldn't upgrade module ... with the associated error cause.
Warning: Webdesk 4 does not execute downgrade scripts. The readme.txt in the module's update folder does mention an optional downgrade.xml, but no such file is executed anywhere in the program (and none exists in the repository). If an older program version is started against an already updated database, no steps are reversed and the Hibernate schema update does not remove any columns; Webdesk merely sets the stored module versions to the lower values. The way back is therefore to restore the backup (databases webdesk and shark as well as webdesk.properties and enc.key) together with the old program version.
Errors during the registration of a module are reported in the log (Registration of ... module failed), but Webdesk keeps running. After fixing the cause, trigger the registration again in "Extended Tasks", if necessary restricted to the affected module and with "Ignore ini-file cache".