FT

Does anyone know how to obtain the name of a method filter when we do not have the object but only the GUID. Method filters are part of the server and users and user groups have access to them. The method GetFilters( ) on a UserGroup returns the list of filters as GUIS strings.

In my report, I want to show the name of the filters instead of the GUID but I see no method that has a GUID string as an input parameter. Since a method filter is not an item, the Find() methods on a database are no use.

Does anyone know the answer.

Many regards,

Fred Tirion

 

by Mayur Patel
Posted on Thu, 02/14/2013 - 09:00

not sure as I couldnt find the method either(after looking very quickly), but here's a code snippet that works

function main(){     
    var sFilterName = Custom_GetFilterNameFromGUID("insert your filter guid here", ArisData.getSelectedFilters());
}
main();

function Custom_GetFilterNameFromGUID(sGUID, oFilterList){
    var oRequiredFilter;
     
    if (oFilterList.length > 0){
        for (var i=0; i<oFilterList.length; i++){
            if (oFilterList[i].GUID() == sGUID)
                oRequiredFilter = oFilterList[i];
        }
    }
    return oRequiredFilter.Name(Context.getSelectedLanguage());
}
0
by Fred Tirion Author
Posted on Thu, 02/14/2013 - 20:07

Hello Mayur,

Thank you for reply.

My script displays all the access rights in a database and therefore runs with a database context. This means that the list ArisData.getSelectedFilters() is empty.

If I would select filters and run the script with a Method Filter context, I would not have a current database and therfore no usergroups and therfore no GUIDs.

So either way, it would not work for me.

Amongst other things, the script reports on all the method filters a particular usergroup has access to. Apparantly only the GUIDS of these filters are stored in the database. The rest of the info is stored at the server level.

Unfortunately only the current Method Filter can be interrogated.

I was hoping to acces the server level from with a script that runs with a database context. Something similar like the ArisData.getDatabases() method.

Maybe there is a low level (Java) solution to get to the server?

Fred

0
by Mayur Patel
Posted on Fri, 02/15/2013 - 06:43

Always a pleasure.

 

Try the following:

function main(){     
    var sFilterName = Custom_GetFilterNameFromGUID("c20999c0-d7bf-11e1-7168-0050568a723f", ArisData.getConfigurationFilters(Context.getSelectedLanguage()));
}
main();

function Custom_GetFilterNameFromGUID(sGUID, oFilterList){
    var oRequiredFilter;
     
    if (oFilterList.length > 0){
        for (var i=0; i<oFilterList.length; i++){
            if (oFilterList[i].getGUID() == sGUID)
                oRequiredFilter = oFilterList[i];
        }
    }
    return oRequiredFilter.getName();
}

 

I changed the getSelectedFilter to getConfigurationFilters which only gets config filter info not the filter though.   THis required me to change the GUID() function in line 11 to getGUID and the Name() function on line 15 to getName() but now you can get the info without selecting Filters up front.

 

 

0
by Fred Tirion Author
Posted on Fri, 02/15/2013 - 10:27

Hi Mayur,

That looks very promising. I am developing the script, using Aris Business Architect 7.0.2.350381

In that version there is no method ArisData.getConfigurationFilters

However, the script (when finished) will run in our production environment, release 7.2.2.589499 (SR 2011_02)

For this version, I have no testserver and no help files at the moment (it's a long story ;-). Do you happen to know if the method is available at that release?

If it is, I can use your solution and my report will be even more pretty :-)

Thanks,

Fred

0
by Mayur Patel
Posted on Fri, 02/15/2013 - 12:59

I'm not sure about the old release as I only have access to 7.2.

You could always load the script on the production server and ensure that the script is configured so that it cannot amend the database and is not available to users to test it. That way there is no risk involved to users and content but at least you get to test.

0
by Nicolás Pozo
Posted on Tue, 10/15/2013 - 20:08

Hi all,

I'm working with a server with several databases, and I need a fast way to evaluate if a list of models of each database agree with the rules of a Filter (Method).



Does any body know about some existing report that allows me to get to the "events" out of the rules of a Filter? or How can I access to the Filter properties in a script to compare low level if a model and its objects and relationship agree with the terms of a specific filter (not the Selected necesary)?



I'll very thanksfull about any contribution.

 

Nico.

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock