I've faced with an exception that surprised me.
This is an example of the worker:
@JobWorker(type = "processTasks")
public void processTasks(@Variable List<Long> batch) {
var firstElement = batch.get(0);
}
And it fails in runtime with java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Long
Input list comes as List<Integer> in runtime and can't be matched to firstElement with type Long