Hi,
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.
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 romain.tricarico@bpmap.fr
Best Regards.
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