AnsweredAssumed Answered

correct order of tasks

Question asked by aurelienpel on Dec 11, 2014
Latest reply on Dec 12, 2014 by aurelienpel

I would like to have all tasks from the .xml file, so I did :

processDefinition =
               ((RepositoryServiceImpl) ProcessEngines
           if (processDefinition != null) {
               for (ActivityImpl activity : processDefinition.getActivities()) {
                 String type = (String) activity.getProperty("type");
                    String myTaskId = (String) activity.getId();
                    String myTaskDocumentation = (String) activity.getProperty("documentation");
                    allTasks.put(myTaskId, myTaskDocumentation);

I have all of them, here is my result :

{task1=this is 1, task3=this is 3, task4=this is 4, Task2=this is 2}

but you can see in the attached files that the order is not the same. I would like this order : 1,2,3,4 ; so the order of the tasks in the correct way.
I don't know if it is possible. If so, what could I add to my function ?

thanks for your help !