AnsweredAssumed Answered

about ProcessDefinitionQuery orderByDeploymentId BUG

Question asked by carson1 on May 20, 2013
Latest reply on May 22, 2013 by frederikheremans1
Hi!
    In my project, I want to make my  ProcessDefinition list ordered by deploy time, so I use this code below:

    repositoryService.createProcessDefinitionQuery().orderByDeploymentId().desc();

    But unexpected results returned, they're ordered incorrectly.

    I use activiti-5.12.1\database\create\activiti.mysql.create.engine.sql to creat db, i noted that the table ACT_RE_PROCDEF with DEPLOYMENT_ID_ varchar(64)  ,  order by this expression will cause my situation. (your deployment_id is auto increased).

    for example, your results is : 908, 890,790,…..,201,1001,102….. 

     look forward to your  reply, thank you !

Outcomes