Chapter 15. Launch Service

The Launch Service provides users with convenient way of remotely executing the CloverETL graphs via a simple web-based interface which can be customized to fit the needs of the users.

The Launch Services can be used with any browser and therefore do not require users to install any software. This allows for convenient control of the graph execution which can be easily tied to external tools if necessary (requests can be sent from custom applications as well).

Launch Service Overview

The architecture of Launch Service is relatively simple and follows the basic design of multi-tiered applications utilizing the browser.

Launch Service Overview

Figure 15.1. Launch Service Overview


The basic usage scenario of client form page is simple:

  1. User opens the Launch Service web page in his browser

  2. User enters the parameters of the graph (if required)

  3. The data is submitted to the CloverETL Server. This is the moment the service is actually called.

  4. All the results (including error messages or logs) are sent back to the user and displayed in the browser. The logs are also available for inspection via CloverETL Server GUI.

The Launch Service web pages which are presented to users can be fully replaced by client's web application or by third party application which calls CloverETL Launch Service by HTTP request. This allows full customization of the outside appearance of the web - for example, it can be a simple web form which communicates with users in the terminology they are familiar with.

Deploying Graph in Launch Service

To enable users to access the specific graph via Launch Service, several steps have to be taken:

  1. The graph has to be designed to allow its parameters to be passed via dictionary.

  2. The graph has to be configured in CloverETL Server in Launch Service section.

  3. The form which will submit the data to Launch Service has to be written.

Overall the deployment of the graph to the Launch Service is not much more complex compared to the regular graph development process. In following chapters all the steps will be described in more detail alongside some basic examples.

Designing the Graphs for Launch Service

To use the graphs from Launch Service, the Launch Service requires the graph to use dictionary when parameters have to be passed to the graph. Dictionary is a data storage associated with each run of the graph in CloverETL. For more details about the dictionary see section "Dictionary" in CloverETL Designer docs.

To use the Dictionary from the Launch Service, the graph author is required to specify the entries of the dictionary in graph's XML source file. For more details about the Dictionary XML element see section "Dictionary" in CloverETL Designer docs.

Apart from the use of the dictionary, the Launch Service does not impose any other restriction on the graphs it should run. The graphs can therefore use all the facilities provided by the CloverETL engine.

Configuring the Graph in CloverETL Server web GUI

To notify the Launch Service about the graphs that will be available via its interface, the Launch Service has to be properly configured via CloverETL Server GUI.

Launch Service uses launch configurations to store the details about how each graph can be run. Each launch configuration contains full description of the graph's parameters, how they are mapped to the parameters passed from the web interface and so on.

Each launch configuration is identified by its name, user and group restriction. Several configurations with the same name can be created as long as they differ in their user or group restrictions.

Use restrictions can be used to launch different graphs for different users even though they use the same launch configuration (for example, the developers may want to use debug version of the graph while the end customers will want to use the production graph). The user restriction can also be used to prohibit certain users from executing the launch configuration.

Similarly, the group restriction can be used to differentiate graphs based on the group membership of the user which runs the launch configuration.

When the configuration is launched, the correct configuration is picked based on the configuration name, user specification and group specification. If multiple configuration match the current user/group and configuration name, the most specific one is picked (the user name has higher priority than the group name).

Adding New Launch Configuration

New launch configurations can be added by clicking on New launch configuration link on the Launch Services tab in CloverETL Server GUI:

Launch Service section

Figure 15.2. Launch Service section


After the configuration has been created it will appear in the table on the left side among the other existing configuration. Before using the configuration user will have to add parameter mapping. To add parameter mappings click on the detail link for the newly created configuration. The details will be displayed on the right side of the window in a simple table:

The Basic Info tab

Figure 15.3. The Basic Info tab


The Basic Info tab shows the basic details about the launch configuration. These can be modified in the Edit Configuration tab:

Edit Configuration tab

Figure 15.4. Edit Configuration tab


Following fields can be modified:

Finally, the tab Edit Parameters can be used to configure parameter mappings for the launch configuration. The mappings are required for the Launch Service to be able to correctly assign parameters values based on the values sent in the launch request.

Edit Parameters tab

Figure 15.5. Edit Parameters tab


To add new parameter mapping click on the New property link. Each property required by the graph has to be created (internal graph properties do not need mappings).

Edit Parameters tab

Figure 15.6. Edit Parameters tab


Following fields are available for each property:

To create the new mapping, click on the Create button after all the fields have been filled. After the mapping is created, it will be displayed in the list of existing mappings. It can be later edited or deleted by clicking on appropriate links.

Edit Parameters tab

Figure 15.7. Edit Parameters tab


Sending the Data to Launch Service

To launch the graph which has been configured for use with Launch Service, the user has to send a launch request. The launch request can be sent via HTTP GET or POST methods. A launch request is simply an URL which contains the values of all parameters that should be passed to the graph. The request URL is composed of several parts:

[Clover Context]/launch/[Configuration name]?[Parameters]

Based on the above, the full URL of launch request for our example with mountains may be like this: http://server-demo.cloveretl.com:8080/clover/launch/NewMountains?heightMin=4000. In the request above, the value of heightMin property is set to 4000.

Results of the Graph Execution

After the graph's run terminates, the results are sent back from the engine to the server and finally to the user. The output is partially defined in the dictionary which is declared in the graph's XML file. The dictionary can mark selected parameters as output parameters. All the output parameters are sent to the user after the graph execution is finished.

Depending on the number of output parameters, the following output is sent to user:

Launch requests are recorded in the log files in directory specified by launch.log.dir property in CloverETL Server configuration. For each launch configuration one log file named [Configuration name]#[Launch ID].log is created. For each launch request this file will contain only one line with following tab-delimited fields:

If the property launch.log.dir is not specified, log files are created in temp directory [java.io.tmpdir]/cloverlog/launch. Where "java.io.tmpdir" is system property.

In case the configuration is not valid, the same launch details are saved into the _no_launch_config.log file in the same directory. All unauthenticated requests are saved to the same file as well.