|
|
# Open Send Message Dialogue from Command Line
|
|
|
|
|
|
The application should be able to open the send message dialogue with already filled-in content. The content of the dialogue should be passed via the command line interface.
|
|
|
The providers of a records management service want to be able to open the send message dialogue in datovka from their application to provide more comfort for their users.
|
|
|
|
|
|
## Motivation
|
|
|
The application should be able to open the send message dialogue with already filled-in content. The content of the dialogue form should be passed via the command line interface.
|
|
|
|
|
|
Mr. Pavel Krkoška, a SingleCase representative, has contacted us with the the request for the above-mentioned functionality. They want to be able to trigger the opening of the send message dialogue from their application to provide more comfort for their users.
|
|
|
## Brief Function Description
|
|
|
|
|
|
## Brief Description of Function
|
|
|
|
|
|
1. The user of the records management service application selects documents to send them via Datovka. He/she then triggers the operation to send the documents via Datovka.
|
|
|
1. The user of the records management service application selects documents he/she wants to send via Datovka. He/she then triggers the operation to send the documents via Datovka.
|
|
|
|
|
|
1a. The records management service application creates temporary files containing the documents which are required to be sent via Datovka.
|
|
|
|
|
|
1b. The records management service application passes the paths to the created temporary documents to Datovka by calling the application executable with suitable command-line arguments.
|
|
|
1b. The records management service application passes the paths to the created temporary files to Datovka by calling the application executable with suitable command-line arguments.
|
|
|
|
|
|
2. Datovka starts (if it has not been already running) and displays the send message dialogue. The dialogue form must contain all documents which have been specified by the user in the records management service application.
|
|
|
|
... | ... | @@ -22,7 +20,7 @@ Mr. Pavel Krkoška, a SingleCase representative, has contacted us with the the r |
|
|
|
|
|
4. The user should be provided with the opportunity to send the created ISDS data message back into the records management service if this service is configured within the Datovka application.
|
|
|
|
|
|
4a. In order to send the sent message back to the records management service the newly sent message must be acquired from the ISDS server. The user is presented (at the bottom of the send message dialogue) with the choice to do so if he desires it.
|
|
|
4a. In order to upload the sent message to the records management service the newly sent message must be acquired from the ISDS server. The user is presented (at the bottom of the send message dialogue) with the choice to do so if he desires it.
|
|
|
|
|
|
4b. If the user has chosen to upload the newly sent message into the records management service then the upload to records management dialogue is automatically presented to him after the sent message has been successfully downloaded.
|
|
|
|
... | ... | @@ -32,12 +30,14 @@ Mr. Pavel Krkoška, a SingleCase representative, has contacted us with the the r |
|
|
|
|
|
### Detecting Datovka in the System
|
|
|
|
|
|
**Implemented in development branch.**
|
|
|
|
|
|
Datovka didn't advertise its presence in any of the supported operating systems.
|
|
|
|
|
|
On UNIX-like systems (excluding macOS) it is commonly installed into the default application path - unless the administrator specifies otherwise. In such case it is the administrator's job to retain all of the required functionality and we are not to be blamed for any error.
|
|
|
|
|
|
On macOS the Datovka package is usually installed to the location `/Applications/datovka.app`. However the application may also reside somewhere in a path specified by the system user. The order of preference detection could be:
|
|
|
* primarily, launch Datovka from the specified environment PATH
|
|
|
On macOS the Datovka package is usually installed to the following location: `/Applications/datovka.app`. However the application may also reside somewhere in a path specified by the system user. The order of preference detection could be:
|
|
|
* primarily, launch Datovka from `PATH`
|
|
|
* secondarily, launch Datovka from the default package location
|
|
|
|
|
|
On Windows we provide three ways of how Datovka is distributed:
|
... | ... | @@ -45,16 +45,16 @@ On Windows we provide three ways of how Datovka is distributed: |
|
|
* portable version in a zip archive (stores data in application directory)
|
|
|
* normal version in a zip archive (stores data in home directory)
|
|
|
|
|
|
The testing build of the Windows installer (msi) sets a registry value (similar to values specified [here](windows-specific)) which would advertise the location of the installed application. The installer sets the following two registry keys `AppLocation` and `AppLocationCLI` which hold the full path to the installed executables. The keys are located in the path `HKEY_LOCAL_MACHINE\Software\CZ.NIC\Datovka\`. The installer may in future also set the values in the `HKEY_CURRENT_USER` tree - but this is not the case now.
|
|
|
The testing build of the Windows installer (msi) sets a registry value (similar to values specified [here](windows-specific)) which advertise the location of the installed application. The installer sets the following two registry keys `AppLocation` and `AppLocationCLI` which hold a full path to the installed executables. Both keys are located in the path `HKEY_LOCAL_MACHINE\Software\CZ.NIC\Datovka\`. The installer may instead in future set these values in the `HKEY_CURRENT_USER` tree - but this is not the case now.
|
|
|
|
|
|
> Datovka is a 32-bit application. You may therefore on 64-bit Windows need to check values in the `WOW6432Node` subtree (i.e. `HKEY_LOCAL_MACHINE\Software\WOW6432Node\CZ.NIC\Datovka\`).
|
|
|
|
|
|
Datovka location could also be set in the environment `PATH` variable. However, setting the value of the `PATH` variable is left on the user.
|
|
|
Datovka location could also be set in the environment `PATH` variable. However, setting the value of the `PATH` variable is left on the user. This may be the needed in the case of Datovka applications which have been extracted from the zip archives.
|
|
|
|
|
|
The default installed location of Datovka on 64-bit Windows is `c:\Program Files (x86)\CZ.NIC\Datovka`.
|
|
|
|
|
|
A preferred way of Detecting Datovka on Windows would presumably be:
|
|
|
1. Look for a registry value in `HKEY_LOCAL_MACHINE` an then `HKEY_CURRENT_USER`.
|
|
|
1. Look for a registry values in `HKEY_LOCAL_MACHINE` an then `HKEY_CURRENT_USER`.
|
|
|
2. Try launching Datovka via the `PATH` environment variable.
|
|
|
3. Try launching Datovka from some guessed 'standard' paths.
|
|
|
|
... | ... | @@ -62,11 +62,11 @@ Of course, the records management service application could ask the user to dire |
|
|
|
|
|
### Passing Required Data
|
|
|
|
|
|
**Implemented in a testing branch.**
|
|
|
**Implemented in development branch.**
|
|
|
|
|
|
A development version of Datovka supports the `--compose` command-line option. The option is similar to the already present `--send-msg` [CLI](cli) option. Most of the arguments are similar.
|
|
|
|
|
|
> The `--compose` command-line option is available only for the GUI application because it raises the send message dialogue window. On Windows we are also distributing separate CLI applications **datovka-cli.exe** and **datovka-cli-portable.exe** because of various issues with the usage of the command line and GUI application on Windows. These specialised CLI applications don't and won't support the `--compose` command-line option.
|
|
|
> The `--compose` command-line option is available only for the GUI application because it raises the send message dialogue window. On Windows we are also distributing separate CLI applications **datovka-cli.exe** (or **datovka-cli-portable.exe**) because of various issues with the usage of the command line and GUI application on Windows. These specialised CLI applications don't and won't support the `--compose` command-line option.
|
|
|
|
|
|
**--compose**
|
|
|
The argument to the `--compose` parameter consists of a single string containing value assignments to the following keys:
|
... | ... | @@ -113,11 +113,12 @@ The records management service application will write files in a usual temporary |
|
|
### Handling the Open Dialogue Request in Datovka
|
|
|
|
|
|
Calling Datovka with `--compose` option will:
|
|
|
|
|
|
1. When Datovka is already running then all required data are passed to the main Datovka process.
|
|
|
|
|
|
1a. The invoked Datovka process checks the supplied arguments for basic sanity and if no errors (e.g. unknown arguments) ha been detected then all data are going to be passed to the already running Datovka process. The invoked process exist successfully if no errors have been detected. The invoked Datovka process terminates before the actual sending of the message.
|
|
|
1a. The invoked Datovka process checks the supplied arguments for basic sanity and if no errors (e.g. unknown arguments) have been detected then all data are going to be passed to the already running Datovka process. The invoked process exist successfully if no errors have been detected. The invoked Datovka process terminates before the actual sending of the message.
|
|
|
|
|
|
1b. The main process will collect the data and notify the user about any potential error (e.g. non-existent file). A pre-filled send message dialogue window is presented to the user.
|
|
|
1b. The main process will collect the passed data and notify the user about any further error (e.g. non-existent file). A pre-filled send message dialogue window is presented to the user if no critical errors occur.
|
|
|
|
|
|
2. The command with `--compose` option will start the Datovka application when it has not been running. The started process does not create a separate child process to detach from the calling environment. It is left to the calling environment to detach the newly created process. The calling environment must assure that the Datovka process is left running in order to let the user to finish the sending operation.
|
|
|
|
... | ... | |