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 fulltext start fulltext fulltext registerstore register data store registerstore <applicationName> <storeName> [processPath] cleanup execute maintenance cleanup cleanup fulltextmerge execute full text merge [collection] fulltextmerge fulltextlist list all full text collections fulltextlist fulltextdump execute full text search and dump results fulltextdump <query> [collection] [local] fulltextreset Reset the full text index fulltextreset fulltextindex Re-index given items fulltextindex items 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 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. Encrypted settings are stored in this path, and the previous layers are overwritten.
<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 '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 the “:” 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.
fulltextmerge
Executes the full-text merge operation on active full-text service to optimize the database.
.\AltiKare.Workflow.Agent.exe fulltextmerge
This command can take a long time depending on the number of records and may cause performance degradation during live use.
fulltextlist
Lists the currently defined full-text catalog database names.
.\AltiKare.Workflow.Agent.exe fulltextlist
Database names are listed as plain text.
.\AltiKare.Workflow.Agent.exe fulltextlist emakin.com-c75ca4bd244e43b4a0342a69fad19be2 mydomain-41aedbcf01a445178a2e4c669d432652
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"
fulltextreset
Resets the full-text database content and initiates the re-indexing process.
.\AltiKare.Workflow.Agent.exe fulltextreset
Since this operation empties the contents of the database, users may see empty lists in the interface until the indexing process is completed. Therefore, it is not recommended to run it during active usage hours.
fulltextindex
Re-index one or more items in the full-text catalog.
.\AltiKare.Workflow.Agent.exe fulltextindex <item1>;<item2>
This operation may include more than one record to be indexed. Record numbers can be separated by the characters “,” or “;”.
.\AltiKare.Workflow.Agent.exe fulltextindex 91212902-c218-4d99-9b41-c736a3fc362c
.\AltiKare.Workflow.Agent.exe fulltextindex 91212902-c218-4d99-9b41-c736a3fc362c;b0ea5b37-958c-4b2c-a178-932751794672
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 ********************************************************************************