How to Version Commands in Your Workflow
1. What You Will Learn
You will learn about the role of command versions. Why you should use them and where you can assign a version to a command.
2. Prerequisites
To complete this guide you need:
-
Roughly 10 minutes
-
The PAK Bpmn Editor ( Download )
3. What Does Versioning Commands Do?
The command placed in a workflow describes the identity of the code which needs to be run later in an executable app like the Workflow Executor. The way a command works can change over time through updates. Sometimes those updates can break your workflow. If you want to make sure that your workflow will work the same way and doesn’t change its behaviour automatically, you need to prevent the usage of those updates by setting the version to your commands.
Versions normally follow the form <major.minor.increment> for example 1.0.0 or 2.3.19
By default all newly added commands to a workflow do not have a version set. Commands with no explicit version will always use the newest available version of the command when run by an app. |
4. Version Inside Command Properties
The most direct way to change the used version of a command is to select the command and edit the Command Version
inside the properties. The editor supports you by suggesting available versions in a dropdown and highlighting the versions that match what you’re typing.
We do not suggest to use this method for big workflows, otherwise you will be quite occupied selecting each command node and typing in your versions. |
5. Automatically Version Commands to the Newest Version
Most of the time you want to version the commands to the newest available version. Instead of going through each command property and selecting the most top version, you can use the auto version button in the top left button bar of the editor pane. Once clicked all commands get assigned their newest version. It even updates the version of commands which are already set, making it easier to stay up-to-date.
Auto versioning of commands is not possible until the workflow is complete. A workflow is complete when the start node is connected to an end node and all tasks have a follow up node. |
6. Quickly Version Commands in an Overview
Sometimes you need an overview of the used commands and their versions, or you want to version a command explicitly but cannot find exactly where it is in the workflow. Or you use a command multiple times in a workflow and want to make sure that they have the same version. To get an overview of the mentioned above you can use the quick version button in the top left button bar of the editor pane. The overview shows you the ids of all used commands and their used versions respectively. You can type in your own version or select one from the dropdown menu and by saving the change you assign the versions to the commands.
Quick versioning of commands is not possible until the workflow is complete. A workflow is complete when the start node is connected to an end node and all tasks have a follow up node. |