AW

Hello,

 

I am trying to build a report which includes the following:

- activities

- responsable who executes the activity

- application used for the activity

- description of the activity

so far, so good, however now i want to add the following two items

- all events that are input of the activity

- all events that are output of the activity

 

I can make it work with the following command:

getSelectedModels.ObjOccListbySymbol.getConnectObjOccs.InEdges.TargetObjOcc.ObjDef

getSelectedModels.ObjOccListbySymbol.getConnectObjOccs.OutEdges.SourceObjOcc.ObjDef

 

However, i cannot get the events which are linked, with a AND or OR rule in between.... I don't find anyway to include those events in my query. Please can anyone help me

 

Thank you

Arne

 

by Ilya Seletkov
Posted on Thu, 08/21/2014 - 11:52

My way is to write recursive function, which looks for connections via getConnectObjOccs.

0
by Arne Woudstra Author
Posted on Thu, 08/21/2014 - 13:30

Thanks Ilja

 

Yea i managed to get the objects if i add a double getConnectObjOccs, but i can't get and the objects which are link with a AND or OR rule and the objects which are normally linked...

0
by Ilya Seletkov
Posted on Fri, 08/22/2014 - 06:47
I use this function.
oObjOcc - first object occurence. In your case - function.
nInOut - direction. Constants.EDGES_IN | Constants.EDGES_OUT
aFindTypes - array of object types to find. In your case [Constants.OT_EVT]
aPassTypes - array of object types, which pass over. Optional.
bFlag - do not pass anything. Technical parameter.

It may need some addtional function like IsDefined or ValueAt.

var GoneObjects = null;
function MultiConnected(oObjOcc, nInOut, aFindTypes, aPassTypes, bFlag)
{
    var aResult = new Array();
    
    var oEs = [];
    var nE = 0;
    var oAdj = null;
    var nStructure = Constants.EDGES_ALL;
    
    if (!IsDefined(aFindTypes))
        return aResult;
    if (typeof(aFindTypes)=="number")
        aFindTypes = [aFindTypes];
    if (!IsDefined(aPassTypes))
        aPassTypes = [];
    if (typeof(aPassTypes)=="number")
        aPassTypes = [aPassTypes];
    aPassTypes.push(Constants.OT_RULE);
    //Чтобы не бегать по одним и темже объектам несколько раз
    //сделаем список всех объектов, по которым уже прошись
    if (typeof(bFlag)=="undefined")
        GoneObjects = new __map();    
    else
        if (!bFlag)  
            GoneObjects = new __map(); 
    //Проверяем, не рассматривали ли мы уже это объект
    if (GoneObjects.ContainsKey(oObjOcc.ObjDef().GUID(),oObjOcc))
        return aResult;
    GoneObjects.Insert(oObjOcc.ObjDef().GUID(),oObjOcc);
    
    //Собираем входящие и выходящие связи
    if(nInOut & Constants.EDGES_IN)
        oEs = oEs.concat(oObjOcc.InEdges(nStructure));
    if(nInOut & Constants.EDGES_OUT)
        oEs = oEs.concat(oObjOcc.OutEdges(nStructure));
    
    //Рассматриваем все связи
    for(nE = 0; nE < oEs.length; nE++)
    {
        //Находим объект с другой стороны связи
        oAdj = oEs[nE].TargetObjOcc(); 
        if (oAdj.IsEqual(oObjOcc))
            oAdj = oEs[nE].SourceObjOcc();
        for (var i=0; i<aFindTypes.length; i++)
            if(oAdj.ObjDef().TypeNum() == aFindTypes.ValueAt(i))
            {
                aResult.push(oAdj);
                break;
            }
        //Если это логика, для неё снова запустим эту функцию
        for (var i=0; i<aPassTypes.length; i++)
            if(oAdj.ObjDef().TypeNum() == aPassTypes.ValueAt(i))
            {
                aResult = aResult.concat(MultiConnected(oAdj, nInOut, aFindTypes, aPassTypes, true));
                break;
            }
    }
    return aResult;
}

 

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