AnsweredAssumed Answered

Using IN clause in custom Activiti queries

Question asked by neh@ on Nov 4, 2015
Latest reply on Nov 4, 2015 by neh@
Hi,

I was referring to http://www.jorambarrez.be/blog/2014/01/17/execute-custom-sql-in-activiti/ to build a custom activiti query using the IN clause. When I pass a list of strings as the variableNames to the below MyTestMapper interface I get this error:

org.apache.ibatis.binding.BindingException: Parameter 'variableNames' not found


The mapper looks something like:

public interface MyTestMapper {

@Select({
  "SELECT task.ID_ as taskId, variable.LONG_ as variableValue FROM ACT_RU_VARIABLE variable",
  "inner join ACT_RU_TASK task on variable.TASK_ID_ = task.ID_",
  "where variable.NAME_ in (#{variableNames})"
})
List<Map<String, Object>> selectTaskWithSpecificVariable(List<String> variableNames);

}

So I was wondering what's the correct way to pass in lists and us IN clause for custom queries? Is there an example somewhere I can refer to?

Outcomes