Unified API Developer Manual / Version 2506.0
Table Of ContentsThe Unified API offers some administrative functionality for dealing with process definitions. As described in the Workflow Manual, a process definition consists of some XML, which may contain references to custom Java classes. The byte code of custom Java classes has to be supplied either in the classpath of the Workflow Server, or in an accompanying JAR file. Note however, that uploading accompanying JAR files is not recommended anymore. The possibility to upload JAR files has been deprecated and will be removed in a future release.
Code that is deployed in the Workflow Server's class path is shared between all versions of all workflows, and can only be changed by shutting down and restarting the Workflow Server. If a new workflow version requires changes in custom classes that are not compatible with previous versions, then these new classes should use different Java packages or class names, so that both old and new classes can be provided in the classpath.
In contrast, custom code that is uploaded as JAR file together with the process definition's XML is used
only by this version of this process definition. Such code can be updated without restarting
the Workflow Server, and runs in a separate class loader,
so that classes are not shared with other process definitions.
However, this approach has been deprecated and should not be used anymore, because of potential problems
with storing executable code in the database. With different versions of custom code in the database,
it can become hard to track which code is actually used in production, and to detect and fix security
issues in all variants of uploaded custom code. Furthermore, in case attackers have gained write access
to the database, they could use this feature to execute code in the Workflow Server.
If unused, it is therefore recommended to disable the usage of uploaded classes with configuration
property workflow.server.use-uploaded-jar=false. See
Table 3.34, “Workflow Server Properties” in Deployment Manual for a description
of that property.
In the Unified API, the method WorkflowRepository#createProcessDefinition is used to upload an XML process definition to the Workflow Server. Later, it can be retrieved again using ProcessDefinition#getProcessDefinition.


