📘
TimeLine E3
  • TimeLine E3 Documentation
  • Framework
    • Introduction
    • DataSet Definition
    • Window Handling Object
      • Input/Output arguments
      • Open
      • BindDataControls
      • Item Changes
      • Item Search
      • MenuItemClicked
      • Print
      • ModuleOpened (BlueArrow)
      • BlueArrowArguments
      • New Row
      • Delete Row
      • Save
      • Transactions
      • Locking [deprecated]
      • Locking (new)
      • Resizing a response window
      • ParaPanel
      • Adding DMS Tab to a Module
    • BusinessObject
    • Controls
      • BindingFormat
      • LookupGrid and SearchDef
      • ComboBox
      • RadioButton
      • Multiline Textbox
      • xTextBoxSearch
      • xFileBrowse [v16+]
      • DxDispoColumn
      • DxProgressColumn
      • DxTemplateColumn
      • Change control caption programmatically
      • TabControl
      • Navigation
      • Enable controls programmatically
      • Enable a MenuItem programmatically
      • Filter search values
      • Jumping to another module
      • Messages, Notifications, Log, Exceptions, Translation
      • LoggerSink [deprecated]
      • Log
      • OpenFile, FolderBrowsing and SaveFile
      • Execute Actions while displaying an Hourglass
      • Using Progress
      • Async methods with progress bar
      • Wizard
      • Customizing controls using xBehaviors
      • TLProperty.AllowInReadOnly [v16+]
    • DataSet Operations
    • Business-related functionality
      • Getting the next primary key
      • Hybrids
      • Enums
      • Get Current User
    • SQL
    • SQL (using named parameters)
    • Advanced SQL
    • Expression Binding
    • Server-side logic & customization [v16+]
      • Service Hoster
      • Starting / stopping hosted services
      • Changes to scheduled jobs!
      • Business Object Proxies
      • Business Object API
    • Colors in Expression Bindings [v15+]
    • Theming
      • Icons
  • TimeLine Developer (TLD)
    • Debugging in TLD
    • Targets
    • Custom Project Rework [v16+]
  • TimeLine-specific LL functions
  • Stunnel proxy
    • Pre-requisites
    • 1. Initial setup
    • 2. Generate the server/web certificates
    • 3.a. Generating client certificates using the CSR flow
    • 3.b. Generate client certificates from the server console
    • 4. Setting up the E3 client connection
    • 5. Setting up the browser certificates
  • Configuration
    • Configuring the WCF timeout
  • Troubleshooting the E3 Bridge
  • [Deprecated]
    • TimeLine WEB - deprecated in v16+
      • Prerequisites for running the WASM modules on the server
      • Prerequisites for developing WASM modules with TLD
      • Creating a small web module with TLD
      • Terminal Configuration
    • Customization Examples - deprecated in v16+
    • Codestore [deprecated]
    • Configuring the scheduled jobs timeout - deprecated in v16+
Powered by GitBook
On this page
  • Configuring the Service Hoster
  • Logging
  • Creating a custom service
  • Debugging issues with the service hoster
  1. Framework
  2. Server-side logic & customization [v16+]

Service Hoster

A Service to host TimeLine sub-services

PreviousServer-side logic & customization [v16+]NextStarting / stopping hosted services

Last updated 1 year ago

The TimeLine Service Hoster is an independent Windows service which is able to host sub-services which can easily interact with the TimeLine ecosystem. Please note that the term sub-service is used very loosely and is not an actual service, it rather is an AppDomain running in the Service Hoster service. The services are started inside a headless TimeLine client. The client also performs a login to provide access to all non visual TimeLine features like xTransactions, BusinessObjects and the Sql class.

Configuring the Service Hoster

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.

Logging

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.

Creating a custom service

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.

Debugging issues with the service hoster

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.

Example config
Example mandants