Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am using this below expression in the cSetBody.
Language: SIMPLE
Expression: "This messaged is generated in a Route at :" + TalendDate.getCurrentDate()
The issue is, In each message I am getting the same datetime even though messages are parted by 1 min. How can I get the current time on each message body?
I tried using the Numeric.sequence("MessageCount", 1,1) in the expression builder. that is also always returning 1 every time a new message is generated. why is that?
Thanks,
Sowjanya.
Hi,
@sowjanya wrote:
Hi,
I am using this below expression in the cSetBody.
Language: SIMPLE
Expression: "This messaged is generated in a Route at :" + TalendDate.getCurrentDate()
The issue is, In each message I am getting the same datetime even though messages are parted by 1 min. How can I get the current time on each message body?
I tried using the Numeric.sequence("MessageCount", 1,1) in the expression builder. that is also always returning 1 every time a new message is generated. why is that?
Thanks,
Sowjanya.
What does your expected result look like? Could you please set an example for us?
Best regards
Sabrina
My expectation is to log the below messages, given that the route started at 15:03:55 and cTimer is set to generate messages with a delay of 1 min.
> "This messaged is generated in a Route at : Wed Oct 11 15:03:55 PDT 2017"
> "This messaged is generated in a Route at : Wed Oct 11 15:04:55 PDT 2017"
> "This messaged is generated in a Route at : Wed Oct 11 15:05:55 PDT 2017"
> "This messaged is generated in a Route at : Wed Oct 11 15:06:55 PDT 2017"
> "This messaged is generated in a Route at : Wed Oct 11 15:07:55 PDT 2017" ....and so on.
Issue is that it prints the same time even for a message generated 30 mins after the route has started.
> "This messaged is generated in a Route at : Wed Oct 11 15:03:55 PDT 2017"
thanks,
Sowjanya.