Service Hoster
A Service to host TimeLine sub-services
Last updated
A Service to host TimeLine sub-services
Last updated
The Service Hoster loads a config called services.json
from the TimeLine servers config directory. To edit it the visual editor inside the TimeLine Server app can be used. To access it right click on the TimeLine Service Hoster and choose Config
.
The service name must be unique. The assembly must not contain a path. It must just be the assembly name including the file ending. The class must be the assembly qualified name of the type (full namespace plus class name). Root path and custom path are optional overrides for the service. The mandants for which the service will be started for can be configured using one of the edit mandants buttons.
Please note, only the Mandant name is required here.
If no username and password are provided, the cached credentials will be used.
Please make sure you perform a initial login on the server mandant in order to cache the credentials!
It is advised to create a new user to run the service. The service will create a session and block the user but it will not use a workplace license.
The assembly is resolved using the ObjectFactory
. The default root is [TimeLine server installation root]\ServicesRoot
. The custom path is set in the TLX.ini
for each mandant. These paths can be overridden for each service using the Root path
and Custom path
properties.
The Service Hoster has its own log file which is located in [TimeLine server installation root]\Logs\ServiceHoster
. Each hosted service has its own sub directory containing the services log files.
Add a reference to TimeLine.Services.Framework
to the project that will contain the service. The service class must inherit from TimeLine.Services.Framework.TlService
.
The TlService
class contains the property Log
which should be used to log any information needed to the services log file. It also has 3 abstract methods which must be implemented.
When the service starts the Init()
method is the first method that is called. Afterwards the login is performed. After a successful login the Start()
method is called. When the service stops the Stop()
method is called.
You can check the log files associated with the service hoster and hosted services to find more information about potential issues. These log files are located in the TLServer\Logs\ServiceHoster
directory.