CC

Hi all,

We are trying to generate ARIS Connect link inside a report like Publisher. There are some selected models and we want to generate the link for the model inside the report, so the user can click on it and be able to go to the ARIS Connect Model Diagram tab. Is there any convention or direct function code for this?

by Didier Nowak
Posted on Thu, 08/04/2016 - 15:03

Hi,

The Connect links looks like this:

http://<servername>/#<tenant>/item/c.<factSheet>.<DBName>.<GUID>.<Version>

Where :

  • server name is the url of your server
  • tenant is the tenant name (usually 'default')
  • factSheet is the name of the factsheet of the Connect item (like process, system, ...)
  • DBName is the name of the Database
  • GUID is the guid of the model
  • Version is usually -1 if you publish the workspace

The only tricky part is the factsheet name, which depends on your customizing / connect configuration

Regards,

Didier

 

0
by Dave Butcher
Posted on Thu, 09/29/2016 - 15:15

I have recently created a report that makes up the url because we needed to convert our Process List from Publisher URLs, to Connect URL's having migrated. 

Generating the script is a relatively straight forward activity that can be achieved in the scripting. Nowak, is entirely correct in the make up the url - however, the GUID is not the actual model GUID, it is a compressed version of it.



To generate the Compressed GUID you'll need something like:



function compressGuid(guid) {

    var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";

    var compressedGuid = "";

    var bucket = 0;

    var bits = 0;

    for (var i = 0; i < guid.length(); i++) {

 

        var rValue = guid.charAt(i)

        if (rValue >= 48 && rValue <=57)

            fValue = rValue - 48;

        else if (rValue >= 97 && rValue <= 102)

            fValue = 10 + rValue - 97;

        else if (rValue >= 65 && rValue <= 90)

            fValue = 10 + rValue - 65;

        else            

            continue;

 

       bucket = (bucket << 4) + fValue;

        bits+=4;

        if (bits >= 6) {

            bits-=6;

            sValue = bucket >> bits;

            bucket = bucket ^ (sValue << bits);

            compressedGuid += code.charAt(sValue);

        }

    }

    if (bits > 0) {

        compressedGuid += code.charAt(bucket << (6 - bits));

    }

    return compressedGuid;

}

and for the model types, you will need to create a function in your report that will string replace the model type for the correct factsheet ( or item as Connect knows it).

Hope this helps. 

0
by Michael Idengren
Posted on Sun, 09/17/2017 - 08:36

Hi,

There were a couple of errors in Dave's code, but the attached code is verified to work in ARIS 9.8.7.  Also, I've created a convenience function getLink(sGUID, sFactsheet, iVersion) which allows you to pass in a string GUID and optional factsheet & version, and return an encoded URL.  Note that when a factsheet is not defined in a Connect link, it simply goes for the default factsheet for that item.

 

function compressGuid(guid) {
    var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
    var compressedGuid = "";
    var bucket = 0;
    var bits = 0;
    //for (var i = 0; i < guid.length(); i++) {
    for (var i = 0; i < guid.length; i++) {
 
        //var rValue = guid.charAt(i)
        var rValue = guid.charCodeAt(i);
        if (rValue >= 48 && rValue <=57)
            fValue = rValue - 48;
        else if (rValue >= 97 && rValue <= 102)
            fValue = 10 + rValue - 97;
        else if (rValue >= 65 && rValue <= 90)
            fValue = 10 + rValue - 65;
        else            
            continue;
 
       bucket = (bucket << 4) + fValue;
        bits+=4;
        if (bits >= 6) {
            bits-=6;
            sValue = bucket >> bits;
            bucket = bucket ^ (sValue << bits);
            compressedGuid += code.charAt(sValue);
        }
    }
    if (bits > 0) {
        compressedGuid += code.charAt(bucket << (6 - bits));
    }
    return compressedGuid;
}

function getLink(sGUID, sFactsheet, iVersion) {

    var CONNECT_URL = "http://lubuntu-aris:1080";
    var g_nloc = Context.getSelectedLanguage();
    
    if (iVersion == null) iVersion = -1;    
    (sFactsheet == null) ? sFactsheet = "" : sFactsheet = sFactsheet + ".";
    
    var oDatabase = ArisData.getActiveDatabase();
    var sTenantName = ArisData.getTenantName();
    var serverName = oDatabase.ServerName ( );
    var sDBName = oDatabase.Name(g_nloc);

    sDBName = sDBName.replace(".", "~d");
    
    var linkURL = CONNECT_URL + "/#" + sTenantName + "/item/c." + sFactsheet + sDBName + "." + compressGuid(sGUID) + "." + iVersion;
    
    var encodedURL = encodeURI(linkURL);
    
    return encodedURL;
    
    
}

getLink("c590a5e0-5508-11e7-0ccd-001c42aee4f1", null, null)
// returns:  http://lubuntu-aris:1080/#default/item/c.ARISApp%20-%20ARIS%20Notifier%20-%20Filter.xZCl4FUIEecMzQAcQq7k8Q.-1
0
by Pontus Gagge
Posted on Wed, 01/22/2020 - 09:59

In reply to by idengrenme

Thanks: this worked very well for getting nice reports on content linked to their presentation in ARIS Connect! One adjustment: I needed to switch back from guid.length to guid.length() for the GUID's I got from the Model.GUID() method. Somewhat inconsistent representations, I believe! 

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