Using MetaServlet to handle ESB execution tasks - 6.3

Talend Administration Center User Guide

EnrichVersion
6.3
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend Real-Time Big Data Platform
task
Administration and Monitoring
Deployment
EnrichPlatform
Talend Administration Center

The following scenario demonstrates how to use MetaServlet to handle ESB execution tasks in Talend Administration Center.

Prerequisites:

Make sure your Talend Runtime server(s) are configured (agent must be running), and the Route, Service or Job item to be executed that is designed in the Studio has been published into the Artifact repository, which is also started. Then you can create the various execution tasks that you want to launch.

Creating a task on the ESB Conductor page

  1. Open the Windows command line or Linux terminal, and go to the following directory:

    ./org.talend.administrator/WEB-INF/classes

  2. To call the metaServlet on Windows, run the MetaServletCaller.bat file.

    To call the metaServlet on Linux, run the MetaServletCaller.sh file.

  3. Type in the following script to create an execution task for the Route DemoRESTRoute, which has been published into the Artifact repository:

    MetaServletCaller.bat
    --tac-url=http://localhost:8080/org.talend.administrator 
    --json-params=
    {
    "actionName":"saveEsbTask",
    "taskName":"demoREST",
    "description":"demo",
    "tag":"Mygroup",
    "repository":"snapshots",
    "featureName":"DemoRESTRoute-feature",
    "featureVersion":"0.1.0-SNAPSHOT",
    "featureType":"ROUTE",
    "runtimeContext":"Default",
    "runtimeServerName":"runtime_server",
    "runtimePropertyId":"DemoRESTRoute",
    "authPass":"admin",
    "authUser":"admin@company.com",
    "featureUrl":'mvn:org.example/DemoRESTRoute-feature/0.1.0-SNAPSHOT/xml'
    }

    The response from the Talend Administration Center server is displayed in the command lines:

    The task is displayed on the ESB Conductor page of Talend Administration Center:

    Multiple context parameters should be separated by comma(s). You should replace the parameters used in the command with what they are in real contexts.

Updating a task on the Job Conductor page

  • Type in the following script to update the task that is just created:

    MetaServletCaller.bat
    -tac-url=http://localhost:8080/org.talend.administrator 
    -json-params=
    {
    "actionName":"updateEsbTask",
    "taskId":"34",
    "taskName":"demoREST-update",
    "description":"demo-update",
    "tag":"Mygroup-update",
    "repository":"snapshots",
    "featureUrl":'mvn:org.example/DemoRESTRoute-feature/0.1.0-SNAPSHOT/xml',
    "featureName":"DemoRESTRoute-feature",
    "featureVersion":"0.1.0-SNAPSHOT",
    "featureType":"ROUTE",
    "runtimeContext":"Default",
    "runtimeServerName":"runtime_server",
    "runtimePropertyId":"DemoRESTRoute",
    "authPass":"admin","authUser":"admin@company.com"
    }

    The response from the Talend Administration Center server is displayed in the command lines: