Hi Flowable Team,
How to set a variable scope as global in Java delegate class ?
Thanks,
Manjunath
Hi Flowable Team,
How to set a variable scope as global in Java delegate class ?
Thanks,
Manjunath
Hi,
You can invoke execution.setVariable(“varName”, “test”); to set a process instance level variable.
Best regards,
Tijs
Hi @tijs
I am doing the same way, when querying the history it returns the scope of all variables as local.
Could you please let me know is there a way to explicitly to set the global scope ?
Thanks
Manjunath
Can you paste the code you’re using for setting the variables and the call you do for fetching the data through the REST api?
HI @joram
Below is the code snippet:
@Override
public void notify(DelegateExecution execution)
// TODO: Need to make it to read tenant specific data.
execution.setVariable(“var1”, “Hellow”);
execution.setVariable(“var2”, “World !”);
}
REST API:
http://localhost:8081/query/historic-process-instances
Hi,
Your variables have process instance wide scope, but when you are getting the variables as part of the historic process instance query the returned scope is local, since the scope on a process instance level is set as local. But these are process instance scoped variables, so you’re all good.
Best regards,
Tijs