13_WinCanVX_ServiceHost_EN

image-20240604-100951.png



Automating Data Transfer with Service Host


Version: 1.2.1
Date: 30.04.2020


Table of Contents
1 Introduction and Concept
2 Prerequisites
3 Preparing project data for a TV-truck
4 Configuration of Services and Tools
4.1 Configuration of the transfer process (truck installation)
4.2 Installation of the Service Host module
4.3 Configuration of the Windows Task Scheduler
4.4 Configuration of the Service Host module
4.5 Configuration in WinCanVX (truck installation)

Introduction and Concept

When working with the application software WinCanVX inspection companies normally create new projects directly in the CCTV-truck and start with the survey afterwards.
In some cases projects can be created in the office where the users may import pipe section data from different sources (GIS, XML or XLS files). These projects then are manually copied on the computer in the CCTV-truck in order the operator doesn't have to type all the section data and thus is able to focus on the inspection job.
Such transfer procedures, which are important for large companies or local water authorities can be automated with the Service Host. This module is providing an interface that shows all the incoming data to be transferred to the target database located on a domain server. 
The illustration below is showing the most important steps of the entire transfer procedure:

The present documentation is going to explain in detail the functionalities of the module Service Host as well as the settings of all services and tools the Service Host needs for proper data transfer.

Prerequisites

The items listed below are always required to make full use of the Service Host:

  • Domain SERVER with MSSQL-Server and the module ServiceHost installed.

  • Office computer (CLIENT) with the latest version of WinCanVX installed.

  • Mobile computer (VEHICLE) with the latest version of WinCanVX installed.

  • Network drive with full control to a default folder structure used for data transfer.


Note that the Service Host also needs the following services, tools and VX options activated in order to guarantee a proper workflow and data processing:

  • TaskScheduler: WINDOWS service

  • WinCanVX tool: Server Transfer

  • WinCanVX option: Home > Settings > ServiceHost strategy

Preparing project data for a TV-truck

The workflow often starts with a project created on an office computer. The project data are usually taken from a GIS or data files (formats XML, XLS) that can easily be imported.
Open the project participants panel and assign the TV-trucks, that you already entered into the equipment list, to the corresponding work order group and work processes.
Create a new folder (e.g. TRANSFER) with two sub-folders (IN and OUT) on a network drive. This folder structure is crucial for a proper transfer of project data via the ServiceHost module: incoming data are copied to the sub-folder IN whereas outgoing data are copied to the sub-folder OUT.


Mind that outgoing data have to be copied from the office computer into the subfolder OUT whereas the operator has to copy incoming data into the subfolder IN after finishing the survey.
The Service Host regularly checks the subfolder IN and automatically merges new project data into the SQL database.


Configuration of Services and Tools

The following chapter describes all important configuration details within the services and tools in order to make sure the ServiceHost will finally work as expected.

Configuration of the transfer process (truck installation)

This configuration has to be done in WinCanVX after the installation on the vehicle computer. Transferring project data on the target network drive is thus automated. The operator then can just log-in to the SERVER and launch the process as soon as he is back in the office.
Open WinCanVX, hit the tab DataExchange and click on Transfer to Host:

At the first launch of this tool, you must make sure the expert mode is activated in order to have all available steps listed by the wizard:


Select the project you want to upload to the network drive and hit the button NEXT.
You now need to specify the UNC path name as well as the target directory where the projects should be uploaded to:


In case the network drives are already mapped you can also hit the tab File and enter the corresponding drive letter.




Installation of the Service Host module

MSSQL-Server as well as the module Service Host can both be installed on the same physical machine. Download the latest version of the Service Host installation package from www.wincan.com\downloads (http://www.wincan.com\downloads), double click on it and follow the steps given by the wizard:

Especially mind that you keep the option Install as a Windows service unchecked (step 3 of the installation wizard).
The Service Host is launched via the file C:\ProgramFiles (x86)\CDLAB\ServiceHost\Start.bat. So create a shortcut to this file on the desktop in order to run the tool more quickly.

Configuration of the Windows Task Scheduler

This chapter describes all the steps needed to set the Service Host as an automated task in Windows. You thus can make sure this tool is launched automatically and is fully operational each time the machine starts.

  1. Right click on the icon This PC; hit the command Manage, select the TaskScheduler and create a new task:



Especially mind the settings as depicted below in order to get the Service Host tool launched as desired:
Select the tab General and enable the options as highlighted below:

Next switch to the tab Triggers and define the new event At startup:

Select the tab Actions and define the new action:

Select the tab Conditions and make sure all restrictions are disabled (recommended):

Finally hit the tab Settings and make sure the highlighted options are checked:



Configuration of the Service Host module

Next, you need to set up the job that automatically merges the incoming projects to a certain SQL server database. Double click on the file Start.bat to open the Service Host interface and hit the button Edit job:

Select the item Auto Job inside the dialogue that follows and enter a name for it (1). This name must match to the job name you configured in the group export tool and on the truck computers.
Enter the path of the folder (i.e. Trigger (3)) which the projects are uploaded into from the truck:
T:\02_TRANSFER\IN*3**1*MERGE_ProjectData*2*
The main configuration of the job is done now. Next you need to configure the type of job that should launch automatically after a project has been uploaded.
In the current example we want to automate the merge so double-click on the entry Merger in the panel on the left hand side (4) and type any name for this process (5).
T:\02_TRANSFER\INMERGE_ProjectData*4*
Ignore the tab Source Databases as the source will always be different. Go directly to the tab Target databases and enter all parameters of the SQL server database (6) where the data should be merged to:
566
Finally save the job, which will then be saved as a XML file located at C:\Users\Public\Documents \CDLAB\Common\ServiceHost\JobsPool.

You may thus prepare just the job file and send it to the customer who only needs to copy it into the sub-folder JobsPool in order to get it run.
In practice jobs are running immediately as soon as they appear in the list, so the Service Host usually shows just the most recent job.

Configuration in WinCanVX (truck installation)

In order to make sure that projects, which are created manually in the trucks, are included in the service host process, you will have to specify the name of the service host plan in WinCanVX.
Run the command Home>Settings and select the category Presets (1). Enter the same name of the job (service host plan (2)) that you already set in the service host:
21