Hi,
I’m using Spring Zeebe to implement my C8 JobWorker. I’ve chosen the @Variable approach as I want to limit the variables which are loaded from Zeebe.
The documentation states " With @Variable or fetchVariables you limit which variables are loaded from the workflow engine."
However I saw in the debugger that the worker actually loads all variables and then throws the unnecessary ones away. Is this the way it is meant to be? My expectation is, that it works as “fetchVariables”, which works as expected and loads the names variables only.
So the basic question is, if this is a bug or a feature and can I expect a fix for it?
Hi @jonathan.lukas ,
thanks for your reply. This points to the actual problem I guess. Because I always inject the ActivatedJob as it is stated in the documentation:
@JobWorker(type = "foo")
public void handleJobFoo(final JobClient client, final ActivatedJob job, @Variable String variable1) {
System.out.println(variable1);
// ...
}
Leaving out the ActivatedJob seems to do the trick. Maybe the documentation should give an advice on this?