Task "UpdateCheck"
Notice
The "UpdateCheck" task is an automated alternative to a manual update installation (see Update). As an example, this task can be used in special hosting environments in which many parallel program installations need to be kept up to date.
The "UpdateCheck" task checks a specified directory to see whether update packages are available for the current program instance. If update packages are available, they will be installed. The update packages might be completely new program versions, or they might be patches.
The installation of an update package is a multi-stage process and is arranged in the following sequence:
Copy the existing program directory to a temporary directory:
The task creates a new directory with the temporary name
{directory name} update v{new version} [{timestamp}]parallel to the existing program directory{directory name}. A completely new program version is created in this directory. First, a copy of the existing program directory is created in such a way that customer-specific files not included in the update packages are also transferred. The files from a full-range update package are then copied to the temporary program directory. The patch packages based on this are then copied to the temporary directory. Older versions of files with the same name are overwritten during these copy processes.Termination of the running program instance:
The existing program directory must be replaced by the newly generated program directory. This is only possible after the current program instance has ended. The "UpdateCheck" task can no longer be executed when the program instance is terminated. The next steps are therefore carried out by a process that is started separately. In preparation for this, the "UpdateCheck" task creates another temporary copy of the existing program directory with the name
{directory name} updateHelper [{timestamp}]. From this directory, the xSuite Interface program file is started as a new process in a special mode. In this mode, the program file acts as an update helper.Renaming the directories:
The update helper terminates the Windows service of the running program instance and other services that execute the same program file (with other global configurations). The existing program directory with the old program version is renamed to
{directory name} backup v{old version}. The new, still temporarily named directory is given the name of the original program directory. The Windows services are then restarted from this updated directory.Delete the temporary directory:
The temporary directory of the update helper is removed again. To do this, the update helper starts a second instance of the update helper from the updated program directory. The first instance of the update helper is then terminated. The second instance deletes the temporary directory and then is terminated as well.
Notice
Any step in the update process can fail (for reasons including open files preventing a directory from being renamed, or a service not responding to stop/start commands in time). If updates fail to be processed, an attempt will be made to roll back to the original program status.
If one of the rollback steps also fails, a non-running or non-running state will be left behind. However, as no changes will have been made to the content of the original program directory, you will generally be able to restore the original state through manual intervention.
The following properties apply specifically to the "UpdateCheck" task.
Property | Description |
|---|---|
Schedule[].Task[].PackageFolder* | Folder in which available update packages are searched for at root level The following two types of folders are supported:
The update packages must always come in the form of ZIP files and follow the naming scheme NoticeFor a new full version, it is not necessary to provide the executable setup package, but rather a ZIP file whose content corresponds to the program directory of an already executed installation. The folder might contain packages for any program version. The task will independently select the packages relevant for the current program version. If there are multiple packages for newer full versions, only the package with the latest version will be used. Packages with patches are only installed if they match the current program version or the latest full version update. The decisive factor is whether the first two numerical values of the version number match. If multiple patch packages are found, they will be installed in ascending order according to version number. Packages that are officially provided by xSuite always contain all changes that have been made since the last full version. |
Schedule[].Task[].StopServiceTimeout Schedule[].Task[].StartServiceTimeout | Numerical timeout value in seconds, determining how long to wait for the termination and restart of a Windows service before the action is considered unsuccessful Default value: Depending on the number of processing scenarios that need to be initialized/deinitialized by a program instance, it may make sense to set a higher timeout value. It should be noted that an instance may only react to an end command with a time delay because the instance must first complete the ongoing processing of a document in a controlled manner. NoticeThe "UpdateCheck" task can only be used if all program instances are started as Windows services. Such services are the only option supported by this task when it comes to stopping and restarting instances. In order to increase the probability that the services will be terminated promptly, the execution time of the task should be selected so that document processing poses as little load as possible. |
Schedule[].Task[].KillServiceOnTimeout | Boolean value determining whether an additional attempt will be made to terminate a Windows service if the service did not react to the termination commando within the Uncontrolled termination can cause a document that is still being processed by the service to enter an inconsistent state. Default value: |
Schedule[].Task[].DeleteTempFolderOnError | Boolean value determining whether temporarily created program directories (for update installation and update helper) are deleted again in the event of an error during rollback Retaining the temporarily created program directories can be useful for error analyses in order to be able to view the contents of these directories afterwards. Default value: |