AnsweredAssumed Answered

CategoryLike Query Is Not Filtering Results

Question asked by nfox241 on Jul 21, 2011
Latest reply on Jul 22, 2011 by nfox241
All process definitions are being pulled back from the database when calling


It appears the query is being build from the 'selectProcessDefinitionsByQueryCriteriaSql' definition in the ProcessDefinition.xml file:

<sql id="selectProcessDefinitionsByQueryCriteriaSql"> 
      <if test="id != null">
        PD.ID_ = #{id}
      <if test="category != null">
        PD.CATEGORY_ = #{category}
      <if test="name != null">
        PD.NAME_ = #{name}
      <if test="nameLike != null">
        PD.NAME_ like #{nameLike}
      <if test="key != null">
        and PD.KEY_ = #{key}
      <if test="keyLike != null">
        and PD.KEY_ like #{keyLike}
      <if test="resourceName != null">
        and PD.RESOURCE_NAME_ = #{resourceName}
      <if test="resourceNameLike != null">
        and PD.RESOURCE_NAME_ like #{resourceNameLike}
      <if test="version != null">
        and PD.VERSION_ = #{version}
      <if test="deploymentId != null">
        and PD.DEPLOYMENT_ID_ = #{deploymentId}
      <if test="latest">
        and PD.VERSION_ = (select max(VERSION_) from ACT_RE_PROCDEF where KEY_ = PD.KEY_)

A test for categoryLike seems to be missing. 

I'm using activiti-5.6, and I wanted to make sure I wasn't missing something before creating a jira issue.