Output SAPWIN Files¶
PLOSSYS Output Engine can convert and output jobs in the SAPWIN format. For the conversion, the separate seal-convert-sapwin service is available for Windows which uses the omsprint.exe program from SAP and a local Windows printer queue.
Whenever a SAPWIN file is sent to PLOSSYS Output Engine, the file is passed to the seal-convert-sapwin service.
The current version of the seal-convert-sapwin service is 1.2.1.166.
Installation and Configuration¶
SEAL Systems recommends installing the seal-convert-sapwin service on a separate Windows server. This documentation refers to this server as SAPWIN server.
Install the Packages¶
-
In a browser, log on to the SEAL Systems delivery platform with your logon data:
https://delivery.sealsystems.de
Hint - logon data
You receive the logon data from your Technical Project Manager at SEAL Systems.
-
Download the convert-sapwin - 1.2.1.166 - msi folder. It is saved as
convert-sapwin - 1.2.1.166 - msi.zip. -
Extract
convert-sapwin - 1.2.1.166 - msi.zip. -
Open a PowerShell (Administrator) and change to the
convert-sapwin - 1.2.1.166 - msidirectory and start the installation of the SAP SAPSprint installer package, theseal-convert-sapwinand theseal-consul-agentservices:cd "convert-sapwin - 1.2.1.166 - msi"Set-ExecutionPolicy Bypass -Scope Process -Force; .\install.ps1Hint - path
By default, SAP SAPSprint is installed into
C:\Program Files\SAP\SAPSPrint. If you use another installation directory, you have to specify theOMSPRINT_EXEservice key accordingly for theseal-convert-sapwinservice afterwards. -
Start the script for opening the firewall ports:
Set-ExecutionPolicy Bypass -Scope Process -Force; .\firewall.ps1 -
Start the services:
start-service seal-consul-agentstart-service seal-convert-sapwin
Register the Consul Agent as Client¶
Register the Consul agent on the SAPWIN server as client in Consul.
-
Stop the service:
stop-service seal-consul-agent -
Open the Consul configuration file:
C:\ProgramData\SEAL Systems\config\consul.json -
Specify the following lines so that the Consul agent will become a client:
"server": false, "ui": false, -
Specify any of the servers in the Consul cluster with the following line:
"retry_join": ["<server>"] -
Save the configuration file.
-
Start the service:
start-service seal-consul-agent
Configure the Output Engine Queue¶
Normally, this is done via easyPRIMA. For more information, refer to the easyPRIMA documentation.
-
Open the Seal Control Center. In the sidebar menue, under
easyPRIMAselectManage Queue Parameters. -
Edit the
sapwinQueuequeue parameter to activate it for PLOSSYS Output Engine.
-
Move the parameter from the
HIDDENtab to thePLOSSYStab and specifyRelevant for PLOSSYS Output Engine. -
For the Output Engine queue used for output the SAPWIN files, set the
sapwinQueuequeue parameter to the name of the Windows printer to be used for the SAPWIN conversion. Multiple Output Engine queues can share the same Windows printer if they use the same Windows printer driver.
Hint - changes in easyPRIMA 1.9.0
As of easyPRIMA 1.9.0, the sapwinQueue parameter is already preconfigured and only has to be activated as described above. When using an older version of easyPRIMA, the parameter has to be added manually.
Show Log Messages in Elastic Stack¶
If you want to see the log messages from the seal-convert-sapwin service in Elastic Stack in addition to the local log files, install Filebeat on the SAPWIN server, refer to the SEAL Elastic Stack documentation.
Secure the Installation¶
For how to configure the TLS encryption with Consul, refer to Secure Consul.
If ACL is configured in the Consul cluster, configure ACL for the local seal-consul-agent service as well. Execute the following steps on the SAPWIN server. Use the tokens already created for the Output Engine servers, refer to Configure ACL.
-
Stop the services:
stop-service seal-convert-sapwin stop-service seal-consul-agent -
In
C:\ProgramData\SEAL Systems\config\consul.json, insert theaclblock as on the Output Engine servers:{ "acl": { "enabled": true, "default_policy": "deny", "enable_token_persistence": true }, ... } -
In
C:\ProgramData\SEAL Systems\config\envconsul.json, change the value ofconsul.tokento theSecretIDof the ACL Bootstrap token. -
Start the
seal-consul-agentservice:start-service seal-consul-agent -
Open a PowerShell (Administrator) and set the following environment variables:
$Env:CONSUL_HTTP_SSL='true' $Env:CONSUL_HTTP_SSL_VERIFY='false'Use the same window for all following commands.
-
Change to the directory of the Consul program:
cd "C:\Program Files\SEAL Systems\seal-consul-agent" -
Set the default token to the token for DNS requests:
.\consul.exe acl set-agent-token -token <bootstrap_secret_id> default "<dns_secret_id>" -
Set the agent token to the ACL Bootstrap token:
.\consul.exe acl set-agent-token -token <bootstrap_secret_id> agent "<bootstrap_secret_id>" -
Start the
seal-convert-sapwinservice:start-service seal-convert-sapwin
Example Consul Configuration File¶
Example - Consul configuration file with certificates and ACL
{
"acl": {
"enabled": true,
"default_policy": "deny",
"enable_token_persistence": true
},
"addresses": {
"https": "0.0.0.0"
},
"datacenter": "dc1",
"data_dir": "C:\\ProgramData\\SEAL Systems\\data\\seal-consul-agent\\",
"disable_remote_exec": true,
"disable_update_check": true,
"dns_config": {
"only_passing": true
},
"domain": "consul.",
"encrypt": "GfTiHCQsAMdYyBYhMw==",
"ports": {
"dns": 53,
"http": -1,
"https": 8500
},
"server": false,
"ui": false,
"retry_join": ["abc.sealsystems.local"],
"verify_incoming": false,
"verify_outgoing": true,
"verify_server_hostname": false,
"ca_file": "C:\\ProgramData\\SEAL Systems\\config\\tls-external\\ca.pem",
"cert_file": "C:\\ProgramData\\SEAL Systems\\config\\tls-external\\cert.pem",
"key_file": "C:\\ProgramData\\SEAL Systems\\config\\tls-external\\key.pem",
"auto_encrypt": {
"allow_tls": true
}
}
Troubleshooting¶
seal-convert-sapwin Does Not Register in Consul¶
The seal-consul-agent log on the SAPWIN server shows ACL not found. The seal-convert-sapwin service is running, but Consul does not list it.
The Consul agent uses ACL tokens stored in its data directory that no longer exist in the Consul cluster. This happens, for example, after the SAPWIN server was cloned or the ACL tokens in the cluster were created again. The stored tokens take precedence over tokens specified in consul.json.
To remove the stored tokens, execute the following steps on the SAPWIN server:
-
Stop the services:
stop-service seal-convert-sapwin stop-service seal-consul-agent -
Delete the content of the directory specified as
data_dirinconsul.json, for example:C:\ProgramData\SEAL Systems\data\seal-consul-agent\Caution - SAPWIN server only
Delete the data directory only on the SAPWIN server. Never delete it on the Output Engine servers. There, it contains the data of the Consul cluster.
-
Configure ACL again, refer to Secure the Installation.
Service Keys¶
The following service keys are available for the seal-convert-sapwin service:
ACTION_EXECUTOR¶
ACTION_EXECUTOR specifies the implementation used by the service.
In Consul, the key is specified here. If the key does not yet exist, you have to create it:
dc/home/env/service/convert-sapwin/tag/any/ACTION_EXECUTOR
Available values: String
-
MOCKSimulate the implementation
-
OMSPRINTUse the real
omsprint.exe
Default: OMSPRINT
DEFAULT_OMSPRINT_TIMEOUT_SECONDS¶
DEFAULT_OMSPRINT_TIMEOUT_SECONDS specifies the number of milliseconds after which the omsprint.exe call will be canceled if nothing happens.
In Consul, the key is specified here. If the key does not yet exist, you have to create it:
dc/home/env/service/convert-sapwin/tag/any/DEFAULT_OMSPRINT_TIMEOUT_SECONDS
Available values: Integer
<milliseconds>
Default: 180000
LOG_LEVEL¶
LOG_LEVEL specifies the log level for the correspondent service. Messages that correspond to this log level or a higher one are written to the log file.
In Consul, the key is specified here. If the key does not yet exist, you have to create it:
dc/home/env/service/convert-sapwin/tag/any/LOG_LEVEL
Available values: String
-
debugDebug messages are written to the log file of the service.
-
infoInformation messages are written to the log file of the service.
-
warnWarning messages are written to the log file of the service.
-
errorError messages are written to the log file of the service.
-
fatalSerious error messages are written to the log file of the service.
Default: info
MAX_INSTANCES¶
MAX_INSTANCES specifies the maximum of parallel conversions.
In Consul, the key is specified here. If the key does not yet exist, you have to create it:
dc/home/env/service/convert-sapwin/tag/any/MAX_INSTANCES
Available values: Integer
<number_instances>
Default: 10
OMSPRINT_EXE¶
OMSPRINT_EXE specifies the path where the omsprint.exe program has been installed unless the default directory is used.
In Consul, the key is specified here. If the key does not yet exist, you have to create it:
dc/home/env/service/convert-sapwin/tag/any/OMSPRINT_EXE
Available values: String
<path_to_omsprint>
Default: none