tServerAlive

Highlighted
One Star

tServerAlive

hello
When I use the tserveralive passing the parameters for variables it does not work, only if I type, have tested the variables and they return me the correct value, address and port, but always the value of tserveralive is false.
This list containing the host and port are coming from a CSV file.
tFileInputDelimited ----> tJavaRow -> globalMap.put ("host" row1.host); and globalMap.put ("host" row1.port);tServeralive ----> (String) globalMap.get ("host"); and (String) globalMap.get ("port");
But the result is always false.
If you know tell me what's wrong.
Tanks.
Community Manager

Re: tServerAlive

Hi 
The job design looks like:
tFileInputDelimited--main(row1)--tFlowToIterate--iterate--tServerAlive--oncomponentok--tJava
on tServerAlive, you can configure the Host filed with current host value with expression:
(String)globalMap.get("row1.host")
The same syntax for Post field.
on tJava, you check the result like:
boolean result=((Boolean)globalMap.get("tServerAlive_1_SERVER_ALIVE_RESULT"));
System.out.println(result);
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

What’s New for Talend Spring ’19

Join us live for a sneak peek!

Sign up now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch