My company is doing an evaluation of Activiti with Grails and I'm getting an error trying to query tasks based on process variables.I'm trying to get tasks associated with a specific company. I created the process and passed in a map with an integer in it for companyID.I can see the variables for my process instance and the variable's type is shown to be java.lang.Integer, but I get an exception that my variable is of type ByteArray. Error shown below:
groovy:000> runtimeService.getVariables('28')
===> {documentID=null, companyID=51613, initiator=mwalker, personID=4132522 }
groovy:000> runtimeService.getVariables('28').companyID.class
===> class java.lang.Integer
groovy:000> taskService.createTaskQuery().processVariableValueEquals("companyID", 51613).list()
ERROR org.activiti.engine.ActivitiIllegalArgumentException:
Variables of type ByteArray cannot be used to query
at org.activiti.engine.impl.QueryVariableValue.initialize (QueryVariableValue.java:52)
at org.activiti.engine.impl.TaskQueryImpl.ensureVariablesInitialized (TaskQueryImpl.java:416)
at org.activiti.engine.impl.TaskQueryImpl.executeList (TaskQueryImpl.java:461)
at org.activiti.engine.impl.AbstractQuery.execute (AbstractQuery.java:139)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute (CommandExecutorImpl.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute (CommandContextInterceptor.java:61)
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction (SpringTransactionInterceptor.java:42)
at org.activiti.spring.SpringTransactionInterceptor.execute (SpringTransactionInterceptor.java:40)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute (LogInterceptor.java:31)
at org.activiti.engine.impl.AbstractQuery.list (AbstractQuery.java:113)
at groovysh_evaluate.run (groovysh_evaluate:2)
…
Any idea what the problem is or what I'm doing wrong?Thanks for any help on this!