skin27 commented on issue #2771:
URL:
https://github.com/apache/camel-kamelets/issues/2771#issuecomment-5496559137
Often don't register correctly because they are initiated dynamically. Thus
you call it like this:
#myBean
However when it runs it's registered as myBean01 or something. It don't get
it to work with beans (though I thought there were some improvements for it). I
now did without a bean:
```yaml
template:
from:
uri: timer:counter
parameters:
period: "{{period}}"
repeatCount: "{{?numbers}}"
steps:
- choice:
when:
- simple: "${variable.route:counter} == null"
steps:
- setVariable:
name: route:counter
simple:
expression: "{{start}}"
resultType: java.lang.Integer
otherwise:
steps:
- setVariable:
name: route:counter
simple:
expression: "${variable.route:counter}++"
resultType: java.lang.Integer
- setBody:
simple: "${variable.route:counter}"
- setHeader:
name: "Content-Type"
constant: "text/plain"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]