By default, the Emakin agent is configured to run as windows service or daemon mode but it can be run in CLI (Command Line Interface) mode.
CLI interface provides additional options for configuration or diagnostics.
Commands
help
Prints the available list of commands. Some of the options may depend on the operating system and if not listed if not compatible.
.\AltiKare.Workflow.Agent.exe help Usage: help Show help help install install as service install uninstall uninstall service uninstall basex install basex service basex ubasex uninstall basex service ubasex redis install redis service redis uredis uninstall redis service uredis setconfig Sets a configuration value in protected.json setconfig <key> <value> start start all services start web start web services web agent start agent agent smtp start smtp smtp registerstore register data store registerstore <applicationName> <storeName> [processPath] cleanup execute maintenance cleanup cleanup fulltextdump execute full text search and dump results fulltextdump <query> [domainName] ssltest execute ssl connection test ssltest hostname [port]
Installation Commands
install
Installs the agent service as windows service. Only available in windows operating systems.
.\AltiKare.Workflow.Agent.exe install
uninstall
Uninstalls the agent windows service. Only available in windows operating systems.
.\AltiKare.Workflow.Agent.exe uninstall
basex
Installs the basex service as windows service. Only available in windows operating systems.
.\AltiKare.Workflow.Agent.exe basex
ubasex
Uninstalls the basex windows service. Only available in windows operating systems.
.\AltiKare.Workflow.Agent.exe ubasex
redis
Installs the redis service as a windows service. Only available in windows operating systems.
.\AltiKare.Workflow.Agent.exe redis
uredis
Uninstalls the redis windows service. Only available in windows operating systems.
.\AltiKare.Workflow.Agent.exe uredis
Configuration Commands
setconfig
Sets a configuration setting in an encrypted format.
.\AltiKare.Workflow.Agent.exe setconfig <key> <value>
By default, all configuration parameters are stored in plain text JSON files but sensitive settings like database connection string can be encrypted if needed. Encrypted settings are stored in this path and overwrite the previous layers.
<installdir>/Configuration/Custom/protectedsettings.json
Encrypted configuration settings can be only written and cannot be read back. If you lost this file all values are cannot be retrieved.
For example, the database connection string can be set with;
.\AltiKare.Workflow.Agent.exe setconfig DbConnStr DBConnStr 'Host=myserver;Database=emakin;Username=emakin;Password=mypassword;'
After this command is executed a new protectedsettings.json file is created in the ‘Configuration/Custom’ directory and stores the encrypted connection string.
{ "DbConnStr": "CfDJ8L..........6PT0Kw=" }
Any configuration value from <installdir>/appsettings.json
file can be set with setconfig parameter and child sections can be specified with “:” qualifier.
.\AltiKare.Workflow.Agent.exe setconfig Section:SubSection:Key Value
registerstore
Registers a new data store to be shared across all tenants.
.\AltiKare.Workflow.Agent.exe registerstore <applicationName> <storeName> [processPath]
applicationName specifies the host application and storeName specifies the name of the new store. The shared data store name must begin with “PS_” prefix.
.\AltiKare.Workflow.Agent.exe registerstore myemakin.com PS_MyStore
Optionally if you specify a process definition path, all tables in the process definition are created in the new store. If omitted blank data store is created.
.\AltiKare.Workflow.Agent.exe registerstore myemakin.com PS_MyStore c:/files/sampleprocess.xml
Agent Commands
start
Starts agent in console mode with all modules active.
.\AltiKare.Workflow.Agent.exe start
web
Starts agent only in web server mode. Other services like background jobs or SMTP services will not be started.
.\AltiKare.Workflow.Agent.exe web
agent
Starts agent in only agent mode. Other services like the web server or SMTP services will not be started.
.\AltiKare.Workflow.Agent.exe agent
smtp
Starts agent in only SMTP service mode.
.\AltiKare.Workflow.Agent.exe smtp
Maintenance Commands
cleanup
Executes the cleanup tasks.
.\AltiKare.Workflow.Agent.exe cleanup
This is destructive command and clean-up actions cannot be reverted back, please use it with caution.
Clean-up action performs the following tasks;
Deletes the orphan records in domain membership tables.
Deletes the orphan group members.
Deletes the orphan organization unit positions.
Deletes the orphan organization unit position members.
Deletes the orphan user logins.
Optimizes all tenant full-text databases.
Optimizes the application’s full-text database.
Backup the orphan XML databases and removes them from the database.
Deletes the orphan form data.
fulltextdump
Executes a full-text search and dumps the result in the console for diagnostics.
.\AltiKare.Workflow.Agent.exe fulltextdump <query> [domain]
This command is used to inspect full-text database records and dumps every matching record as a document.
The domain name parameter is optional, if not specified the search is executed in the application database.
.\AltiKare.Workflow.Agent.exe fulltextdump "123***789" Found document (7951). _assignedtoid(I)(S)(S)="NULL" _channelid(I)(S)(S)="c5f3e959-0098-40c3-b52f-86cc4efb34cc" _content(I)(S)(S)="<longtext>" ..... number(I)(S)(S)="000000000000000026186" priority(I)(S)(S)="000000000000000000002" subject(I)(S)(S)="<longtext>" totaltimespent(I)(S)(S)="-00000000000000000000" updatedat(I)(S)(S)="202210040637"
When the domain name parameter is specified, the search is executed in the domain database.
.\AltiKare.Workflow.Agent.exe fulltextdump "123***789" myDomain Found document (7951). _assignedtoid(I)(S)(S)="NULL" ..... subject(I)(S)(S)="<longtext>" totaltimespent(I)(S)(S)="-00000000000000000000" updatedat(I)(S)(S)="202210040637"
ssltest
Performs SSL connection test against target host
.\AltiKare.Workflow.Agent.exe ssltest <host> [port]
This command used to inspect SSL connectivity test with given host and dumps results with common used SSL protocols.
Port parameter is optional, if not specified 443 value is used.
.\AltiKare.Workflow.Agent.exe ssltest mydomain.emakin.com Protocol:Ssl2 Success:False System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. ---> Interop+AppleCrypto+SslException: illegal parameter at AltiKare.Workflow.Agent.Instance.SslTest(String hostname, String port) ******************************************************************************** Protocol:Ssl3 Success:False System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. ---> Interop+AppleCrypto+SslException: handshake failure at AltiKare.Workflow.Agent.Instance.SslTest(String hostname, String port) ******************************************************************************** Protocol:Tls Success:False System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. ---> Interop+AppleCrypto+SslException: bad protocol version at AltiKare.Workflow.Agent.Instance.SslTest(String hostname, String port) ******************************************************************************** Protocol:Tls11 Success:False System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. ---> Interop+AppleCrypto+SslException: bad protocol version at AltiKare.Workflow.Agent.Instance.SslTest(String hostname, String port) ******************************************************************************** Protocol:Tls12 Success:True CipherAlgorithm:Aes128 CipherSuite:TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 ********************************************************************************