ARIS Community - We Love BPM

Sorting objects using reports

sunilsbo's picture
by Sunil Oza in Reports & Macros posted on 2018-01-22


Can anyone please share a piece of code to sort the function objects occurring in an EPC with a user-defined attribute (multiline text). For example consider a user-defined attribute frequency or step number.

Thanks in Advance.

Sorry there are no tags
There are no attachments
Kay Fischbach posted on 2018-01-22


(I had to put the report script part into a txt file because of long comment lines. It would be unreadable otherwise. The txt file should be attached to this comment)

File attachments: 
Tricarico Romain posted on 2018-01-22

Hello Mister,

We have a script to use on a model to define the order of occurrences. The order is written in an attribute of the model (because of object reusing). You can define for every model type the objects and symbols to include or exclude in the ordered list.

Then, a java script function (to copy in your own scripts) is provided. This function takes an occurrences list in param and return the list ordered regarding the order defined.

Please, find attached a short presentation of the script.

Unfortunately, this script is not free of charge. If you are interested. Contact us on

Best Regards.

Robert Goldenbaum posted on 2018-01-23

Ahm, this is really quite easy !

oObjOccList = oModel.ObjOccListFilter(Constants.OT_FUNC);

// sort by name

oObjOccList = ArisData.sort(oObjOccList, Constants.AT_NAME, 1033);

// sort by identifier

oObjOccList = ArisData.sort(oObjOccList, Constants.AT_ID, 1033);


And you can replace the attribute constant also with any number of a self defined attribute (but please take care to either use the GUID as provided by Kay or check if the number is stable when moving between servers)

BR Robert